OLD | NEW |
---|---|
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_CERT_VERIFY_PROC_NSS_H_ | 5 #ifndef NET_CERT_CERT_VERIFY_PROC_NSS_H_ |
6 #define NET_CERT_CERT_VERIFY_PROC_NSS_H_ | 6 #define NET_CERT_CERT_VERIFY_PROC_NSS_H_ |
7 | 7 |
8 #include <certt.h> | |
9 | |
8 #include "net/base/net_export.h" | 10 #include "net/base/net_export.h" |
9 #include "net/cert/cert_verify_proc.h" | 11 #include "net/cert/cert_verify_proc.h" |
10 | 12 |
11 namespace net { | 13 namespace net { |
12 | 14 |
13 // Performs certificate path construction and validation using NSS's libpkix. | 15 // Performs certificate path construction and validation using NSS's libpkix. |
14 class NET_EXPORT_PRIVATE CertVerifyProcNSS : public CertVerifyProc { | 16 class NET_EXPORT_PRIVATE CertVerifyProcNSS : public CertVerifyProc { |
15 public: | 17 public: |
16 CertVerifyProcNSS(); | 18 CertVerifyProcNSS(); |
17 | 19 |
18 virtual bool SupportsAdditionalTrustAnchors() const OVERRIDE; | 20 virtual bool SupportsAdditionalTrustAnchors() const OVERRIDE; |
19 | 21 |
20 protected: | 22 protected: |
21 virtual ~CertVerifyProcNSS(); | 23 virtual ~CertVerifyProcNSS(); |
22 | 24 |
25 // Like VerifyInternal, but adds a |chain_verify_callback| to override trust | |
26 // decisions. See the documentation for CERTChainVerifyCallback and | |
27 // CERTChainVerifyCallbackFunc in NSS's lib/certdb/certt.h. | |
28 int VerifyInternalNSS(X509Certificate* cert, | |
Ryan Sleevi
2014/01/30 05:27:40
VerifyInternalImpl ?
mattm
2014/02/04 05:31:21
Done.
| |
29 const std::string& hostname, | |
30 int flags, | |
31 CRLSet* crl_set, | |
32 const CertificateList& additional_trust_anchors, | |
33 CERTChainVerifyCallback* chain_verify_callback, | |
34 CertVerifyResult* verify_result); | |
35 | |
23 private: | 36 private: |
24 virtual int VerifyInternal(X509Certificate* cert, | 37 virtual int VerifyInternal(X509Certificate* cert, |
25 const std::string& hostname, | 38 const std::string& hostname, |
26 int flags, | 39 int flags, |
27 CRLSet* crl_set, | 40 CRLSet* crl_set, |
28 const CertificateList& additional_trust_anchors, | 41 const CertificateList& additional_trust_anchors, |
29 CertVerifyResult* verify_result) OVERRIDE; | 42 CertVerifyResult* verify_result) OVERRIDE; |
30 }; | 43 }; |
31 | 44 |
32 } // namespace net | 45 } // namespace net |
33 | 46 |
34 #endif // NET_CERT_CERT_VERIFY_PROC_NSS_H_ | 47 #endif // NET_CERT_CERT_VERIFY_PROC_NSS_H_ |
OLD | NEW |