#ifndef BSSL_PKI_VERIFY_SIGNED_DATA_H_
#define BSSL_PKI_VERIFY_SIGNED_DATA_H_
#include <openssl/base.h>
#include <openssl/evp.h>
#include <openssl/pki/signature_verify_cache.h>
#include "signature_algorithm.h"
BSSL_NAMESPACE_BEGIN
namespace der {
class BitString;
class Input;
}
[[nodiscard]] OPENSSL_EXPORT bool VerifySignedData(
SignatureAlgorithm algorithm, der::Input signed_data,
const der::BitString &signature_value, EVP_PKEY *public_key,
SignatureVerifyCache *cache);
[[nodiscard]] OPENSSL_EXPORT bool VerifySignedData(
SignatureAlgorithm algorithm, der::Input signed_data,
const der::BitString &signature_value, der::Input public_key_spki,
SignatureVerifyCache *cache);
[[nodiscard]] OPENSSL_EXPORT bool ParsePublicKey(
der::Input public_key_spki, bssl::UniquePtr<EVP_PKEY> *public_key);
BSSL_NAMESPACE_END
#endif