Commit 94c74c7f authored by Jørgen Lind's avatar Jørgen Lind
Browse files

Merge branch 'jorgen.lind/fix_rh7_compilation_2' into 'master'

fix: compilation on RedHat 7

See merge request !113
parents e9299428 861504d9
Pipeline #80173 failed with stages
in 2 minutes and 10 seconds
......@@ -118,7 +118,11 @@ namespace seismicdrive
static std::string SignStringWithPem(std::string const &str, std::string const &pem_contents, JwtSigningAlgorithms alg)
std::string msg = "Permanent error in SignStringWithPem (failed to sign string with PEM key): Unable to ";
#if (OPENSSL_VERSION_NUMBER < 0x10100000L) // Older than version 1.1.0
std::unique_ptr<EVP_MD_CTX, decltype(&EVP_MD_CTX_destroy)> digest_ctx(EVP_MD_CTX_create(), &EVP_MD_CTX_destroy);
std::unique_ptr<EVP_MD_CTX, decltype(&EVP_MD_CTX_free)> digest_ctx(EVP_MD_CTX_new(), &EVP_MD_CTX_free);
if (!digest_ctx)
throw error::authprovider::Error(msg + "create context for OpenSSL digest.");
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment