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

Side by Side Diff: net/cert/internal/signature_policy.h

Issue 2755483008: Add initial CertVerifyProcBuiltin. (Closed)
Patch Set: type notimplemented properly Created 3 years, 9 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
« no previous file with comments | « net/cert/internal/path_builder.h ('k') | net/cert/internal/signature_policy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef NET_CERT_INTERNAL_SIGNATURE_POLICY_H_ 5 #ifndef NET_CERT_INTERNAL_SIGNATURE_POLICY_H_
6 #define NET_CERT_INTERNAL_SIGNATURE_POLICY_H_ 6 #define NET_CERT_INTERNAL_SIGNATURE_POLICY_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "net/base/net_export.h" 11 #include "net/base/net_export.h"
12 #include "net/cert/internal/cert_errors.h"
12 #include "net/cert/internal/signature_algorithm.h" 13 #include "net/cert/internal/signature_algorithm.h"
13 14
14 namespace net { 15 namespace net {
15 16
16 class CertErrors; 17 class CertErrors;
17 class SignatureAlgorithm; 18 class SignatureAlgorithm;
18 19
19 // SignaturePolicy is an interface (and base implementation) for applying 20 // SignaturePolicy is an interface (and base implementation) for applying
20 // policies when verifying signed data. It lets callers override which 21 // policies when verifying signed data. It lets callers override which
21 // algorithms, named curves, and key sizes to allow. 22 // algorithms, named curves, and key sizes to allow.
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 public: 55 public:
55 explicit SimpleSignaturePolicy(size_t min_rsa_modulus_length_bits); 56 explicit SimpleSignaturePolicy(size_t min_rsa_modulus_length_bits);
56 57
57 bool IsAcceptableModulusLengthForRsa(size_t modulus_length_bits, 58 bool IsAcceptableModulusLengthForRsa(size_t modulus_length_bits,
58 CertErrors* errors) const override; 59 CertErrors* errors) const override;
59 60
60 private: 61 private:
61 const size_t min_rsa_modulus_length_bits_; 62 const size_t min_rsa_modulus_length_bits_;
62 }; 63 };
63 64
65 // TODO(crbug.com/634443): Move exported errors to a central location?
66 extern CertErrorId kRsaModulusTooSmall;
67
64 } // namespace net 68 } // namespace net
65 69
66 #endif // NET_CERT_INTERNAL_SIGNATURE_POLICY_H_ 70 #endif // NET_CERT_INTERNAL_SIGNATURE_POLICY_H_
OLDNEW
« no previous file with comments | « net/cert/internal/path_builder.h ('k') | net/cert/internal/signature_policy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698