| Message ID | 20260408075540.53309-4-hpa@redhat.com |
|---|---|
| State | New |
| Headers | show |
| Series |
|
| Related | show |
diff --git a/src/ipa/ipa-sign.sh b/src/ipa/ipa-sign.sh index 69024213..aa9c7d31 100755 --- a/src/ipa/ipa-sign.sh +++ b/src/ipa/ipa-sign.sh @@ -10,4 +10,9 @@ key="$1" input="$2" output="$3" -openssl dgst -sha256 -sign "${key}" -out "${output}" "${input}" +if openssl pkey -text -noout -in "${key}" 2>/dev/null | grep -q "ML-DSA"; then + openssl pkeyutl -sign -inkey "${key}" -rawin \ + -in "${input}" -out "${output}" +else + openssl dgst -sha256 -sign "${key}" -out "${output}" "${input}" +fi
Sign IPA according to the signature algorithm of the key. Signed-off-by: Kate Hsuan <hpa@redhat.com> --- src/ipa/ipa-sign.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)