From 702a571451899f903660aa33835cc279051c0b0e Mon Sep 17 00:00:00 2001 From: eidheim Date: Wed, 8 Nov 2017 09:40:28 +0100 Subject: [PATCH] Fixes compilation issue for Debian Jessie --- crypto.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crypto.hpp b/crypto.hpp index 2c63133..1a2c8fa 100644 --- a/crypto.hpp +++ b/crypto.hpp @@ -68,7 +68,12 @@ namespace SimpleWeb { b64 = BIO_new(BIO_f_base64()); BIO_set_flags(b64, BIO_FLAGS_BASE64_NO_NL); +// TODO: Cannot find the exact version this change happended +#if OPENSSL_VERSION_NUMBER <= 0x1000114fL + bio = BIO_new_mem_buf((char *)&base64[0], static_cast(base64.size())); +#else bio = BIO_new_mem_buf(&base64[0], static_cast(base64.size())); +#endif bio = BIO_push(b64, bio); auto decoded_length = BIO_read(bio, &ascii[0], static_cast(ascii.size()));