diff --git a/ref.hpp b/ref.hpp new file mode 100644 index 0000000..4d12863 --- /dev/null +++ b/ref.hpp @@ -0,0 +1,18 @@ +#pragma once + +#include +#include + +#include + +template +struct FnDeleter { + auto operator()(T *ptr) const -> void { Free(ptr); } +}; + +template +using Ref = std::unique_ptr>; + +using EVP_PKEY_CTX_Ref = Ref; +using X509_Ref = Ref; +using EVP_PKEY_Ref = Ref;