Index: nss/lib/pki/pkistore.c |
diff --git a/nss/lib/pki/pkistore.c b/nss/lib/pki/pkistore.c |
index 3bdf290c024cafffcb32bcc424c28e95fa615264..15bb6586506aee8d39bf1e8365ffdb1280093625 100644 |
--- a/nss/lib/pki/pkistore.c |
+++ b/nss/lib/pki/pkistore.c |
@@ -23,6 +23,7 @@ |
#endif /* PKISTORE_H */ |
#include "cert.h" |
+#include "pki3hack.h" |
#include "prbit.h" |
@@ -554,33 +555,6 @@ nssCertificateStore_FindCertificateByIssuerAndSerialNumber ( |
return rvCert; |
} |
-static PRStatus |
-issuer_and_serial_from_encoding ( |
- NSSBER *encoding, |
- NSSDER *issuer, |
- NSSDER *serial |
-) |
-{ |
- SECItem derCert, derIssuer, derSerial; |
- SECStatus secrv; |
- derCert.data = (unsigned char *)encoding->data; |
- derCert.len = encoding->size; |
- secrv = CERT_IssuerNameFromDERCert(&derCert, &derIssuer); |
- if (secrv != SECSuccess) { |
- return PR_FAILURE; |
- } |
- secrv = CERT_SerialNumberFromDERCert(&derCert, &derSerial); |
- if (secrv != SECSuccess) { |
- PORT_Free(derIssuer.data); |
- return PR_FAILURE; |
- } |
- issuer->data = derIssuer.data; |
- issuer->size = derIssuer.len; |
- serial->data = derSerial.data; |
- serial->size = derSerial.len; |
- return PR_SUCCESS; |
-} |
- |
NSS_IMPLEMENT NSSCertificate * |
nssCertificateStore_FindCertificateByEncodedCertificate ( |
nssCertificateStore *store, |
@@ -590,7 +564,7 @@ nssCertificateStore_FindCertificateByEncodedCertificate ( |
PRStatus nssrv = PR_FAILURE; |
NSSDER issuer, serial; |
NSSCertificate *rvCert = NULL; |
- nssrv = issuer_and_serial_from_encoding(encoding, &issuer, &serial); |
+ nssrv = nssPKIX509_GetIssuerAndSerialFromDER(encoding, &issuer, &serial); |
if (nssrv != PR_SUCCESS) { |
return NULL; |
} |