Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(311)

Unified Diff: nss/lib/pki/pkistore.c

Issue 1017413002: Uprev NSS to 3.18 RTM (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/nss.git@nspr_uprev
Patch Set: Rebased Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « nss/lib/pki/pki3hack.c ('k') | nss/lib/pki/tdcache.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « nss/lib/pki/pki3hack.c ('k') | nss/lib/pki/tdcache.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698