Addresses #4795. Apologies in advance for my poor rust competency.
This patch moves the rustls invocation into src/main.rs for the default provider to load without error.
From the suggestions in the rustls documentation, this patch follows the guidance described in the 2nd bullet point:
The intention is that an application can specify the CryptoProvider they wish to use once, and have that apply to the variety of places where their application does TLS (which may be wrapped inside other libraries). They should do this by calling CryptoProvider::install_default() early on.
This call is positioned in src/main.rs because it needs to happen before pict-rs, which installs the provider if it's not set: source code reference.
FWIW, doing a similar tactic of "ignore the error" also works, but the nuances with making that choice are beyond my current understanding of the code base.
So I think I was "impacted" by this during my upgrade to 0.19.5 from 0.19.3 I had sslmode set to require but after the upgrade I had to set it to prefer in my lemmy config.
Addresses #4795. Apologies in advance for my poor rust competency.
This patch moves the
rustls
invocation intosrc/main.rs
for the default provider to load without error.From the suggestions in the rustls documentation, this patch follows the guidance described in the 2nd bullet point:
This call is positioned in
src/main.rs
because it needs to happen before pict-rs, which installs the provider if it's not set: source code reference.FWIW, doing a similar tactic of "ignore the error" also works, but the nuances with making that choice are beyond my current understanding of the code base.