OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef NET_CERT_INTERNAL_VERIFY_SIGNED_DATA_H_ | |
6 #define NET_CERT_INTERNAL_VERIFY_SIGNED_DATA_H_ | |
7 | |
8 #include "base/compiler_specific.h" | |
9 #include "net/base/net_export.h" | |
10 | |
11 namespace net { | |
12 | |
13 namespace der { | |
14 class Input; | |
15 } // namespace der | |
16 | |
17 class SignatureAlgorithm; | |
18 | |
19 // Verifies that |signature_value| is a valid signature of |signed_data| using | |
20 // the algorithm |signature_algorithm| and the public key |public_key|. | |
21 // | |
22 // |signature_algorithm| - The parsed AlgorithmIdentifier | |
23 // |signed_data| - The blob of data to verify | |
24 // |signature_value_bit_string| - The DER-encoded BIT STRING representing the | |
davidben
2015/07/22 17:20:47
Maybe s/BIT STRING/BIT STRING (contents|element)/
eroman
2015/07/22 17:46:10
Regenerating the test data for signature is not a
davidben
2015/07/22 17:49:40
Oh, good point about all the other inputs. Full el
| |
25 // signature's value (to be interpreted according to the signature | |
26 // algorithm). | |
27 // |public_key| - A DER-encoded SubjectPublicKeyInfo. | |
28 // | |
29 // Returns true if verification was successful. | |
30 NET_EXPORT bool VerifySignedData(const SignatureAlgorithm& signature_algorithm, | |
31 const der::Input& signed_data, | |
32 const der::Input& signature_value_bit_string, | |
33 const der::Input& public_key) | |
34 WARN_UNUSED_RESULT; | |
35 | |
36 } // namespace net | |
37 | |
38 #endif // NET_CERT_INTERNAL_VERIFY_SIGNED_DATA_H_ | |
OLD | NEW |