Index: net/base/x509_certificate_nss.cc |
diff --git a/net/base/x509_certificate_nss.cc b/net/base/x509_certificate_nss.cc |
index 56035fa0483474f0d13810b7af97e8f504d5a5de..14004e0fcca1a77376b9b585a83ef94f0e6b8358 100644 |
--- a/net/base/x509_certificate_nss.cc |
+++ b/net/base/x509_certificate_nss.cc |
@@ -650,17 +650,6 @@ void X509Certificate::Initialize() { |
} |
// static |
-X509Certificate* X509Certificate::CreateFromPickle(const Pickle& pickle, |
- void** pickle_iter) { |
- const char* data; |
- int length; |
- if (!pickle.ReadData(pickle_iter, &data, &length)) |
- return NULL; |
- |
- return CreateFromBytes(data, length); |
-} |
- |
-// static |
X509Certificate* X509Certificate::CreateSelfSigned( |
crypto::RSAPrivateKey* key, |
const std::string& subject, |
@@ -762,11 +751,6 @@ X509Certificate* X509Certificate::CreateSelfSigned( |
return x509_cert; |
} |
-void X509Certificate::Persist(Pickle* pickle) { |
- pickle->WriteData(reinterpret_cast<const char*>(cert_handle_->derCert.data), |
- cert_handle_->derCert.len); |
-} |
- |
void X509Certificate::GetDNSNames(std::vector<std::string>* dns_names) const { |
dns_names->clear(); |
@@ -1005,4 +989,24 @@ SHA1Fingerprint X509Certificate::CalculateFingerprint( |
return sha1; |
} |
+// static |
+X509Certificate::OSCertHandle |
+X509Certificate::ReadCertHandleFromPickle(const Pickle& pickle, |
+ void** pickle_iter) { |
+ const char* data; |
+ int length; |
+ if (!pickle.ReadData(pickle_iter, &data, &length)) |
+ return NULL; |
+ |
+ return CreateOSCertHandleFromBytes(data, length); |
+} |
+ |
+// static |
+bool X509Certificate::WriteCertHandleToPickle(OSCertHandle cert_handle, |
+ Pickle* pickle) { |
+ return pickle->WriteData( |
+ reinterpret_cast<const char*>(cert_handle->derCert.data), |
+ cert_handle->derCert.len); |
+} |
+ |
} // namespace net |