 Chromium Code Reviews
 Chromium Code Reviews Issue 2108833005:
  Adds domain names for all qualified CT logs  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master
    
  
    Issue 2108833005:
  Adds domain names for all qualified CT logs  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master| Index: net/cert/ct_log_verifier.h | 
| diff --git a/net/cert/ct_log_verifier.h b/net/cert/ct_log_verifier.h | 
| index fa5ba248b7d713388eea3c58c574c76c67dab956..5de63f3cb88db9a691c0a8a487e644f20a23e84b 100644 | 
| --- a/net/cert/ct_log_verifier.h | 
| +++ b/net/cert/ct_log_verifier.h | 
| @@ -40,10 +40,13 @@ class NET_EXPORT CTLogVerifier | 
| // using |public_key|, which is a DER-encoded SubjectPublicKeyInfo. | 
| // If |public_key| refers to an unsupported public key, returns NULL. | 
| // |description| is a textual description of the log. | 
| + // |url| is the URL of the log's HTTPS API endpoint. | 
| + // |dns_domain| is the DNS name of the log's DNS API endpoint, if one exists. | 
| static scoped_refptr<const CTLogVerifier> Create( | 
| const base::StringPiece& public_key, | 
| const base::StringPiece& description, | 
| - const base::StringPiece& url); | 
| + const base::StringPiece& url, | 
| + const base::StringPiece& dns_domain = nullptr); | 
| 
eroman
2016/07/16 00:14:28
Can you make this a required parameter?
 
Rob Percival
2016/07/18 09:52:28
Done.
 | 
| // Returns the log's key ID (RFC6962, Section 3.2) | 
| const std::string& key_id() const { return key_id_; } | 
| @@ -52,6 +55,11 @@ class NET_EXPORT CTLogVerifier | 
| // Returns the log's URL | 
| const GURL& url() const { return url_; } | 
| + // Returns the log's DNS domain for CT over DNS queries, as described in | 
| + // https://github.com/google/certificate-transparency-rfcs/blob/master/dns/draft-ct-over-dns.md. | 
| + // This will be empty if the log has no DNS API endpoint. | 
| + const std::string& dns_domain() const { return dns_domain_; } | 
| + | 
| // Verifies that |sct| is valid for |entry| and was signed by this log. | 
| bool Verify(const ct::LogEntry& entry, | 
| const ct::SignedCertificateTimestamp& sct) const; | 
| @@ -72,7 +80,9 @@ class NET_EXPORT CTLogVerifier | 
| FRIEND_TEST_ALL_PREFIXES(CTLogVerifierTest, VerifySignature); | 
| friend class base::RefCountedThreadSafe<CTLogVerifier>; | 
| - CTLogVerifier(const base::StringPiece& description, const GURL& url); | 
| + CTLogVerifier(const base::StringPiece& description, | 
| + const GURL& url, | 
| + const base::StringPiece& dns_domain); | 
| ~CTLogVerifier(); | 
| // Performs crypto-library specific initialization. | 
| @@ -91,6 +101,7 @@ class NET_EXPORT CTLogVerifier | 
| std::string key_id_; | 
| std::string description_; | 
| GURL url_; | 
| + std::string dns_domain_; | 
| ct::DigitallySigned::HashAlgorithm hash_algorithm_; | 
| ct::DigitallySigned::SignatureAlgorithm signature_algorithm_; |