Index: nss/mozilla/security/nss/lib/certhigh/certvfypkix.c |
=================================================================== |
--- nss/mozilla/security/nss/lib/certhigh/certvfypkix.c (revision 142244) |
+++ nss/mozilla/security/nss/lib/certhigh/certvfypkix.c (working copy) |
@@ -1426,8 +1426,8 @@ |
/* This needs to be part of the PKIX_PL_* */ |
/* This definitely needs to go away, and be replaced with |
a real accessor function in PKIX */ |
-CERTCertificate * |
-cert_NSSCertFromPKIXCert(const PKIX_PL_Cert *pkix_cert, void *plContext) |
+static CERTCertificate * |
+cert_NSSCertFromPKIXCert(const PKIX_PL_Cert *pkix_cert) |
{ |
struct fake_PKIX_PL_CertStruct *fcert = NULL; |
@@ -2218,10 +2218,12 @@ |
goto cleanup; |
} |
- error = PKIX_TrustAnchor_GetTrustedCert( trustAnchor, &trustAnchorCert, |
- plContext); |
- if (error != NULL) { |
- goto cleanup; |
+ if (trustAnchor != NULL) { |
+ error = PKIX_TrustAnchor_GetTrustedCert( trustAnchor, &trustAnchorCert, |
+ plContext); |
+ if (error != NULL) { |
+ goto cleanup; |
+ } |
} |
#ifdef PKIX_OBJECT_LEAK_TEST |
@@ -2232,8 +2234,12 @@ |
oparam = cert_pkix_FindOutputParam(paramsOut, cert_po_trustAnchor); |
if (oparam != NULL) { |
- oparam->value.pointer.cert = |
- cert_NSSCertFromPKIXCert(trustAnchorCert,plContext); |
+ if (trustAnchorCert != NULL) { |
+ oparam->value.pointer.cert = |
+ cert_NSSCertFromPKIXCert(trustAnchorCert); |
+ } else { |
+ oparam->value.pointer.cert = NULL; |
+ } |
} |
error = PKIX_BuildResult_GetCertChain( buildResult, &builtCertList, |