summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Antonuk <alan.antonuk@gmail.com>2023-05-04 03:35:35 +0000
committerAlan Antonuk <alan.antonuk@gmail.com>2023-05-03 20:42:51 -0700
commitd79e40f9f01cd28cb8a469187d9a12723424e499 (patch)
tree9550f4e01095c7184764fd45aba4df47e35d47b8
parentb9c809d8128f495196106ca369f886e94e7cb7b4 (diff)
downloadrabbitmq-c-d79e40f9f01cd28cb8a469187d9a12723424e499.tar.gz
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 <noreply@github.com>
-rw-r--r--librabbitmq/amqp_openssl.c6
-rw-r--r--librabbitmq/amqp_openssl_bio.h4
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 <openssl/bio.h>