From 9ec84b6f69e5e3933fc4bb3e75ecf2771500a361 Mon Sep 17 00:00:00 2001 From: "rsleevi@chromium.org" Date: Sat, 17 Jul 2010 00:48:48 +0000 Subject: Minor clean-up tasks that were TODO(snej) Rename Principal->CertPrincipal, Policy->CertPolicy, both of which are merely syntatic fluff. Rename Fingerprint->SHA1Fingerprint, which is more important since those using the fingerprint, such as the unit tests, were truly hardcoded against SHA-1 fingerprints, and if the fingerprint ever changed, wouldn't cause errors until run time. R=wtc BUG=None TEST=Compilers stay green Review URL: http://codereview.chromium.org/2815048 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52789 0039d316-1c4b-4281-b951-d872f2087c98 --- net/base/x509_certificate_win.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'net/base/x509_certificate_win.cc') diff --git a/net/base/x509_certificate_win.cc b/net/base/x509_certificate_win.cc index 23f4230..901c0a6 100644 --- a/net/base/x509_certificate_win.cc +++ b/net/base/x509_certificate_win.cc @@ -377,7 +377,7 @@ bool ContainsPolicy(const CERT_POLICIES_INFO* policies_info, // Helper function to parse a principal from a WinInet description of that // principal. void ParsePrincipal(const std::string& description, - X509Certificate::Principal* principal) { + CertPrincipal* principal) { // The description of the principal is a string with each LDAP value on // a separate line. const std::string kDelimiters("\r\n"); @@ -722,7 +722,7 @@ bool X509Certificate::VerifyEV() const { // Look up the EV policy OID of the root CA. PCCERT_CONTEXT root_cert = element[num_elements - 1]->pCertContext; - Fingerprint fingerprint = CalculateFingerprint(root_cert); + SHA1Fingerprint fingerprint = CalculateFingerprint(root_cert); const char* ev_policy_oid = NULL; if (!metadata->GetPolicyOID(fingerprint, &ev_policy_oid)) return false; @@ -766,13 +766,13 @@ void X509Certificate::FreeOSCertHandle(OSCertHandle cert_handle) { } // static -X509Certificate::Fingerprint X509Certificate::CalculateFingerprint( +SHA1Fingerprint X509Certificate::CalculateFingerprint( OSCertHandle cert) { DCHECK(NULL != cert->pbCertEncoded); DCHECK(0 != cert->cbCertEncoded); BOOL rv; - Fingerprint sha1; + SHA1Fingerprint sha1; DWORD sha1_size = sizeof(sha1.data); rv = CryptHashCertificate(NULL, CALG_SHA1, 0, cert->pbCertEncoded, cert->cbCertEncoded, sha1.data, &sha1_size); -- cgit v1.1