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

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

Issue 7792023: Merge 98741 to 782: Mark DigiNotar as untrusted (Closed) Base URL: svn://svn.chromium.org/chrome/branches/782/src
Patch Set: Created 9 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 | Annotate | Revision Log
« no previous file with comments | « net/base/ev_root_ca_metadata.cc ('k') | net/base/x509_certificate.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_BASE_X509_CERTIFICATE_H_ 5 #ifndef NET_BASE_X509_CERTIFICATE_H_
6 #define NET_BASE_X509_CERTIFICATE_H_ 6 #define NET_BASE_X509_CERTIFICATE_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string.h> 9 #include <string.h>
10 10
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 // NOTE: keep this method private, used by IsBlacklisted only. To simplify 397 // NOTE: keep this method private, used by IsBlacklisted only. To simplify
398 // IsBlacklisted, we strip the leading 0 byte of a serial number, used to 398 // IsBlacklisted, we strip the leading 0 byte of a serial number, used to
399 // encode a positive DER INTEGER (a signed type) with a most significant bit 399 // encode a positive DER INTEGER (a signed type) with a most significant bit
400 // of 1. Other code must not use this method for general purpose until this 400 // of 1. Other code must not use this method for general purpose until this
401 // is fixed. 401 // is fixed.
402 const std::string& serial_number() const { return serial_number_; } 402 const std::string& serial_number() const { return serial_number_; }
403 403
404 // IsBlacklisted returns true if this certificate is explicitly blacklisted. 404 // IsBlacklisted returns true if this certificate is explicitly blacklisted.
405 bool IsBlacklisted() const; 405 bool IsBlacklisted() const;
406 406
407 // IsPublicKeyBlacklisted returns true iff one of |public_key_hashes| (which
408 // are SHA1 hashes of SubjectPublicKeyInfo structures) is explicitly blocked.
409 static bool IsPublicKeyBlacklisted(
410 const std::vector<SHA1Fingerprint>& public_key_hashes);
411
407 // IsSHA1HashInSortedArray returns true iff |hash| is in |array|, a sorted 412 // IsSHA1HashInSortedArray returns true iff |hash| is in |array|, a sorted
408 // array of SHA1 hashes. 413 // array of SHA1 hashes.
409 static bool IsSHA1HashInSortedArray(const SHA1Fingerprint& hash, 414 static bool IsSHA1HashInSortedArray(const SHA1Fingerprint& hash,
410 const uint8* array, 415 const uint8* array,
411 size_t array_byte_len); 416 size_t array_byte_len);
412 417
413 // Reads a single certificate from |pickle| and returns a platform-specific 418 // Reads a single certificate from |pickle| and returns a platform-specific
414 // certificate handle. The format of the certificate stored in |pickle| is 419 // certificate handle. The format of the certificate stored in |pickle| is
415 // not guaranteed to be the same across different underlying cryptographic 420 // not guaranteed to be the same across different underlying cryptographic
416 // libraries, nor acceptable to CreateFromBytes(). Returns an invalid 421 // libraries, nor acceptable to CreateFromBytes(). Returns an invalid
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 459
455 // Where the certificate comes from. 460 // Where the certificate comes from.
456 Source source_; 461 Source source_;
457 462
458 DISALLOW_COPY_AND_ASSIGN(X509Certificate); 463 DISALLOW_COPY_AND_ASSIGN(X509Certificate);
459 }; 464 };
460 465
461 } // namespace net 466 } // namespace net
462 467
463 #endif // NET_BASE_X509_CERTIFICATE_H_ 468 #endif // NET_BASE_X509_CERTIFICATE_H_
OLDNEW
« no previous file with comments | « net/base/ev_root_ca_metadata.cc ('k') | net/base/x509_certificate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698