mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-27 11:48:59 +00:00
LibCrypto: Move OpenSSL RAII helper methods out of line
This commit is contained in:
parent
977af95b5b
commit
559c5a7311
Notes:
github-actions[bot]
2025-01-13 16:02:04 +00:00
Author: https://github.com/devgianlu
Commit: 559c5a7311
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3234
2 changed files with 20 additions and 12 deletions
|
@ -88,20 +88,14 @@ class OpenSSL_BN {
|
|||
OPENSSL_WRAPPER_CLASS(OpenSSL_BN, BIGNUM, BN);
|
||||
|
||||
public:
|
||||
static ErrorOr<OpenSSL_BN> create()
|
||||
{
|
||||
return OpenSSL_BN(OPENSSL_TRY_PTR(BN_new()));
|
||||
}
|
||||
static ErrorOr<OpenSSL_BN> create();
|
||||
};
|
||||
|
||||
class OpenSSL_PKEY {
|
||||
OPENSSL_WRAPPER_CLASS(OpenSSL_PKEY, EVP_PKEY, EVP_PKEY);
|
||||
|
||||
public:
|
||||
static ErrorOr<OpenSSL_PKEY> create()
|
||||
{
|
||||
return OpenSSL_PKEY(OPENSSL_TRY_PTR(EVP_PKEY_new()));
|
||||
}
|
||||
static ErrorOr<OpenSSL_PKEY> create();
|
||||
};
|
||||
|
||||
class OpenSSL_PKEY_CTX {
|
||||
|
@ -112,10 +106,7 @@ class OpenSSL_MD_CTX {
|
|||
OPENSSL_WRAPPER_CLASS(OpenSSL_MD_CTX, EVP_MD_CTX, EVP_MD_CTX);
|
||||
|
||||
public:
|
||||
static ErrorOr<OpenSSL_MD_CTX> create()
|
||||
{
|
||||
return OpenSSL_MD_CTX(OPENSSL_TRY_PTR(EVP_MD_CTX_new()));
|
||||
}
|
||||
static ErrorOr<OpenSSL_MD_CTX> create();
|
||||
};
|
||||
|
||||
#undef OPENSSL_WRAPPER_CLASS
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue