LibCrypto: Make RSA class easily configurable

This is a small change to allow subclasses of `RSA` to configure the
`EVP_PKEY_CTX` without rewriting everything.
This commit is contained in:
devgianlu 2024-12-25 22:24:14 +01:00 committed by Ali Mohammad Pur
commit 6e721110f9
Notes: github-actions[bot] 2025-01-13 16:01:42 +00:00
2 changed files with 10 additions and 2 deletions

View file

@ -222,6 +222,8 @@ public:
void set_private_key(PrivateKeyType const& key) { m_private_key = key; }
protected:
virtual ErrorOr<void> configure(OpenSSL_PKEY_CTX& ctx);
static ErrorOr<OpenSSL_PKEY> public_key_to_openssl_pkey(PublicKeyType const& public_key);
static ErrorOr<OpenSSL_PKEY> private_key_to_openssl_pkey(PrivateKeyType const& private_key);
};