Index: net/base/x509_certificate.cc |
diff --git a/net/base/x509_certificate.cc b/net/base/x509_certificate.cc |
index efb19eeb718168d8e82a215e65bf925f75eb9364..82c85739bace7931c877b99b4878a698267556dd 100644 |
--- a/net/base/x509_certificate.cc |
+++ b/net/base/x509_certificate.cc |
@@ -305,6 +305,24 @@ X509Certificate* X509Certificate::CreateFromBytes(const char* data, |
return cert; |
} |
+#if defined(USE_NSS) |
+// static |
+X509Certificate* X509Certificate::CreateFromBytesWithNickname( |
wtc
2011/11/29 23:13:57
This probably should be moved to x509_certificate_
Greg Spencer (Chromium)
2011/12/02 18:50:07
Ahh, good point. I moved it there.
|
+ const char* data, |
+ int length, |
+ const char* nickname) { |
+ OSCertHandle cert_handle = CreateOSCertHandleFromBytesWithNickname(data, |
+ length, |
+ nickname); |
+ if (!cert_handle) |
+ return NULL; |
+ |
+ X509Certificate* cert = CreateFromHandle(cert_handle, OSCertHandles()); |
+ FreeOSCertHandle(cert_handle); |
+ return cert; |
+} |
+#endif |
+ |
// static |
X509Certificate* X509Certificate::CreateFromPickle(const Pickle& pickle, |
void** pickle_iter, |