mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] scripts: lib: ptxd_lib_code_signing: use pkey instead of rsa
@ 2024-10-10 23:31 Michael Grzeschik
  2024-10-25  7:32 ` [ptxdist] [APPLIED] " Michael Olbrich
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Grzeschik @ 2024-10-10 23:31 UTC (permalink / raw)
  To: ptxdist

This way openssl will automatically detect the used algorithm
of the pem and the helper is not limited to rsa.

Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
---
 scripts/lib/ptxd_lib_code_signing.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/lib/ptxd_lib_code_signing.sh b/scripts/lib/ptxd_lib_code_signing.sh
index bafdc1654..a98596b28 100644
--- a/scripts/lib/ptxd_lib_code_signing.sh
+++ b/scripts/lib/ptxd_lib_code_signing.sh
@@ -233,7 +233,7 @@ cs_import_pubkey_from_pem() {
 	openssl_keyopt=( -passin "file:${OPENSSL_KEYPASS}" )
     fi
 
-    openssl rsa \
+    openssl pkey \
 	"${openssl_keyopt[@]}" \
 	-in "${pem}" -inform pem -pubout -outform der |
     softhsm_pkcs11_tool --type pubkey --write-object /dev/stdin --label "${role}"
@@ -257,7 +257,7 @@ cs_import_privkey_from_pem() {
 	openssl_keyopt=( -passin "file:${OPENSSL_KEYPASS}" )
     fi
 
-    openssl rsa \
+    openssl pkey \
 	"${openssl_keyopt[@]}" \
 	-in "${pem}" -inform pem -outform der |
     softhsm_pkcs11_tool --type privkey --write-object /dev/stdin --label "${role}"
-- 
2.39.5




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-10-25  7:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-10 23:31 [ptxdist] [PATCH] scripts: lib: ptxd_lib_code_signing: use pkey instead of rsa Michael Grzeschik
2024-10-25  7:32 ` [ptxdist] [APPLIED] " Michael Olbrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox