diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-07-17 01:31:34 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-07-17 01:31:34 +0200 |
commit | 1e560deff8c37164eb7496e7d87aa7b30de80398 (patch) | |
tree | 57dbb282776c358d430747f34e77298b1f069511 /security/nss/lib/pk11wrap/pk11cert.c | |
parent | ef189737a3a97bbdeb06825c06121697f62ed50b (diff) | |
download | UXP-1e560deff8c37164eb7496e7d87aa7b30de80398.tar UXP-1e560deff8c37164eb7496e7d87aa7b30de80398.tar.gz UXP-1e560deff8c37164eb7496e7d87aa7b30de80398.tar.lz UXP-1e560deff8c37164eb7496e7d87aa7b30de80398.tar.xz UXP-1e560deff8c37164eb7496e7d87aa7b30de80398.zip |
Don't unnecessarily strip leading 0's from key material during PKCS11 import.
Diffstat (limited to 'security/nss/lib/pk11wrap/pk11cert.c')
-rw-r--r-- | security/nss/lib/pk11wrap/pk11cert.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/security/nss/lib/pk11wrap/pk11cert.c b/security/nss/lib/pk11wrap/pk11cert.c index 819769643..a880b1ab8 100644 --- a/security/nss/lib/pk11wrap/pk11cert.c +++ b/security/nss/lib/pk11wrap/pk11cert.c @@ -184,7 +184,9 @@ PK11_IsUserCert(PK11SlotInfo *slot, CERTCertificate *cert, SECKEY_DestroyPublicKey(pubKey); return PR_FALSE; } - pk11_SignedToUnsigned(&theTemplate); + if (pubKey->keyType != ecKey) { + pk11_SignedToUnsigned(&theTemplate); + } if (pk11_FindObjectByTemplate(slot, &theTemplate, 1) != CK_INVALID_HANDLE) { SECKEY_DestroyPublicKey(pubKey); return PR_TRUE; |