mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 07:04:28 +00:00
rsa: use pkcs11 uri as defined in rfc7512
pkcs11 : change engine uri to use full pk11-URI as defined in: https://www.rfc-editor.org/rfc/rfc7512.html Signed-off-by: Ayoub Zaki <ayoub.zaki@embetrix.com>
This commit is contained in:
parent
05e8e2403c
commit
ece85cc020
2 changed files with 7 additions and 7 deletions
|
@ -671,7 +671,7 @@ Create the fitImage::
|
|||
Sign the fitImage with the hardware key::
|
||||
|
||||
$ ./tools/mkimage -F -k \
|
||||
"model=PKCS%2315%20emulated;manufacturer=ZeitControl;serial=000xxxxxxxxx;token=OpenPGP%20card%20%28User%20PIN%20%28sig%29%29" \
|
||||
"pkcs11:model=PKCS%2315%20emulated;manufacturer=ZeitControl;serial=000xxxxxxxxx;token=OpenPGP%20card%20%28User%20PIN%20%28sig%29%29" \
|
||||
-K u-boot.dtb -N pkcs11 -r fitImage
|
||||
|
||||
|
||||
|
|
|
@ -116,15 +116,15 @@ static int rsa_engine_get_pub_key(const char *keydir, const char *name,
|
|||
if (keydir)
|
||||
if (strstr(keydir, "object="))
|
||||
snprintf(key_id, sizeof(key_id),
|
||||
"pkcs11:%s;type=public",
|
||||
"%s;type=public",
|
||||
keydir);
|
||||
else
|
||||
snprintf(key_id, sizeof(key_id),
|
||||
"pkcs11:%s;object=%s;type=public",
|
||||
"%s;object=%s;type=public",
|
||||
keydir, name);
|
||||
else
|
||||
snprintf(key_id, sizeof(key_id),
|
||||
"pkcs11:object=%s;type=public",
|
||||
"object=%s;type=public",
|
||||
name);
|
||||
} else if (engine_id) {
|
||||
if (keydir)
|
||||
|
@ -238,15 +238,15 @@ static int rsa_engine_get_priv_key(const char *keydir, const char *name,
|
|||
if (keydir)
|
||||
if (strstr(keydir, "object="))
|
||||
snprintf(key_id, sizeof(key_id),
|
||||
"pkcs11:%s;type=private",
|
||||
"%s;type=private",
|
||||
keydir);
|
||||
else
|
||||
snprintf(key_id, sizeof(key_id),
|
||||
"pkcs11:%s;object=%s;type=private",
|
||||
"%s;object=%s;type=private",
|
||||
keydir, name);
|
||||
else
|
||||
snprintf(key_id, sizeof(key_id),
|
||||
"pkcs11:object=%s;type=private",
|
||||
"object=%s;type=private",
|
||||
name);
|
||||
} else if (engine_id) {
|
||||
if (keydir && name)
|
||||
|
|
Loading…
Reference in a new issue