| 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(
|
| + 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,
|
|
|