From d79e40f9f01cd28cb8a469187d9a12723424e499 Mon Sep 17 00:00:00 2001 From: Alan Antonuk Date: Thu, 4 May 2023 03:35:35 +0000 Subject: ssl: Use OPENSSL_API_COMPAT v1.1.1 OpenSSL v1.1.1 is the minimum version that rabbitmq-c supports and the API that it's programmed against. Signed-off-by: GitHub --- librabbitmq/amqp_openssl.c | 6 +++--- librabbitmq/amqp_openssl_bio.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/librabbitmq/amqp_openssl.c b/librabbitmq/amqp_openssl.c index 6b9d4a9..3b79b45 100644 --- a/librabbitmq/amqp_openssl.c +++ b/librabbitmq/amqp_openssl.c @@ -9,8 +9,8 @@ #define _CRT_SECURE_NO_WARNINGS #endif -// Use OpenSSL v1.1.0 API. -#define OPENSSL_API_COMPAT 10100 +// Use OpenSSL v1.1.1 API. +#define OPENSSL_API_COMPAT 10101 #include "amqp_openssl_bio.h" #include "amqp_private.h" @@ -327,7 +327,7 @@ amqp_socket_t *amqp_ssl_socket_new(amqp_connection_state_t state) { goto error; } - self->ctx = SSL_CTX_new(SSLv23_client_method()); + self->ctx = SSL_CTX_new(TLS_client_method()); if (!self->ctx) { goto error; } diff --git a/librabbitmq/amqp_openssl_bio.h b/librabbitmq/amqp_openssl_bio.h index f3e5b7f..28e484c 100644 --- a/librabbitmq/amqp_openssl_bio.h +++ b/librabbitmq/amqp_openssl_bio.h @@ -4,8 +4,8 @@ #ifndef AMQP_OPENSSL_BIO #define AMQP_OPENSSL_BIO -// Use OpenSSL v1.1.0 API. -#define OPENSSL_API_COMPAT 10100 +// Use OpenSSL v1.1.1 API. +#define OPENSSL_API_COMPAT 10101 #include -- cgit v1.2.1