diff options
Diffstat (limited to 'src/nss/pkikeys.c')
-rw-r--r-- | src/nss/pkikeys.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/nss/pkikeys.c b/src/nss/pkikeys.c index ae9e29b4..5ede4ccb 100644 --- a/src/nss/pkikeys.c +++ b/src/nss/pkikeys.c @@ -752,6 +752,15 @@ xmlSecNssKeyDataDsaXmlRead(xmlSecKeyDataId id, xmlSecKeyPtr key, } handle = PK11_ImportPublicKey(slot, pubkey, PR_FALSE); + if(handle == CK_INVALID_HANDLE) { + xmlSecError(XMLSEC_ERRORS_HERE, + xmlSecErrorsSafeString(xmlSecKeyDataKlassGetName(id)), + "PK11_ImportPublicKey", + XMLSEC_ERRORS_R_CRYPTO_FAILED, + XMLSEC_ERRORS_NO_MESSAGE); + ret = -1; + goto done; + } data = xmlSecKeyDataCreate(id); if(data == NULL ) { |