| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_BASE_X509_CERTIFICATE_H_ | 5 #ifndef NET_BASE_X509_CERTIFICATE_H_ |
| 6 #define NET_BASE_X509_CERTIFICATE_H_ | 6 #define NET_BASE_X509_CERTIFICATE_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 | 103 |
| 104 // Returns the judgment this policy makes about this certificate. | 104 // Returns the judgment this policy makes about this certificate. |
| 105 Judgment Check(X509Certificate* cert) const; | 105 Judgment Check(X509Certificate* cert) const; |
| 106 | 106 |
| 107 // Causes the policy to allow this certificate. | 107 // Causes the policy to allow this certificate. |
| 108 void Allow(X509Certificate* cert); | 108 void Allow(X509Certificate* cert); |
| 109 | 109 |
| 110 // Causes the policy to deny this certificate. | 110 // Causes the policy to deny this certificate. |
| 111 void Deny(X509Certificate* cert); | 111 void Deny(X509Certificate* cert); |
| 112 | 112 |
| 113 // Returns true if this policy has allowed at least one certificate. |
| 114 bool HasAllowedCert() const; |
| 115 |
| 116 // Returns true if this policy has denied at least one certificate. |
| 117 bool HasDeniedCert() const; |
| 118 |
| 113 private: | 119 private: |
| 114 // The set of fingerprints of allowed certificates. | 120 // The set of fingerprints of allowed certificates. |
| 115 std::set<Fingerprint, FingerprintLessThan> allowed_; | 121 std::set<Fingerprint, FingerprintLessThan> allowed_; |
| 116 | 122 |
| 117 // The set of fingerprints of denied certificates. | 123 // The set of fingerprints of denied certificates. |
| 118 std::set<Fingerprint, FingerprintLessThan> denied_; | 124 std::set<Fingerprint, FingerprintLessThan> denied_; |
| 119 }; | 125 }; |
| 120 | 126 |
| 121 // Where the certificate comes from. The enumeration constants are | 127 // Where the certificate comes from. The enumeration constants are |
| 122 // listed in increasing order of preference. | 128 // listed in increasing order of preference. |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 | 290 |
| 285 // Where the certificate comes from. | 291 // Where the certificate comes from. |
| 286 Source source_; | 292 Source source_; |
| 287 | 293 |
| 288 DISALLOW_COPY_AND_ASSIGN(X509Certificate); | 294 DISALLOW_COPY_AND_ASSIGN(X509Certificate); |
| 289 }; | 295 }; |
| 290 | 296 |
| 291 } // namespace net | 297 } // namespace net |
| 292 | 298 |
| 293 #endif // NET_BASE_X509_CERTIFICATE_H_ | 299 #endif // NET_BASE_X509_CERTIFICATE_H_ |
| OLD | NEW |