alexcrichton / openssl-src-rs

Source code and logic to build OpenSSL from source
Apache License 2.0
70 stars 114 forks source link

3.4.0 release breaks the legacy provider #257

Closed jszwedko closed 1 week ago

jszwedko commented 3 weeks ago

We ran into this error over when updating OpenSSL in Vector: vectordotdev/vector#21587

thread 'tls::settings::test::from_options_pkcs12' panicked at lib/vector-core/src/tls/settings.rs:682:85:
called `Result::unwrap()` on an `Err` value: ErrorStack([Error { code: 310378599, library: "DSO support routines", function: "dlfcn_load", reason: "could not load the shared library", file: "crypto/dso/dso_dlfcn.c", line: 118, data: "filename(/home/runner/work/vector/vector/target/debug/build/openssl-sys-7970cd031f6a569d/out/openssl-build/install/lib/ossl-modules/legacy.so): /home/runner/work/vector/vector/target/debug/build/openssl-sys-7970cd031f6a569d/out/openssl-build/install/lib/ossl-modules/legacy.so: cannot open shared object file: No such file or directory" }, Error { code: 310378599, library: "DSO support routines", function: "DSO_load", reason: "could not load the shared library", file: "crypto/dso/dso_lib.c", line: 147 }, Error { code: 126353445, library: "common libcrypto routines", function: "provider_init", file: "crypto/provider_core.c", line: 950, data: "name=legacy" }])
stack backtrace:
   0:     0x564eac5a8cd5 - std::backtrace_rs::backtrace::libunwind::trace::h649ab3318d3445c5

Ref: https://github.com/alexcrichton/openssl-src-rs/pull/255#issuecomment-2441341574

jszwedko commented 1 week ago

Small bump on this. It is currently blocking us from upgrading in Vector. Are there any workarounds we could use?

sfackler commented 1 week ago

Turns out to be a simple fix, but one of those situations where I have no idea how this ever worked in the first place...

tofay commented 1 week ago

I was git bisecting openssl for a root cause... turns out https://github.com/alexcrichton/openssl-src-rs/commit/ed9cd639b25a1b907f65e185c5ed2dd59e187e35 regressed this.

When building without "dso", as openssl-src-rs previously did, liblegacy.a is included in libcrypto.a.

jszwedko commented 1 week ago

Thanks @alexcrichton 🙇 I can confirm that it fixed the issue for Vector.