Skip to content

Remove OpenSSL dependency; use rustls-tls exclusively#238

Open
Krechals wants to merge 1 commit into
databricks:masterfrom
Krechals:fix-ubuntu24-openssl-compat
Open

Remove OpenSSL dependency; use rustls-tls exclusively#238
Krechals wants to merge 1 commit into
databricks:masterfrom
Krechals:fix-ubuntu24-openssl-compat

Conversation

@Krechals

@Krechals Krechals commented Jul 17, 2026

Copy link
Copy Markdown

What did you change, and why?

Remove default-tls and native-tls from reqwest features and set default-features = false, keeping only rustls-tls.

This removes the openssl, openssl-sys, and native-tls transitive dependencies. The binary now only links against libc, libm, and libgcc_s, which are present on all Linux distributions. Previously the binary required libssl.so.1.1, which does not exist on Ubuntu 24.04 (OpenSSL 3 only), causing a startup failure:

click: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory

The source code already calls .use_rustls_tls() explicitly on every reqwest client (k8s.rs), so native-tls was never used at runtime. Cargo.lock confirms no transitive dependency pulls in openssl, openssl-sys, or native-tls either.

How do you know it works?

Built locally on Ubuntu 24.04. ldd output before and after:

Before: libssl.so.1.1 => not found

After:

linux-vdso.so.1
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6

Binary smoke-tested: click --help works correctly.

Drop default-tls and native-tls from reqwest features and set
default-features = false. This removes the openssl/openssl-sys/native-tls
transitive deps, so the binary links only against libc/libm/libgcc_s —
present on all Linux distros. Previously the binary required libssl.so.1.1,
which does not exist on Ubuntu 24.04 (ships OpenSSL 3 only).
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