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.
5 #ifndef NET_CERT_INTERNAL_VERIFY_SIGNED_DATA_H_
6 #define NET_CERT_INTERNAL_VERIFY_SIGNED_DATA_H_
8 #include "base/compiler_specific.h"
9 #include "net/base/net_export.h"
18 class SignatureAlgorithm
;
20 // Verifies that |signature_value| is a valid signature of |signed_data| using
21 // the algorithm |signature_algorithm| and the public key |public_key|.
23 // |signature_algorithm| - The parsed AlgorithmIdentifier
24 // |signed_data| - The blob of data to verify
25 // |signature_value| - The BIT STRING for the signature's value
26 // |public_key| - A DER-encoded SubjectPublicKeyInfo.
28 // Returns true if verification was successful.
29 NET_EXPORT
bool VerifySignedData(const SignatureAlgorithm
& signature_algorithm
,
30 const der::Input
& signed_data
,
31 const der::BitString
& signature_value
,
32 const der::Input
& public_key
)
37 #endif // NET_CERT_INTERNAL_VERIFY_SIGNED_DATA_H_