OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef NET_CERT_CERT_VERIFY_PROC_CHROMEOS_H_ | |
6 #define NET_CERT_CERT_VERIFY_PROC_CHROMEOS_H_ | |
7 | |
8 #include "crypto/scoped_nss_types.h" | |
9 #include "net/base/net_export.h" | |
10 #include "net/cert/cert_verify_proc_nss.h" | |
11 #include "net/cert/nss_profile_filter_chromeos.h" | |
12 | |
13 namespace net { | |
14 | |
15 // Wrapper around CertVerifyProcNSS which allows filtering trust decisions on a | |
16 // per-user basis. Unlike the other CertVerifyProc implementations, this one is | |
17 // publicly exported, as the browser will need to create one for each profile. | |
18 // | |
19 // Note that only the simple case is currently handled (if a profile adds a new | |
20 // trust root, that root should not be trusted by other profiles). More | |
21 // complicated cases are not handled (like two profiles adding the same root | |
22 // cert but with different trust values). | |
Ryan Sleevi
2014/01/22 00:43:48
The whole discussion of "profiles" is certainly so
mattm
2014/01/24 04:47:31
If it's defined in chrome/, we couldn't have CertV
Ryan Sleevi
2014/01/25 01:50:17
I don't understand why this is an issue. It still
mattm
2014/01/28 04:36:43
Done.
guess I was worried about the number of plac
Ryan Sleevi
2014/01/30 05:27:39
Nothing outside of unit tests, the net::URLRequest
| |
23 class NET_EXPORT CertVerifyProcChromeOS : public CertVerifyProcNSS { | |
24 public: | |
25 // Creates a CertVerifyProc that doesn't allow any user-provided trust roots. | |
26 CertVerifyProcChromeOS(); | |
27 | |
28 // Creates a CertVerifyProc that doesn't allow trust roots provided by | |
29 // users other than the specified slot. | |
30 CertVerifyProcChromeOS(crypto::ScopedPK11Slot public_slot, | |
31 crypto::ScopedPK11Slot private_slot); | |
32 | |
33 protected: | |
34 virtual ~CertVerifyProcChromeOS(); | |
35 | |
36 private: | |
37 CERTChainVerifyCallback* InitializeCERTChainVerifyCallback(); | |
38 | |
39 static SECStatus IsChainValidFunc(void* is_chain_valid_arg, | |
40 const CERTCertList* current_chain, | |
41 PRBool* chain_ok); | |
42 | |
43 // A pointer to this object is passed to CertVerifyProcNSS. | |
44 CERTChainVerifyCallback chain_verify_callback_; | |
45 | |
46 NSSProfileFilterChromeOS profile_filter_; | |
47 }; | |
48 | |
49 } // namespace net | |
50 | |
51 #endif // NET_CERT_CERT_VERIFY_PROC_CHROMEOS_H_ | |
52 | |
OLD | NEW |