summaryrefslogtreecommitdiff
path: root/src/remoteauth/ssl.hpp
diff options
context:
space:
mode:
authorouwou <26526779+ouwou@users.noreply.github.com>2023-07-17 21:37:24 -0400
committerouwou <26526779+ouwou@users.noreply.github.com>2023-07-17 21:37:24 -0400
commitd04e101800c451c4963a530b7cf745666105cec4 (patch)
treed73fdf97b00d8f40d8888de762574a424df435eb /src/remoteauth/ssl.hpp
parent0f3814586e3949d1a7fc15bfc2aff2b99d4975a8 (diff)
parent857e94af3817932b78963873fb5621ae3c4596f7 (diff)
downloadabaddon-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.hpp31
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)>;