| There seems to be an issue with the c++17 make_openssl_unique implementation in the Azure SDK: https://github.com/Azure/azure-sdk-for-cpp/issues/6697 |
| |
| diff --git a/sdk/attestation/azure-security-attestation/src/private/crypto/openssl/openssl_helpers.hpp b/sdk/attestation/azure-security-attestation/src/private/crypto/openssl/openssl_helpers.hpp |
| index a52791cea..5734bb76c 100644 |
| --- a/sdk/attestation/azure-security-attestation/src/private/crypto/openssl/openssl_helpers.hpp |
| +++ b/sdk/attestation/azure-security-attestation/src/private/crypto/openssl/openssl_helpers.hpp |
| @@ -39,19 +39,6 @@ namespace Azure { namespace Security { namespace Attestation { namespace _detail |
| using openssl_evp_pkey = openssl_unique_ptr<EVP_PKEY>; |
| using openssl_bio = openssl_unique_ptr<BIO>; |
| |
| -#ifdef __cpp_nontype_template_parameter_auto |
| - // *** Wrapper function that calls a given OpensslApi, and returns the corresponding |
| - // openssl_unique_ptr<T>: |
| - template <auto OpensslApi, typename... Args> auto make_openssl_unique(Args&&... args) |
| - { |
| - auto raw = OpensslApi( |
| - forward<Args>(args)...); // forwarding is probably unnecessary, could use const Args&... |
| - // check raw |
| - using T = remove_pointer_t<decltype(raw)>; // no need to request T when we can see |
| - // what OpensslApi returned |
| - return openssl_unique_ptr<T>{raw}; |
| - } |
| -#else // ^^^ C++17 ^^^ / vvv C++14 vvv |
| template <typename Api, typename... Args> |
| auto make_openssl_unique(Api& OpensslApi, Args&&... args) |
| { |
| @@ -62,7 +49,6 @@ namespace Azure { namespace Security { namespace Attestation { namespace _detail |
| // what OpensslApi returned |
| return openssl_unique_ptr<T>{raw}; |
| } |
| -#endif // ^^^ C++14 ^^^ |
| |
| extern std::string GetOpenSSLError(std::string const& what); |
| |