Skip to content

Remove and simplify a ton of cfgs that weren't required#2484

Merged
alex merged 1 commit intorust-openssl:masterfrom
alex:simplify-cfgs
Oct 13, 2025
Merged

Remove and simplify a ton of cfgs that weren't required#2484
alex merged 1 commit intorust-openssl:masterfrom
alex:simplify-cfgs

Conversation

@alex
Copy link
Collaborator

@alex alex commented Oct 13, 2025

No description provided.

@botovq
Copy link
Contributor

botovq commented Oct 13, 2025

cms.h was added back to libressl in 3.1, so if you add the following diff, this should work for all supported libressl versions:

diff --git a/openssl-sys/build/run_bindgen.rs b/openssl-sys/build/run_bindgen.rs
index 3a8f5dea52..17ee85cac8 100644
--- a/openssl-sys/build/run_bindgen.rs
+++ b/openssl-sys/build/run_bindgen.rs
@@ -41,7 +41,7 @@
 #include <openssl/srtp.h>
 #endif
 
-#if !(defined(LIBRESSL_VERSION_NUMBER) || defined(OPENSSL_IS_BORINGSSL) || defined(OPENSSL_IS_AWSLC))
+#if !(defined(OPENSSL_IS_BORINGSSL) || defined(OPENSSL_IS_AWSLC))
 #include <openssl/cms.h>
 #endif
 
diff --git a/systest/build.rs b/systest/build.rs
index ca4cd9d870..4b35c148a2 100644
--- a/systest/build.rs
+++ b/systest/build.rs
@@ -72,7 +72,8 @@
         .header("openssl/x509_vfy.h");
 
     if let Some(version) = libressl_version {
-        cfg.header("openssl/poly1305.h");
+        cfg.header("openssl/cms.h")
+            .header("openssl/poly1305.h");
         if version >= 0x30600000 {
             cfg.header("openssl/kdf.h");
         }

@alex alex merged commit 1a1289a into rust-openssl:master Oct 13, 2025
173 of 174 checks passed
@alex alex deleted the simplify-cfgs branch October 13, 2025 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants