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

Unified Diff: net/base/x509_certificate_openssl.cc

Issue 8414047: Make X509Certificate::GetDEREncoded a static function taking an OSCertHandle (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase and tweak comment to wtc's verbiage Created 9 years, 2 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 | « net/base/x509_certificate_nss.cc ('k') | net/base/x509_certificate_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/x509_certificate_openssl.cc
diff --git a/net/base/x509_certificate_openssl.cc b/net/base/x509_certificate_openssl.cc
index ac5b75c83d47a84133c8ac65c0f3d4a8f3c162cf..58809112d63733dd61dbb99a941fd2b103030e2e 100644
--- a/net/base/x509_certificate_openssl.cc
+++ b/net/base/x509_certificate_openssl.cc
@@ -527,10 +527,12 @@ int X509Certificate::VerifyInternal(const std::string& hostname,
#endif // !defined(OS_ANDROID)
-bool X509Certificate::GetDEREncoded(std::string* encoded) {
+// static
+bool X509Certificate::GetDEREncoded(X509Certificate::OSCertHandle cert_handle,
+ std::string* encoded) {
DERCache der_cache;
- if (!GetDERAndCacheIfNeeded(cert_handle_, &der_cache))
- return false;
+ if (!GetDERAndCacheIfNeeded(cert_handle, &der_cache))
+ return false;
encoded->assign(reinterpret_cast<const char*>(der_cache.data),
der_cache.data_length);
return true;
« no previous file with comments | « net/base/x509_certificate_nss.cc ('k') | net/base/x509_certificate_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698