native-ossl-sys
Raw FFI bindings to OpenSSL 3.x, generated by bindgen at build time.
This crate is an implementation detail of native-ossl.
Do not depend on it directly — use native-ossl instead.
What this crate does
-
Runs
pkg-configto locate the system OpenSSL (≥ 3.0.7). -
Generates
ossl_bindings.rsviabindgenfrom the public OpenSSL headers. -
Detects the installed version and algorithm support, emitting
rustc-cfgflags thatnative-ossluses to gate version-specific APIs:Flag Meaning ossl307OpenSSL ≥ 3.0.7 (always set at the minimum floor) ossl320OpenSSL ≥ 3.2.0 ossl350OpenSSL ≥ 3.5.0 ossl400OpenSSL ≥ 4.0.0 ossl_slhdsaSLH-DSA algorithm family present ossl_mldsaML-DSA algorithm family present ossl_mlkemML-KEM algorithm family present param_clear_freeOSSL_PARAM_clear_freeavailable -
With the
fips-providerfeature: performs a secondbindgenpass against non-public OpenSSL headers (OPENSSL_SOURCE_DIRrequired) and compiles a C probe to determine theevp_pkey_st::keydatafield offset for the current target ABI.
links = "ssl"
The manifest key links = "ssl" causes Cargo to forward any
cargo::metadata=KEY=VALUE emitted here to direct dependents as
DEP_SSL_KEY environment variables. native-ossl/build.rs reads these
to re-emit the cfg flags for the safe wrapper crate.
License
Apache-2.0