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

Unified Diff: net/base/x509_certificate_openssl.cc

Issue 6793026: Initial support for HSTS certificate locking. This isn't a finished work, but (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 9 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
Index: net/base/x509_certificate_openssl.cc
===================================================================
--- net/base/x509_certificate_openssl.cc (revision 80507)
+++ net/base/x509_certificate_openssl.cc (working copy)
@@ -332,6 +332,21 @@
X509InitSingleton::GetInstance()->ResetCertStore();
}
+// static
+void X509Certificate::GetCertChainFromCert(OSCertHandle cert_handle,
+ OSCertHandles* cert_handles) {
+ // TODO(bulach): how to get the chain out of a certificate?
wtc 2011/04/07 01:00:29 I don't know. Usually a certificate chain is a by
+ cert_handles->push_back(net::X509Certificate::DupOSCertHandle(cert_handle));
+}
+
+// static
+void X509Certificate::DestroyCertChain(OSCertHandles* cert_handles) {
+ for (OSCertHandles::iterator i = cert_handles->begin();
+ i != cert_handles->end(); ++i)
+ X509_free(*i);
+ cert_handles->clear();
+}
+
SHA1Fingerprint X509Certificate::CalculateFingerprint(OSCertHandle cert) {
SHA1Fingerprint sha1;
unsigned int sha1_size = static_cast<unsigned int>(sizeof(sha1.data));

Powered by Google App Engine
This is Rietveld 408576698