Skip to content

Commit ed9cd63

Browse files
authored
enable DSO API by default (#251)
* Engine support requires the DSO API * to support FIPS, the DSO API is used to load the module at runtime, typically from a vendor supplied or pre-compiled validated version of OpenSSL
1 parent 8e79a62 commit ed9cd63

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ seed = []
5050
force-engine = []
5151
# Enable kTLS support
5252
ktls = []
53+
# Disable DSO API support
54+
no-dso = []
5355

5456
[workspace]
5557
members = ['testcrate']

src/lib.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,6 @@ impl Build {
178178

179179
configure
180180
// No shared objects, we just want static libraries
181-
.arg("no-dso")
182181
.arg("no-shared")
183182
// Should be off by default on OpenSSL 1.1.0, but let's be extra sure
184183
.arg("no-ssl3")
@@ -191,6 +190,15 @@ impl Build {
191190
// Avoid multilib-postfix for build targets that specify it
192191
.arg("--libdir=lib");
193192

193+
if cfg!(feature = "no-dso") {
194+
// engine requires DSO support
195+
if cfg!(feature = "force-engine") {
196+
println!("Feature 'force-engine' requires DSO, ignoring 'no-dso' feature.");
197+
} else {
198+
configure.arg("no-dso");
199+
}
200+
}
201+
194202
if cfg!(not(feature = "legacy")) {
195203
configure.arg("no-legacy");
196204
}

0 commit comments

Comments
 (0)