3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/libraries/openssl/3.0/nix-ssl-cert-file.patch
Arthur Gautier 7f25b31f07 openssl3: init at 3.0.0
Signed-off-by: Arthur Gautier <baloo@superbaloo.net>
2021-09-07 23:13:46 +00:00

16 lines
741 B
Diff

diff --git a/crypto/x509/by_file.c b/crypto/x509/by_file.c
index 37d73ca84c..e328896234 100644
--- a/crypto/x509/by_file.c
+++ b/crypto/x509/by_file.c
@@ -54,7 +54,9 @@ static int by_file_ctrl_ex(X509_LOOKUP *ctx, int cmd, const char *argp,
switch (cmd) {
case X509_L_FILE_LOAD:
if (argl == X509_FILETYPE_DEFAULT) {
- file = ossl_safe_getenv(X509_get_default_cert_file_env());
+ file = ossl_safe_getenv("NIX_SSL_CERT_FILE");
+ if (!file)
+ file = ossl_safe_getenv(X509_get_default_cert_file_env());
if (file)
ok = (X509_load_cert_crl_file_ex(ctx, file, X509_FILETYPE_PEM,
libctx, propq) != 0);