Commit 6cc30a0f2d for openssl.org
commit 6cc30a0f2de1c85d4554eb67f63e9744e8beb8d0
Author: Bob Beck <beck@openssl.org>
Date: Thu Mar 12 11:41:11 2026 -0600
Add Deprecation Macros for 4.1
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.foundation>
MergeDate: Mon Mar 16 11:28:52 2026
(Merged from https://github.com/openssl/openssl/pull/30399)
diff --git a/doc/internal/man7/deprecation.pod b/doc/internal/man7/deprecation.pod
index b4e5193ba0..f27e664b49 100644
--- a/doc/internal/man7/deprecation.pod
+++ b/doc/internal/man7/deprecation.pod
@@ -2,6 +2,7 @@
=head1 NAME
+OPENSSL_NO_DEPRECATED_4_1, OSSL_DEPRECATEDIN_4_1,
OPENSSL_NO_DEPRECATED_4_0, OSSL_DEPRECATEDIN_4_0,
OPENSSL_NO_DEPRECATED_3_6, OSSL_DEPRECATEDIN_3_6,
OPENSSL_NO_DEPRECATED_3_5, OSSL_DEPRECATEDIN_3_5,
diff --git a/include/openssl/macros.h b/include/openssl/macros.h
index f44e7537f9..73f3dca361 100644
--- a/include/openssl/macros.h
+++ b/include/openssl/macros.h
@@ -187,6 +187,7 @@
* 'no-deprecated'.
*/
+#undef OPENSSL_NO_DEPRECATED_4_1
#undef OPENSSL_NO_DEPRECATED_4_0
#undef OPENSSL_NO_DEPRECATED_3_6
#undef OPENSSL_NO_DEPRECATED_3_4
@@ -199,6 +200,17 @@
#undef OPENSSL_NO_DEPRECATED_1_0_0
#undef OPENSSL_NO_DEPRECATED_0_9_8
+#if OPENSSL_API_LEVEL >= 40100
+#ifndef OPENSSL_NO_DEPRECATED
+#define OSSL_DEPRECATEDIN_4_1 OSSL_DEPRECATED(4.1)
+#define OSSL_DEPRECATEDIN_4_1_FOR(msg) OSSL_DEPRECATED_FOR(4.1, msg)
+#else
+#define OPENSSL_NO_DEPRECATED_4_1
+#endif
+#else
+#define OSSL_DEPRECATEDIN_4_1
+#define OSSL_DEPRECATEDIN_4_1_FOR(msg)
+#endif
#if OPENSSL_API_LEVEL >= 40000
#ifndef OPENSSL_NO_DEPRECATED
#define OSSL_DEPRECATEDIN_4_0 OSSL_DEPRECATED(4.0)