OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 IOS_WEB_PUBLIC_CERT_POLICY_H_ | 5 #ifndef IOS_WEB_PUBLIC_CERT_POLICY_H_ |
6 #define IOS_WEB_PUBLIC_CERT_POLICY_H_ | 6 #define IOS_WEB_PUBLIC_CERT_POLICY_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "net/base/hash_value.h" | 10 #include "net/base/hash_value.h" |
(...skipping 28 matching lines...) Expand all Loading... |
39 // For a certificate to be allowed, it must not have any *additional* errors | 39 // For a certificate to be allowed, it must not have any *additional* errors |
40 // from when it was allowed. | 40 // from when it was allowed. |
41 // This function returns either ALLOWED or UNKNOWN, but never DENIED. | 41 // This function returns either ALLOWED or UNKNOWN, but never DENIED. |
42 Judgment Check(net::X509Certificate* cert, net::CertStatus error) const; | 42 Judgment Check(net::X509Certificate* cert, net::CertStatus error) const; |
43 | 43 |
44 // Causes the policy to allow this certificate for a given |error|. | 44 // Causes the policy to allow this certificate for a given |error|. |
45 void Allow(net::X509Certificate* cert, net::CertStatus error); | 45 void Allow(net::X509Certificate* cert, net::CertStatus error); |
46 | 46 |
47 private: | 47 private: |
48 // The set of fingerprints of allowed certificates. | 48 // The set of fingerprints of allowed certificates. |
49 std::map<net::SHA1HashValue, net::CertStatus, net::SHA1HashValueLessThan> | 49 std::map<net::SHA256HashValue, net::CertStatus, net::SHA256HashValueLessThan> |
50 allowed_; | 50 allowed_; |
51 }; | 51 }; |
52 | 52 |
53 } // namespace web | 53 } // namespace web |
54 | 54 |
55 #endif // IOS_WEB_PUBLIC_CERT_POLICY_H_ | 55 #endif // IOS_WEB_PUBLIC_CERT_POLICY_H_ |
OLD | NEW |