ipfs-chromium
Loading...
Searching...
No Matches
openssl_signature_verifier.h
1#ifndef IPFS_CHROMIUM_OPENSSL_SIGNATURE_VERIFIER_H
2#define IPFS_CHROMIUM_OPENSSL_SIGNATURE_VERIFIER_H
3
4#include "signature_verifier.h"
5
6#if __has_include(<openssl/evp.h>)
7#include <openssl/evp.h>
8#define HAS_OPENSSL_EVP 1
9#endif
10
11namespace ipfs::crypto {
12
13#if HAS_OPENSSL_EVP
14
15class OpensslSignatureVerifier : public SignatureVerifier {
16 int const openssl_key_type_;
17
18 public:
19 OpensslSignatureVerifier(int);
20 ~OpensslSignatureVerifier() noexcept override;
21
22 bool VerifySignature(ByteView signature,
23 ByteView data,
24 ByteView key) override;
25};
26
27#endif
28
29} // namespace ipfs::crypto
30
31#endif // IPFS_CHROMIUM_OPENSSL_SIGNATURE_VERIFIER_H