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

Side by Side Diff: net/third_party/mozilla_security_manager/nsNSSCertTrust.h

Issue 9940001: Fix imported server certs being distrusted in NSS 3.13. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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
OLDNEW
1 /* ***** BEGIN LICENSE BLOCK ***** 1 /* ***** BEGIN LICENSE BLOCK *****
2 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 2 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
3 * 3 *
4 * The contents of this file are subject to the Mozilla Public License Version 4 * The contents of this file are subject to the Mozilla Public License Version
5 * 1.1 (the "License"); you may not use this file except in compliance with 5 * 1.1 (the "License"); you may not use this file except in compliance with
6 * the License. You may obtain a copy of the License at 6 * the License. You may obtain a copy of the License at
7 * http://www.mozilla.org/MPL/ 7 * http://www.mozilla.org/MPL/
8 * 8 *
9 * Software distributed under the License is distributed on an "AS IS" basis, 9 * Software distributed under the License is distributed on an "AS IS" basis,
10 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 10 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 nsNSSCertTrust(unsigned int ssl, unsigned int email, unsigned int objsign); 58 nsNSSCertTrust(unsigned int ssl, unsigned int email, unsigned int objsign);
59 nsNSSCertTrust(CERTCertTrust *t); 59 nsNSSCertTrust(CERTCertTrust *t);
60 virtual ~nsNSSCertTrust(); 60 virtual ~nsNSSCertTrust();
61 61
62 /* query */ 62 /* query */
63 PRBool HasAnyCA(); 63 PRBool HasAnyCA();
64 PRBool HasAnyUser(); 64 PRBool HasAnyUser();
65 PRBool HasCA(PRBool checkSSL = PR_TRUE, 65 PRBool HasCA(PRBool checkSSL = PR_TRUE,
66 PRBool checkEmail = PR_TRUE, 66 PRBool checkEmail = PR_TRUE,
67 PRBool checkObjSign = PR_TRUE); 67 PRBool checkObjSign = PR_TRUE);
68 PRBool HasPeer(PRBool checkSSL = PR_TRUE, 68 PRBool HasTerminalRecord(PRBool checkSSL = PR_TRUE,
wtc 2012/03/30 22:00:50 HasExplicitTrustOrDistrust may be a better name fo
69 PRBool checkEmail = PR_TRUE, 69 PRBool checkEmail = PR_TRUE,
70 PRBool checkObjSign = PR_TRUE); 70 PRBool checkObjSign = PR_TRUE);
Ryan Sleevi 2012/03/29 23:35:13 Is this our code or is this upstream? Does the li
wtc 2012/03/30 22:00:50 These files are our permanent fork of Mozilla's ce
71 PRBool HasUser(PRBool checkSSL = PR_TRUE, 71 PRBool HasUser(PRBool checkSSL = PR_TRUE,
72 PRBool checkEmail = PR_TRUE, 72 PRBool checkEmail = PR_TRUE,
73 PRBool checkObjSign = PR_TRUE); 73 PRBool checkObjSign = PR_TRUE);
74 PRBool HasTrustedCA(PRBool checkSSL = PR_TRUE, 74 PRBool HasTrustedCA(PRBool checkSSL = PR_TRUE,
75 PRBool checkEmail = PR_TRUE, 75 PRBool checkEmail = PR_TRUE,
76 PRBool checkObjSign = PR_TRUE); 76 PRBool checkObjSign = PR_TRUE);
77 PRBool HasTrustedPeer(PRBool checkSSL = PR_TRUE, 77 PRBool HasTrustedPeer(PRBool checkSSL = PR_TRUE,
78 PRBool checkEmail = PR_TRUE, 78 PRBool checkEmail = PR_TRUE,
79 PRBool checkObjSign = PR_TRUE); 79 PRBool checkObjSign = PR_TRUE);
80 80
81 /* common defaults */ 81 /* common defaults */
82 /* equivalent to "c,c,c" */ 82 /* equivalent to "c,c,c" */
83 void SetValidCA(); 83 void SetValidCA();
84 /* equivalent to "C,C,C" */ 84 /* equivalent to "C,C,C" */
85 void SetTrustedServerCA(); 85 void SetTrustedServerCA();
86 /* equivalent to "CT,CT,CT" */ 86 /* equivalent to "CT,CT,CT" */
87 void SetTrustedCA(); 87 void SetTrustedCA();
88 /* equivalent to "p,," */ 88 /* equivalent to "p,," */
89 void SetValidServerPeer(); 89 void SetTerminalServerRecord();
wtc 2012/03/30 22:00:50 This function should be named SetDistrustedServer.
mattm 2012/03/30 22:16:56 But a trusted server cert should have CERTDB_TRUST
wtc 2012/03/30 22:39:08 I see. Yes, that would make the code confusing.
90 /* equivalent to "p,p,p" */ 90 /* equivalent to "p,p,p" */
91 void SetValidPeer(); 91 void SetTerminalRecord();
wtc 2012/03/30 22:00:50 This should be named SetDistrustedCert.
92 /* equivalent to "P,P,P" */ 92 /* equivalent to "P,P,P" */
93 void SetTrustedPeer(); 93 void SetTrustedPeer();
wtc 2012/03/30 22:00:50 This should be named SetTrustedCert to avoid the u
94 /* equivalent to "u,u,u" */ 94 /* equivalent to "u,u,u" */
95 void SetUser(); 95 void SetUser();
96 96
97 /* general setters */ 97 /* general setters */
98 /* read: "p, P, c, C, T, u, w" */ 98 /* read: "p, P, c, C, T, u, w" */
99 void SetSSLTrust(PRBool peer, PRBool tPeer, 99 void SetSSLTrust(PRBool peer, PRBool tPeer,
100 PRBool ca, PRBool tCA, PRBool tClientCA, 100 PRBool ca, PRBool tCA, PRBool tClientCA,
101 PRBool user, PRBool warn); 101 PRBool user, PRBool warn);
102 102
103 void SetEmailTrust(PRBool peer, PRBool tPeer, 103 void SetEmailTrust(PRBool peer, PRBool tPeer,
(...skipping 15 matching lines...) Expand all
119 private: 119 private:
120 void addTrust(unsigned int *t, unsigned int v); 120 void addTrust(unsigned int *t, unsigned int v);
121 void removeTrust(unsigned int *t, unsigned int v); 121 void removeTrust(unsigned int *t, unsigned int v);
122 PRBool hasTrust(unsigned int t, unsigned int v); 122 PRBool hasTrust(unsigned int t, unsigned int v);
123 CERTCertTrust mTrust; 123 CERTCertTrust mTrust;
124 }; 124 };
125 125
126 } // namespace mozilla_security_manager 126 } // namespace mozilla_security_manager
127 127
128 #endif // NET_THIRD_PARTY_MOZILLA_SECURITY_MANAGER_NSNSSCERTTRUST_H_ 128 #endif // NET_THIRD_PARTY_MOZILLA_SECURITY_MANAGER_NSNSSCERTTRUST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698