diff options
author | vandebo@chromium.org <vandebo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-31 20:38:18 +0000 |
---|---|---|
committer | vandebo@chromium.org <vandebo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-31 20:38:18 +0000 |
commit | 5fb0c3fa351ea22371db00d3db97d02f3b399780 (patch) | |
tree | f94e4e491e52b3a34f7508723752b3234c8bf76b /net/base/x509_certificate.cc | |
parent | 034548ddd7d9d59c1b022618dfb418c3ce44ae52 (diff) | |
download | chromium_src-5fb0c3fa351ea22371db00d3db97d02f3b399780.zip chromium_src-5fb0c3fa351ea22371db00d3db97d02f3b399780.tar.gz chromium_src-5fb0c3fa351ea22371db00d3db97d02f3b399780.tar.bz2 |
Revert 149261 - Support SHA-256 in public key pins for HTTPS.
Broke the compile on CrOS. Looks like const-ness problem:
net/socket/ssl_client_socket_nss.cc: In member function 'int net::SSLClientSocketNSS::DoVerifyCertComplete(int)':
net/socket/ssl_client_socket_nss.cc:3458:error: no matching function for call to 'net::TransportSecurityState::DomainState::IsChainOfPublicKeysPermitted(std::vector<std::vector<net::HashValue, std::allocator<net::HashValue> >, std::allocator<std::vector<net::HashValue, std::allocator<net::HashValue> > > >&)'
./net/base/transport_security_state.h:94: note: candidates are: bool net::TransportSecurityState::DomainState::IsChainOfPublicKeysPermitted(const net::HashValueVector&) const
The HTTP-based Public Key Pinning Internet Draft
(tools.ietf.org/html/draft-ietf-websec-key-pinning) requires this.
Per wtc, give the *Fingeprint* types more meaningful *HashValue* names.
Cleaning up lint along the way.
BUG=117914
TEST=net_unittests, unit_tests TransportSecurityPersisterTest
Review URL: https://chromiumcodereview.appspot.com/10545166
TBR=palmer@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10827104
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@149268 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/x509_certificate.cc')
-rw-r--r-- | net/base/x509_certificate.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/base/x509_certificate.cc b/net/base/x509_certificate.cc index 29b11a8..7f1c41e 100644 --- a/net/base/x509_certificate.cc +++ b/net/base/x509_certificate.cc @@ -91,7 +91,7 @@ class X509CertificateCache { // the cached OS certificate handle will be freed. int ref_count; }; - typedef std::map<SHA1HashValue, Entry, SHA1HashValueLessThan> CertMap; + typedef std::map<SHA1Fingerprint, Entry, SHA1FingerprintLessThan> CertMap; // Obtain an instance of X509CertificateCache via a LazyInstance. X509CertificateCache() {} @@ -114,7 +114,7 @@ base::LazyInstance<X509CertificateCache>::Leaky void X509CertificateCache::InsertOrUpdate( X509Certificate::OSCertHandle* cert_handle) { DCHECK(cert_handle); - SHA1HashValue fingerprint = + SHA1Fingerprint fingerprint = X509Certificate::CalculateFingerprint(*cert_handle); X509Certificate::OSCertHandle old_handle = NULL; @@ -160,7 +160,7 @@ void X509CertificateCache::InsertOrUpdate( } void X509CertificateCache::Remove(X509Certificate::OSCertHandle cert_handle) { - SHA1HashValue fingerprint = + SHA1Fingerprint fingerprint = X509Certificate::CalculateFingerprint(cert_handle); base::AutoLock lock(lock_); |