diff options
Diffstat (limited to 'nss/lib/pk11wrap/pk11akey.c')
-rw-r--r-- | nss/lib/pk11wrap/pk11akey.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/nss/lib/pk11wrap/pk11akey.c b/nss/lib/pk11wrap/pk11akey.c index d086ed4..c45901e 100644 --- a/nss/lib/pk11wrap/pk11akey.c +++ b/nss/lib/pk11wrap/pk11akey.c @@ -765,12 +765,10 @@ PK11_ExtractPublicKey(PK11SlotInfo *slot, KeyType keyType, CK_OBJECT_HANDLE id) &pubKey->u.ec.DEREncodedParams); if (crv != CKR_OK) break; + pubKey->u.ec.encoding = ECPoint_Undefined; crv = pk11_get_Decoded_ECPoint(arena, &pubKey->u.ec.DEREncodedParams, value, &pubKey->u.ec.publicValue); - if (seckey_SetPointEncoding(arena, pubKey) != SECSuccess) { - crv |= CKR_GENERAL_ERROR; - } break; case fortezzaKey: case nullKey: @@ -888,6 +886,10 @@ PK11_GetPrivateModulusLen(SECKEYPrivateKey *key) PORT_SetError(PK11_MapError(crv)); return -1; } + if (theTemplate.pValue == NULL) { + PORT_SetError(PK11_MapError(CKR_ATTRIBUTE_VALUE_INVALID)); + return -1; + } length = theTemplate.ulValueLen; if (*(unsigned char *)theTemplate.pValue == 0) { length--; |