diff options
author | ouwou <26526779+ouwou@users.noreply.github.com> | 2023-07-17 21:37:24 -0400 |
---|---|---|
committer | ouwou <26526779+ouwou@users.noreply.github.com> | 2023-07-17 21:37:24 -0400 |
commit | d04e101800c451c4963a530b7cf745666105cec4 (patch) | |
tree | d73fdf97b00d8f40d8888de762574a424df435eb /src/remoteauth/ssl.hpp | |
parent | 0f3814586e3949d1a7fc15bfc2aff2b99d4975a8 (diff) | |
parent | 857e94af3817932b78963873fb5621ae3c4596f7 (diff) | |
download | abaddon-portaudio-d04e101800c451c4963a530b7cf745666105cec4.tar.gz abaddon-portaudio-d04e101800c451c4963a530b7cf745666105cec4.zip |
Merge branch 'master' into rnnoise
Diffstat (limited to 'src/remoteauth/ssl.hpp')
-rw-r--r-- | src/remoteauth/ssl.hpp | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/remoteauth/ssl.hpp b/src/remoteauth/ssl.hpp new file mode 100644 index 0000000..1753bd3 --- /dev/null +++ b/src/remoteauth/ssl.hpp @@ -0,0 +1,31 @@ +#pragma once +#include <memory> +#include <openssl/bio.h> +#include <openssl/evp.h> +#include <openssl/pem.h> +#include <openssl/rsa.h> +#include <openssl/sha.h> + +struct EVP_PKEY_CTX_deleter { + void operator()(EVP_PKEY_CTX *ptr) const { + EVP_PKEY_CTX_free(ptr); + } +}; + +struct EVP_PKEY_deleter { + void operator()(EVP_PKEY *ptr) const { + EVP_PKEY_free(ptr); + } +}; + +struct EVP_MD_CTX_deleter { + void operator()(EVP_MD_CTX *ptr) const { + EVP_MD_CTX_free(ptr); + } +}; + +using EVP_PKEY_CTX_ptr = std::unique_ptr<EVP_PKEY_CTX, EVP_PKEY_CTX_deleter>; +using EVP_PKEY_ptr = std::unique_ptr<EVP_PKEY, EVP_PKEY_deleter>; +using EVP_MD_CTX_ptr = std::unique_ptr<EVP_MD_CTX, EVP_MD_CTX_deleter>; +using BIO_ptr = std::unique_ptr<BIO, decltype(&BIO_free)>; +using BUF_MEM_ptr = std::unique_ptr<BUF_MEM, decltype(&BUF_MEM_free)>; |