Chromium Code Reviews| Index: net/cert/cert_verifier.h |
| diff --git a/net/cert/cert_verifier.h b/net/cert/cert_verifier.h |
| index 26ee988355ae96bf8e4b71f7e726e12d2b72e34c..3f6c9d05066e65689d431081ae6bf771079b22c7 100644 |
| --- a/net/cert/cert_verifier.h |
| +++ b/net/cert/cert_verifier.h |
| @@ -7,17 +7,19 @@ |
| #include <memory> |
| #include <string> |
| +#include <vector> |
| #include "base/macros.h" |
| #include "net/base/completion_callback.h" |
| +#include "net/base/hash_value.h" |
| #include "net/base/net_export.h" |
| +#include "net/cert/x509_certificate.h" |
| namespace net { |
| class BoundNetLog; |
| class CertVerifyResult; |
| class CRLSet; |
| -class X509Certificate; |
| // CertVerifier represents a service for verifying certificates. |
| // |
| @@ -74,6 +76,32 @@ class NET_EXPORT CertVerifier { |
| VERIFY_REV_CHECKING_REQUIRED_LOCAL_ANCHORS = 1 << 4, |
| }; |
| + // The parameters for doing a Verify(). |certificate|, |hostname|, and |
| + // |flags| are required. The rest are optional. |
|
eroman
2016/05/18 01:43:18
Are you going to move documentation for the variou
Ryan Sleevi
2016/05/18 02:02:02
Yes, when updating Verify() to use this.
|
| + class RequestParams { |
| + public: |
| + RequestParams(X509Certificate* certificate, |
| + const std::string& hostname, |
| + int flags, |
| + const std::string& ocsp_response, |
| + const CertificateList& additional_trust_anchors); |
| + RequestParams(const RequestParams& other); |
| + ~RequestParams(); |
| + |
| + const std::string& hostname() const { return hostname_; } |
| + int flags() const { return flags_; } |
| + const std::vector<SHA1HashValue> request_data() const { |
| + return request_data_; |
| + } |
| + |
| + bool operator<(const RequestParams& other) const; |
| + |
| + private: |
| + std::string hostname_; |
| + int flags_; |
| + std::vector<SHA1HashValue> request_data_; |
|
eroman
2016/05/18 01:43:18
Can you speak to the design choice of using a vect
Ryan Sleevi
2016/05/18 02:02:02
While I appreciate all of this feedback, I don't t
eroman
2016/05/18 02:06:43
OK, we can discuss that separately.
|
| + }; |
| + |
| // When the verifier is destroyed, all certificate verification requests are |
| // canceled, and their completion callbacks will not be called. |
| virtual ~CertVerifier() {} |
| @@ -113,7 +141,7 @@ class NET_EXPORT CertVerifier { |
| // nullptr. However it is not guaranteed that all implementations will reset |
| // it in this case. |
| // |
| - // TODO(rsleevi): Move CRLSet* out of the CertVerifier signature. |
| + // TODO(rsleevi): Update this to use RequestParams as part of the signature. |
| virtual int Verify(X509Certificate* cert, |
| const std::string& hostname, |
| const std::string& ocsp_response, |