Related to #150: added LIBRESSL_VERSION_NUMBER check to BIO_new_mem_buf in order to support libressl
This commit is contained in:
parent
b8de3ae504
commit
0f8f1f515b
1 changed files with 2 additions and 2 deletions
|
|
@ -69,7 +69,7 @@ namespace SimpleWeb {
|
||||||
b64 = BIO_new(BIO_f_base64());
|
b64 = BIO_new(BIO_f_base64());
|
||||||
BIO_set_flags(b64, BIO_FLAGS_BASE64_NO_NL);
|
BIO_set_flags(b64, BIO_FLAGS_BASE64_NO_NL);
|
||||||
// TODO: Remove in 2020
|
// TODO: Remove in 2020
|
||||||
#if OPENSSL_VERSION_NUMBER <= 0x1000115fL
|
#if(defined(OPENSSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER <= 0x1000115fL) || (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2080000fL)
|
||||||
bio = BIO_new_mem_buf((char *)&base64[0], static_cast<int>(base64.size()));
|
bio = BIO_new_mem_buf((char *)&base64[0], static_cast<int>(base64.size()));
|
||||||
#else
|
#else
|
||||||
bio = BIO_new_mem_buf(&base64[0], static_cast<int>(base64.size()));
|
bio = BIO_new_mem_buf(&base64[0], static_cast<int>(base64.size()));
|
||||||
|
|
@ -223,5 +223,5 @@ namespace SimpleWeb {
|
||||||
return key;
|
return key;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
} // namespace SimpleWeb
|
||||||
#endif /* SIMPLE_WEB_CRYPTO_HPP */
|
#endif /* SIMPLE_WEB_CRYPTO_HPP */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue