mirror of
git://git.openembedded.org/meta-openembedded
synced 2026-01-01 13:58:06 +00:00
signing.bbclass: make it work with eliptic curve keys
"openssl rsa" works with RSA keys only. Use "openssl pkey" instead which is a frontend that picks the right operation automatically and works with RSA keys, eliptic curve keys and also DSA keys. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
parent
399531aa09
commit
c9ddb71d35
|
|
@ -161,11 +161,11 @@ signing_import_pubkey_from_pem() {
|
|||
local pem="${2}"
|
||||
|
||||
if [ -n "${IMPORT_PASS_FILE}" ]; then
|
||||
openssl rsa \
|
||||
openssl pkey \
|
||||
-passin "file:${IMPORT_PASS_FILE}" \
|
||||
-in "${pem}" -inform pem -pubout -outform der
|
||||
else
|
||||
openssl rsa \
|
||||
openssl pkey \
|
||||
-in "${pem}" -inform pem -pubout -outform der
|
||||
fi |
|
||||
signing_pkcs11_tool --type pubkey --write-object /proc/self/fd/0 --label "${role}"
|
||||
|
|
@ -189,11 +189,11 @@ signing_import_privkey_from_pem() {
|
|||
local pem="${2}"
|
||||
|
||||
if [ -n "${IMPORT_PASS_FILE}" ]; then
|
||||
openssl rsa \
|
||||
openssl pkey \
|
||||
-passin "file:${IMPORT_PASS_FILE}" \
|
||||
-in "${pem}" -inform pem -outform der
|
||||
else
|
||||
openssl rsa \
|
||||
openssl pkey \
|
||||
-in "${pem}" -inform pem -outform der
|
||||
fi |
|
||||
signing_pkcs11_tool --type privkey --write-object /proc/self/fd/0 --label "${role}"
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user