diff options
author | Ayoub Zaki | 2023-08-26 13:53:29 +0200 |
---|---|---|
committer | Tom Rini | 2023-12-20 09:48:17 -0500 |
commit | ece85cc0202717ee8eaf5acb0772c0912b7f8e9d (patch) | |
tree | 9f9a9c55d4bca2fa74c8706d08f2fc7e002e16f4 /lib/rsa | |
parent | 05e8e2403c533cc9e7a2a548486e2e41dfd5ce53 (diff) |
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>
Diffstat (limited to 'lib/rsa')
-rw-r--r-- | lib/rsa/rsa-sign.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/rsa/rsa-sign.c b/lib/rsa/rsa-sign.c index d20bdb58a57..7ae163f264b 100644 --- a/lib/rsa/rsa-sign.c +++ b/lib/rsa/rsa-sign.c @@ -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) |