Skip to content

Commit

Permalink
Fixes eidheim#133: improved OPENSSL_VERSION_NUMBER check
Browse files Browse the repository at this point in the history
  • Loading branch information
eidheim committed Jan 3, 2020
1 parent 5c0d691 commit 801b634
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crypto.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ namespace SimpleWeb {

b64 = BIO_new(BIO_f_base64());
BIO_set_flags(b64, BIO_FLAGS_BASE64_NO_NL);
// TODO: Remove in 2020
#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()));
// TODO: Remove in 2022 or later
#if(defined(OPENSSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER < 0x1000214fL) || (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x2080000fL)
bio = BIO_new_mem_buf(const_cast<char *>(&base64[0]), static_cast<int>(base64.size()));
#else
bio = BIO_new_mem_buf(&base64[0], static_cast<int>(base64.size()));
#endif
Expand Down

0 comments on commit 801b634

Please sign in to comment.