CCF
|
#include <verifier.h>
Inherited by ccf::crypto::Verifier_OpenSSL.
Public Member Functions | |
Verifier () | |
virtual | ~Verifier () |
virtual std::vector< uint8_t > | cert_der ()=0 |
virtual Pem | cert_pem ()=0 |
virtual bool | verify (const uint8_t *contents, size_t contents_size, const uint8_t *sig, size_t sig_size, MDType md_type=MDType::NONE) const |
virtual bool | verify (std::span< const uint8_t > contents, std::span< const uint8_t > sig, MDType md_type=MDType::NONE) const |
virtual bool | verify (const uint8_t *contents, size_t contents_size, const uint8_t *sig, size_t sig_size, MDType md_type, HashBytes &hash_bytes) const |
virtual bool | verify (const std::vector< uint8_t > &contents, const std::vector< uint8_t > &signature, MDType md_type=MDType::NONE) const |
virtual bool | verify (const std::vector< uint8_t > &contents, const std::vector< uint8_t > &signature, MDType md_type, HashBytes &hash_bytes) const |
virtual bool | verify_hash (const uint8_t *hash, size_t hash_size, const uint8_t *sig, size_t sig_size, MDType md_type=MDType::NONE) |
virtual bool | verify_hash (const std::vector< uint8_t > &hash, const std::vector< uint8_t > &signature, MDType md_type=MDType::NONE) |
template<size_t SIZE> | |
bool | verify_hash (const std::array< uint8_t, SIZE > &hash, const std::vector< uint8_t > &signature, MDType md_type=MDType::NONE) |
virtual Pem | public_key_pem () const |
virtual std::vector< uint8_t > | public_key_der () const |
virtual bool | verify_certificate (const std::vector< const Pem * > &trusted_certs, const std::vector< const Pem * > &chain={}, bool ignore_time=false)=0 |
virtual bool | is_self_signed () const =0 |
virtual std::string | serial_number () const =0 |
virtual std::pair< std::string, std::string > | validity_period () const =0 |
virtual size_t | remaining_seconds (const std::chrono::system_clock::time_point &now) const =0 |
virtual double | remaining_percentage (const std::chrono::system_clock::time_point &now) const =0 |
virtual std::string | subject () const =0 |
virtual JsonWebKeyECPublic | public_key_jwk (const std::optional< std::string > &kid=std::nullopt) const |
Protected Attributes | |
std::shared_ptr< PublicKey > | public_key |
|
inline |
|
inlinevirtual |
|
pure virtual |
Implemented in ccf::crypto::Verifier_OpenSSL.
|
pure virtual |
Implemented in ccf::crypto::Verifier_OpenSSL.
|
pure virtual |
Indicates whether the certificate (held intenally) is self-signed
Implemented in ccf::crypto::Verifier_OpenSSL.
|
inlinevirtual |
Extract the public key of the certificate in DER format
|
inlinevirtual |
|
inlinevirtual |
Extract the public key of the certificate in PEM format
|
pure virtual |
The percentage of the validity period of the certificate remaining
Implemented in ccf::crypto::Verifier_OpenSSL.
|
pure virtual |
The number of seconds of the validity period of the certificate remaining
Implemented in ccf::crypto::Verifier_OpenSSL.
|
pure virtual |
The serial number of the certificate
Implemented in ccf::crypto::Verifier_OpenSSL.
|
pure virtual |
The subject name of the certificate
Implemented in ccf::crypto::Verifier_OpenSSL.
|
pure virtual |
The validity period of the certificate
Implemented in ccf::crypto::Verifier_OpenSSL.
|
inlinevirtual |
Verify a signature
contents | Contents over which the signature was generated |
signature | Signature |
md_type | Hash algorithm |
hash_bytes | Output buffer for the hash |
|
inlinevirtual |
Verify a signature
contents | Contents over which the signature was generated |
signature | Signature |
md_type | Hash algorithm |
|
inlinevirtual |
Verify a signature
contents | Contents over which the signature was generated |
contents_size | Size of contents |
sig | Signature |
sig_size | Size of sig |
md_type | Hash algorithm |
hash_bytes | Output buffer for the hash |
|
inlinevirtual |
Verify a signature
contents | Contents over which the signature was generated |
contents_size | Size of contents |
sig | Signature |
sig_size | Size of sig |
md_type | Hash algorithm |
|
inlinevirtual |
Verify a signature
contents | Contents over which the signature was generated |
sig | Signature |
md_type | Hash algorithm |
|
pure virtual |
Verify the certificate (held internally)
trusted_certs | Vector of trusted certificates |
chain | Vector of ordered untrusted certificates used to build a chain to trusted certificates |
ignore_time | Flag to disable certificate expiry checks |
Implemented in ccf::crypto::Verifier_OpenSSL.
|
inline |
Verify a signature over a hash
hash | Hash over which the signature was generated |
signature | Signature |
md_type | Hash algorithm |
|
inlinevirtual |
Verify a signature over a hash
hash | Hash over which the signature was generated |
signature | Signature |
md_type | Hash algorithm |
|
inlinevirtual |
Verify a signature over a hash
hash | Hash over which the signature was generated |
hash_size | Size of hash |
sig | Signature |
sig_size | Size of sig |
md_type | Hash algorithm |
|
protected |