From 226ed5fb390f8cfc8b80cea79f57ae7837bc9b96 Mon Sep 17 00:00:00 2001 From: Matt Caswell Date: Wed, 27 Jul 2022 14:54:48 +0100 Subject: [PATCH] Remove redefinition of SSL_AD_NO_ALERT The SSL_AD_NO_ALERT value was defined in two places. We centralise its definition. Reviewed-by: Hugo Landau Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/18132) --- ssl/record/methods/tls_common.c | 2 -- ssl/ssl_local.h | 1 + ssl/statem/statem.h | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/ssl/record/methods/tls_common.c b/ssl/record/methods/tls_common.c index d98badffe47..a537db6ffd7 100644 --- a/ssl/record/methods/tls_common.c +++ b/ssl/record/methods/tls_common.c @@ -17,8 +17,6 @@ #include "../record_local.h" #include "recmethod_local.h" -# define SSL_AD_NO_ALERT -1 - static void tls_int_free(OSSL_RECORD_LAYER *rl); void ossl_rlayer_fatal(OSSL_RECORD_LAYER *rl, int al, int reason, diff --git a/ssl/ssl_local.h b/ssl/ssl_local.h index 7f5c8a0ba54..38b2c7e970f 100644 --- a/ssl/ssl_local.h +++ b/ssl/ssl_local.h @@ -146,6 +146,7 @@ # define DTLS_VERSION_LT(v1, v2) (dtls_ver_ordinal(v1) > dtls_ver_ordinal(v2)) # define DTLS_VERSION_LE(v1, v2) (dtls_ver_ordinal(v1) >= dtls_ver_ordinal(v2)) +# define SSL_AD_NO_ALERT -1 /* * Define the Bitmasks for SSL_CIPHER.algorithms. diff --git a/ssl/statem/statem.h b/ssl/statem/statem.h index 7dbe71ed7d4..75fb06481c0 100644 --- a/ssl/statem/statem.h +++ b/ssl/statem/statem.h @@ -127,7 +127,6 @@ void ossl_statem_set_renegotiate(SSL_CONNECTION *s); void ossl_statem_send_fatal(SSL_CONNECTION *s, int al); void ossl_statem_fatal(SSL_CONNECTION *s, int al, int reason, const char *fmt, ...); -# define SSL_AD_NO_ALERT -1 # define SSLfatal_alert(s, al) ossl_statem_send_fatal((s), (al)) # define SSLfatal(s, al, r) SSLfatal_data((s), (al), (r), NULL) # define SSLfatal_data \ -- 2.47.2