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

Side by Side Diff: net/cert/x509_certificate.h

Issue 462543002: Certificate Transparency: Code for unpacking EV cert hashes whitelist (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressing comments + adding method for determining presence of valid EV whitelist. Created 6 years, 3 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 unified diff | Download patch
« no previous file with comments | « net/cert/ct_ev_whitelist_unittest.cc ('k') | net/cert/x509_certificate_ios.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_CERT_X509_CERTIFICATE_H_ 5 #ifndef NET_CERT_X509_CERTIFICATE_H_
6 #define NET_CERT_X509_CERTIFICATE_H_ 6 #define NET_CERT_X509_CERTIFICATE_H_
7 7
8 #include <string.h> 8 #include <string.h>
9 9
10 #include <string> 10 #include <string>
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 static void FreeOSCertHandle(OSCertHandle cert_handle); 388 static void FreeOSCertHandle(OSCertHandle cert_handle);
389 389
390 // Calculates the SHA-1 fingerprint of the certificate. Returns an empty 390 // Calculates the SHA-1 fingerprint of the certificate. Returns an empty
391 // (all zero) fingerprint on failure. 391 // (all zero) fingerprint on failure.
392 // 392 //
393 // For calculating fingerprints, prefer SHA-1 for performance when indexing, 393 // For calculating fingerprints, prefer SHA-1 for performance when indexing,
394 // but callers should use IsSameOSCert() before assuming two certificates are 394 // but callers should use IsSameOSCert() before assuming two certificates are
395 // the same. 395 // the same.
396 static SHA1HashValue CalculateFingerprint(OSCertHandle cert_handle); 396 static SHA1HashValue CalculateFingerprint(OSCertHandle cert_handle);
397 397
398 // Calculates the SHA-256 fingerprint of the certificate. Returns an empty
399 // (all zero) fingerprint on failure.
400 static SHA256HashValue CalculateFingerprint256(OSCertHandle cert_handle);
401
398 // Calculates the SHA-1 fingerprint of the intermediate CA certificates. 402 // Calculates the SHA-1 fingerprint of the intermediate CA certificates.
399 // Returns an empty (all zero) fingerprint on failure. 403 // Returns an empty (all zero) fingerprint on failure.
400 // 404 //
401 // See SHA-1 caveat on CalculateFingerprint(). 405 // See SHA-1 caveat on CalculateFingerprint().
402 static SHA1HashValue CalculateCAFingerprint( 406 static SHA1HashValue CalculateCAFingerprint(
403 const OSCertHandles& intermediates); 407 const OSCertHandles& intermediates);
404 408
405 // Calculates the SHA-256 fingerprint of the intermediate CA certificates. 409 // Calculates the SHA-256 fingerprint of the intermediate CA certificates.
406 // Returns an empty (all zero) fingerprint on failure. 410 // Returns an empty (all zero) fingerprint on failure.
407 // 411 //
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
510 // based on the type of the certificate. 514 // based on the type of the certificate.
511 std::string default_nickname_; 515 std::string default_nickname_;
512 #endif 516 #endif
513 517
514 DISALLOW_COPY_AND_ASSIGN(X509Certificate); 518 DISALLOW_COPY_AND_ASSIGN(X509Certificate);
515 }; 519 };
516 520
517 } // namespace net 521 } // namespace net
518 522
519 #endif // NET_CERT_X509_CERTIFICATE_H_ 523 #endif // NET_CERT_X509_CERTIFICATE_H_
OLDNEW
« no previous file with comments | « net/cert/ct_ev_whitelist_unittest.cc ('k') | net/cert/x509_certificate_ios.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698