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

Unified Diff: net/cert/x509_certificate.cc

Issue 421243003: Fixes to the SHA256 X509 Certificate fingerprint API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
Index: net/cert/x509_certificate.cc
diff --git a/net/cert/x509_certificate.cc b/net/cert/x509_certificate.cc
index c9cb758f3881a7b28ed856bcd87d1fce1cac22b4..4a29ca1a929d77037eebeaf621b1865c21bd6ab8 100644
--- a/net/cert/x509_certificate.cc
+++ b/net/cert/x509_certificate.cc
@@ -720,7 +720,7 @@ SHA256HashValue X509Certificate::CalculateCAFingerprint256(
std::string der_encoded;
if (!GetDEREncoded(intermediates[i], &der_encoded))
return sha256;
- hash->Update(der_encoded.c_str(), der_encoded.length());
+ hash->Update(der_encoded.data(), der_encoded.length());
}
hash->Finish(sha256.data, sizeof(sha256.data));
@@ -729,7 +729,7 @@ SHA256HashValue X509Certificate::CalculateCAFingerprint256(
// static
SHA256HashValue X509Certificate::CalculateChainFingerprint256(
- const OSCertHandle& leaf,
+ OSCertHandle leaf,
const OSCertHandles& intermediates) {
OSCertHandles chain;
chain.push_back(leaf);

Powered by Google App Engine
This is Rietveld 408576698