openssl3: init at 3.0.0

Signed-off-by: Arthur Gautier <baloo@superbaloo.net>
This commit is contained in:
Arthur Gautier 2021-09-07 17:00:29 +00:00
parent bc06c93905
commit 7f25b31f07
5 changed files with 31 additions and 3 deletions

View File

@ -0,0 +1,15 @@
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);

View File

@ -198,11 +198,23 @@ in {
./1.1/nix-ssl-cert-file.patch
(if stdenv.hostPlatform.isDarwin
then ./1.1/use-etc-ssl-certs-darwin.patch
else ./1.1/use-etc-ssl-certs.patch)
then ./use-etc-ssl-certs-darwin.patch
else ./use-etc-ssl-certs.patch)
] ++ lib.optionals (stdenv.isDarwin) [
./1.1/macos-yosemite-compat.patch
];
withDocs = true;
};
openssl_3_0 = common {
version = "3.0.0";
sha256 = "sha256-We7fy0bCUhTJvTftYHgpe03wHQEiZ/6enu4x9hvHBTY=";
patches = [
./3.0/nix-ssl-cert-file.patch
(if stdenv.hostPlatform.isDarwin
then ./use-etc-ssl-certs-darwin.patch
else ./use-etc-ssl-certs.patch)
];
withDocs = true;
};
}

View File

@ -18176,7 +18176,8 @@ with pkgs;
inherit (callPackages ../development/libraries/openssl { })
openssl_1_0_2
openssl_1_1;
openssl_1_1
openssl_3_0;
openssl-chacha = callPackage ../development/libraries/openssl/chacha.nix { };