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

Unified Diff: net/cert/x509_certificate.h

Issue 421243003: Fixes to the SHA256 X509 Certificate fingerprint API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Revert variable names in unit test per wtc comment Created 6 years, 5 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 | « no previous file | net/cert/x509_certificate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/x509_certificate.h
diff --git a/net/cert/x509_certificate.h b/net/cert/x509_certificate.h
index 15ef81c195532a4782dfece9e33a684cae08a8ea..97906ed0461f02c4d8705e2e3db8109484f21f1b 100644
--- a/net/cert/x509_certificate.h
+++ b/net/cert/x509_certificate.h
@@ -405,11 +405,12 @@ class NET_EXPORT X509Certificate
// Calculates the SHA-256 fingerprint of the intermediate CA certificates.
// Returns an empty (all zero) fingerprint on failure.
//
- // The implementation currently relies on the crypto::SecureHash utilities,
- // which are not as fast as implementing this directly for each platform since
- // the consumers are not expected to be performance critical. If performance
- // is a concern going forward, it may be warranted to implement this on a
- // per-platform basis.
+ // As part of the cross-platform implementation of this function, it currently
+ // copies the certificate bytes into local variables which makes it
+ // potentially slower than implementing it directly for each platform. For
+ // now, the expected consumers are not performance critical, but if
+ // performance is a concern going forward, it may warrant implementing this on
+ // a per-platform basis.
static SHA256HashValue CalculateCAFingerprint256(
const OSCertHandles& intermediates);
@@ -417,7 +418,7 @@ class NET_EXPORT X509Certificate
// leaf certificate and all intermediate CA certificates. Returns an empty
// (all zero) fingerprint on failure.
static SHA256HashValue CalculateChainFingerprint256(
- const OSCertHandle& leaf,
+ OSCertHandle leaf,
const OSCertHandles& intermediates);
private:
« no previous file with comments | « no previous file | net/cert/x509_certificate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698