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

Unified Diff: net/base/x509_certificate_win.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_unittest.cc ('k') | net/http/http_stream_factory_impl_job.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/x509_certificate_win.cc
diff --git a/net/base/x509_certificate_win.cc b/net/base/x509_certificate_win.cc
index efa5e5c33bd6993822bb6e3abf41202560a387d6..4f2783627772b81bf7ef5ef6fc65030f9e4a1bf5 100644
--- a/net/base/x509_certificate_win.cc
+++ b/net/base/x509_certificate_win.cc
@@ -964,12 +964,13 @@ int X509Certificate::VerifyInternal(const std::string& hostname,
return OK;
}
-bool X509Certificate::GetDEREncoded(std::string* encoded) {
- if (!cert_handle_->pbCertEncoded || !cert_handle_->cbCertEncoded)
+// static
+bool X509Certificate::GetDEREncoded(X509Certificate::OSCertHandle cert_handle,
+ std::string* encoded) {
+ if (!cert_handle->pbCertEncoded || !cert_handle->cbCertEncoded)
return false;
- encoded->clear();
- encoded->append(reinterpret_cast<char*>(cert_handle_->pbCertEncoded),
- cert_handle_->cbCertEncoded);
+ encoded->assign(reinterpret_cast<char*>(cert_handle->pbCertEncoded),
+ cert_handle->cbCertEncoded);
return true;
}
« no previous file with comments | « net/base/x509_certificate_unittest.cc ('k') | net/http/http_stream_factory_impl_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698