Certbot snap Error while renewing (OPENSSL_init_ssl)

Not sure if this is the same issue, but it's similar enough that it might help steer in the right direction...

I noticed a similar error when renewing certificates with DNS validation, where I use some custom scripts for managing DNS zones (adding / removing acme-challenge records).

And when these scripts ran via certbot hooks, they reported this error:

tls.c:90:tls_initialize(): fatal error: RUNTIME_CHECK(OPENSSL_init_ssl(OPENSSL_INIT_ENGINE_ALL_BUILTIN | OPENSSL_INIT_LOAD_CONFIG, NULL) == 1) failed
Aborted (core dumped)

After some debugging I found out that the issue was caused by certobot setting and exporting an environment variable OPENSSL_FORCE_FIPS_MODE="0", which in turn caused Bind commands (such as rndc and named-checkconf) to fail with the above error.

My solution was to simply unset this variable in my scripts.

Whatever caused this happened after January 6th as renewals worked then, but I wasn't able to find out exactly what it was.

Hope this helps a bit...