Commit 79055da3e4 for openssl.org
commit 79055da3e498a8e114c832c885c67ccd16629850
Author: Bob Beck <beck@openssl.org>
Date: Tue Sep 29 11:44:55 2026 -0600
Add Deprecation Macros for 4.2
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Frederik Wedel-Heinen <fwh.openssl@gmail.com>
Merge-date: Thu Oct 1 08:21:23 2026
Merged-from: https://github.com/openssl/openssl/pull/33039
diff --git a/Configure b/Configure
index b4292d3136..ac24e753e8 100755
--- a/Configure
+++ b/Configure
@@ -239,7 +239,7 @@ my $apitable = {
# From 3.0 and on, we internalise the given version number in decimal
# as MAJOR * 10000 + MINOR * 100 + 0
my @post30_versions = ([3, 0], [3, 1], [3, 2], [3, 3], [3, 4], [3, 5], [3, 6],
- [4, 0], [4, 1],
+ [4, 0], [4, 1], [4, 2],
);
# The numbering used changes from 3.0 and on because we updated
diff --git a/doc/internal/man7/deprecation.pod b/doc/internal/man7/deprecation.pod
index 69f4cb9bee..e9ea6299e4 100644
--- a/doc/internal/man7/deprecation.pod
+++ b/doc/internal/man7/deprecation.pod
@@ -2,6 +2,7 @@
=head1 NAME
+OPENSSL_NO_DEPRECATED_4_2, OSSL_DEPRECATEDIN_4_2, OSSL_DEPRECATEDIN_4_2_FOR,
OPENSSL_NO_DEPRECATED_4_1, OSSL_DEPRECATEDIN_4_1, OSSL_DEPRECATEDIN_4_1_FOR,
OPENSSL_NO_DEPRECATED_4_0, OSSL_DEPRECATEDIN_4_0, OSSL_DEPRECATEDIN_4_0_FOR,
OPENSSL_NO_DEPRECATED_3_6, OSSL_DEPRECATEDIN_3_6, OSSL_DEPRECATEDIN_3_6_FOR,
diff --git a/include/openssl/macros.h b/include/openssl/macros.h
index 96b8325654..fc3f150fed 100644
--- a/include/openssl/macros.h
+++ b/include/openssl/macros.h
@@ -177,6 +177,7 @@
* 'no-deprecated'.
*/
+#undef OPENSSL_NO_DEPRECATED_4_2
#undef OPENSSL_NO_DEPRECATED_4_1
#undef OPENSSL_NO_DEPRECATED_4_0
#undef OPENSSL_NO_DEPRECATED_3_6
@@ -191,6 +192,17 @@
#undef OPENSSL_NO_DEPRECATED_1_0_0
#undef OPENSSL_NO_DEPRECATED_0_9_8
+#if OPENSSL_API_LEVEL >= 40200
+#ifndef OPENSSL_NO_DEPRECATED
+#define OSSL_DEPRECATEDIN_4_2 OSSL_DEPRECATED(4.2)
+#define OSSL_DEPRECATEDIN_4_2_FOR(msg) OSSL_DEPRECATED_FOR(4.2, msg)
+#else
+#define OPENSSL_NO_DEPRECATED_4_2
+#endif
+#else
+#define OSSL_DEPRECATEDIN_4_2
+#define OSSL_DEPRECATEDIN_4_2_FOR(msg)
+#endif
#if OPENSSL_API_LEVEL >= 40100
#ifndef OPENSSL_NO_DEPRECATED
#define OSSL_DEPRECATEDIN_4_1 OSSL_DEPRECATED(4.1)
diff --git a/ssl/d1_lib.c b/ssl/d1_lib.c
index 98c939ab9f..e3f5ed238a 100644
--- a/ssl/d1_lib.c
+++ b/ssl/d1_lib.c
@@ -134,7 +134,7 @@ void dtls1_clear_received_buffer(SSL_CONNECTION *s)
s->d1->has_change_cipher_spec = 0;
}
-void ossl_list_record_number_elem_free(OSSL_LIST(record_number) * p_list)
+void ossl_list_record_number_elem_free(OSSL_LIST(record_number) *p_list)
{
DTLS1_RECORD_NUMBER *p_elem;
DTLS1_RECORD_NUMBER *p_elem_next = NULL;