summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFranziskus Kiefer <franziskuskiefer@gmail.com>2016-04-21 15:53:31 +0200
committerFranziskus Kiefer <franziskuskiefer@gmail.com>2016-04-21 15:53:31 +0200
commit72250b67ea555e2588be91449f9147f2f86e4b09 (patch)
treefd589c95bd346d254a0a123bf1a0265692b0571b
parent88cc7d314b164ed585342786fc389512c967e1b5 (diff)
downloadnss-hg-72250b67ea555e2588be91449f9147f2f86e4b09.tar.gz
Backed out changeset 939c111a293d, due to test bustage on some devices
-rw-r--r--lib/cryptohi/seckey.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/cryptohi/seckey.c b/lib/cryptohi/seckey.c
index e347714a2..827413a70 100644
--- a/lib/cryptohi/seckey.c
+++ b/lib/cryptohi/seckey.c
@@ -660,6 +660,16 @@ SECKEY_ExtractPublicKey(const CERTSubjectPublicKeyInfo *spki)
SECKEYPublicKey *
CERT_ExtractPublicKey(CERTCertificate *cert)
{
+ SECStatus rv;
+
+ if (!cert) {
+ PORT_SetError(SEC_ERROR_INVALID_ARGS);
+ return NULL;
+ }
+ rv = SECKEY_UpdateCertPQG(cert);
+ if (rv != SECSuccess)
+ return NULL;
+
return seckey_ExtractPublicKey(&cert->subjectPublicKeyInfo);
}