| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #include "net/cert/internal/signature_policy.h" | 5 #include "net/cert/internal/signature_policy.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "net/cert/internal/cert_error_params.h" | 8 #include "net/cert/internal/cert_error_params.h" |
| 9 #include "net/cert/internal/cert_errors.h" | 9 #include "net/cert/internal/cert_errors.h" |
| 10 #include "third_party/boringssl/src/include/openssl/obj.h" | 10 #include "third_party/boringssl/src/include/openssl/nid.h" |
| 11 | 11 |
| 12 namespace net { | 12 namespace net { |
| 13 | 13 |
| 14 DEFINE_CERT_ERROR_ID(kRsaModulusTooSmall, "RSA modulus too small"); | 14 DEFINE_CERT_ERROR_ID(kRsaModulusTooSmall, "RSA modulus too small"); |
| 15 | 15 |
| 16 namespace { | 16 namespace { |
| 17 | 17 |
| 18 DEFINE_CERT_ERROR_ID(kUnacceptableCurveForEcdsa, | 18 DEFINE_CERT_ERROR_ID(kUnacceptableCurveForEcdsa, |
| 19 "Only P-256, P-384, P-521 are supported for ECDSA"); | 19 "Only P-256, P-384, P-521 are supported for ECDSA"); |
| 20 | 20 |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 : min_rsa_modulus_length_bits_(min_rsa_modulus_length_bits) {} | 101 : min_rsa_modulus_length_bits_(min_rsa_modulus_length_bits) {} |
| 102 | 102 |
| 103 bool SimpleSignaturePolicy::IsAcceptableModulusLengthForRsa( | 103 bool SimpleSignaturePolicy::IsAcceptableModulusLengthForRsa( |
| 104 size_t modulus_length_bits, | 104 size_t modulus_length_bits, |
| 105 CertErrors* errors) const { | 105 CertErrors* errors) const { |
| 106 return IsModulusSizeGreaterOrEqual(modulus_length_bits, | 106 return IsModulusSizeGreaterOrEqual(modulus_length_bits, |
| 107 min_rsa_modulus_length_bits_, errors); | 107 min_rsa_modulus_length_bits_, errors); |
| 108 } | 108 } |
| 109 | 109 |
| 110 } // namespace net | 110 } // namespace net |
| OLD | NEW |