From: Christian Heimes Date: Sun, 21 Jan 2018 09:37:59 +0000 (+0100) Subject: Fix signature of min/max proto getter X-Git-Tag: OpenSSL_1_1_0h~107 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=77882a94ee69a613c3b62ae9b5d0de0ed53799e8;p=oweals%2Fopenssl.git Fix signature of min/max proto getter The getters for min and max proto version wrongly passed NULL instead of 0 as third argument to SSL_ctrl() and SSL_CTX_ctrl(). The third argument is not used, but the error results in a compiler warning: warning: passing argument 3 of ‘SSL_CTX_ctrl’ makes integer from pointer without a cast [-Wint-conversion] int v = SSL_CTX_get_max_proto_version(self->ctx); See https://github.com/openssl/openssl/pull/4364 Signed-off-by: Christian Heimes Reviewed-by: Rich Salz Reviewed-by: Kurt Roeckx Reviewed-by: Ben Kaduk (Merged from https://github.com/openssl/openssl/pull/5128) (cherry picked from commit 1f82eba718f758757a439e717ea7a5aa8be55f8d) --- diff --git a/include/openssl/ssl.h b/include/openssl/ssl.h index 7c03d49c36..bbc7c352ec 100644 --- a/include/openssl/ssl.h +++ b/include/openssl/ssl.h @@ -1302,9 +1302,9 @@ DECLARE_PEM_rw(SSL_SESSION, SSL_SESSION) #define SSL_set_max_proto_version(s, version) \ SSL_ctrl(s, SSL_CTRL_SET_MAX_PROTO_VERSION, version, NULL) #define SSL_get_min_proto_version(s) \ - SSL_ctrl(s, SSL_CTRL_GET_MIN_PROTO_VERSION, NULL, NULL) + SSL_ctrl(s, SSL_CTRL_GET_MIN_PROTO_VERSION, 0, NULL) #define SSL_get_max_proto_version(s) \ - SSL_ctrl(s, SSL_CTRL_GET_MAX_PROTO_VERSION, NULL, NULL) + SSL_ctrl(s, SSL_CTRL_GET_MAX_PROTO_VERSION, 0, NULL) #if OPENSSL_API_COMPAT < 0x10100000L /* Provide some compatibility macros for removed functionality. */