From: Emmanuel Deloget <log...@free.fr> Although it is required by BIO_new() to have a non-const object, this is merely an OpenSSL interface accident. Newer versions of OpenSSL (i.e. OpenSSL 1.1) have are a bit better w.r.t. constification and changed this.
As a result, we can safely constify the BIO_METHOD parameter of getbio() (yet we still need to un-const the value when feeding it to BIO_new() for the sake of compatibility). Signed-off-by: Emmanuel Deloget <log...@free.fr> --- src/openvpn/ssl_openssl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/openvpn/ssl_openssl.c b/src/openvpn/ssl_openssl.c index 2ff3e12b93d6f829e4b27aefc2622d52e41ce589..46942c225d72e42760cbb9fae577c87aee553508 100644 --- a/src/openvpn/ssl_openssl.c +++ b/src/openvpn/ssl_openssl.c @@ -1389,10 +1389,10 @@ bio_debug_oc(const char *mode, BIO *bio) * through "memory BIOs". */ static BIO * -getbio(BIO_METHOD *type, const char *desc) +getbio(const BIO_METHOD *type, const char *desc) { BIO *ret; - ret = BIO_new(type); + ret = BIO_new((BIO_METHOD *)type); if (!ret) { crypto_msg(M_FATAL, "Error creating %s BIO", desc); -- 2.7.4 ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel