From 249eb19fe108511c5f56e30944816ebb87617ec1 Mon Sep 17 00:00:00 2001 From: Shauren Date: Tue, 7 May 2024 12:26:21 +0200 Subject: Core/Misc: Minor change to make_unique_ptr_with_deleter to make it accept only pointers (cherry picked from commit 83f4763b25891c9fe6c7f01b75cdf0f4ef66fc9a) --- src/common/Cryptography/Ed25519.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/common/Cryptography/Ed25519.cpp') diff --git a/src/common/Cryptography/Ed25519.cpp b/src/common/Cryptography/Ed25519.cpp index ce706594057..6f286c74b3e 100644 --- a/src/common/Cryptography/Ed25519.cpp +++ b/src/common/Cryptography/Ed25519.cpp @@ -68,7 +68,7 @@ bool Ed25519::LoadFromFile(std::string const& fileName) _key = nullptr; } - auto keyBIO = make_unique_ptr_with_deleter(BIO_new_file(fileName.c_str(), "r"), BIO_free); + auto keyBIO = make_unique_ptr_with_deleter(BIO_new_file(fileName.c_str(), "r"), &BIO_free); if (!keyBIO) return false; @@ -89,7 +89,7 @@ bool Ed25519::LoadFromString(std::string const& keyPem) auto keyBIO = make_unique_ptr_with_deleter(BIO_new_mem_buf( const_cast(keyPem.c_str()) /*api hack - this function assumes memory is readonly but lacks const modifier*/, - keyPem.length() + 1), BIO_free); + keyPem.length() + 1), &BIO_free); if (!keyBIO) return false; -- cgit v1.2.3