summary refs log tree commit diff
path: root/pkgs/development/libraries/openssl
diff options
context:
space:
mode:
authorArthur Gautier <baloo@superbaloo.net>2021-09-07 17:00:29 +0000
committerArthur Gautier <baloo@superbaloo.net>2021-09-07 23:13:46 +0000
commit7f25b31f07c3b4cbbefad89377318f014611a2e8 (patch)
tree245ff5db840ba9b8a4fd9d69e0e58f480e131e2c /pkgs/development/libraries/openssl
parentbc06c93905f60a82d6ebbb78f78cf289257860cc (diff)
downloadnixpkgs-7f25b31f07c3b4cbbefad89377318f014611a2e8.tar
nixpkgs-7f25b31f07c3b4cbbefad89377318f014611a2e8.tar.gz
nixpkgs-7f25b31f07c3b4cbbefad89377318f014611a2e8.tar.bz2
nixpkgs-7f25b31f07c3b4cbbefad89377318f014611a2e8.tar.lz
nixpkgs-7f25b31f07c3b4cbbefad89377318f014611a2e8.tar.xz
nixpkgs-7f25b31f07c3b4cbbefad89377318f014611a2e8.tar.zst
nixpkgs-7f25b31f07c3b4cbbefad89377318f014611a2e8.zip
openssl3: init at 3.0.0
Signed-off-by: Arthur Gautier <baloo@superbaloo.net>
Diffstat (limited to 'pkgs/development/libraries/openssl')
-rw-r--r--pkgs/development/libraries/openssl/3.0/nix-ssl-cert-file.patch15
-rw-r--r--pkgs/development/libraries/openssl/default.nix16
-rw-r--r--pkgs/development/libraries/openssl/use-etc-ssl-certs-darwin.patch (renamed from pkgs/development/libraries/openssl/1.1/use-etc-ssl-certs-darwin.patch)0
-rw-r--r--pkgs/development/libraries/openssl/use-etc-ssl-certs.patch (renamed from pkgs/development/libraries/openssl/1.1/use-etc-ssl-certs.patch)0
4 files changed, 29 insertions, 2 deletions
diff --git a/pkgs/development/libraries/openssl/3.0/nix-ssl-cert-file.patch b/pkgs/development/libraries/openssl/3.0/nix-ssl-cert-file.patch
new file mode 100644
index 00000000000..e7090f49db6
--- /dev/null
+++ b/pkgs/development/libraries/openssl/3.0/nix-ssl-cert-file.patch
@@ -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);
diff --git a/pkgs/development/libraries/openssl/default.nix b/pkgs/development/libraries/openssl/default.nix
index 2d3f1c313ca..2a7e58639a1 100644
--- a/pkgs/development/libraries/openssl/default.nix
+++ b/pkgs/development/libraries/openssl/default.nix
@@ -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;
+  };
 }
diff --git a/pkgs/development/libraries/openssl/1.1/use-etc-ssl-certs-darwin.patch b/pkgs/development/libraries/openssl/use-etc-ssl-certs-darwin.patch
index 2c98ccfa7ed..2c98ccfa7ed 100644
--- a/pkgs/development/libraries/openssl/1.1/use-etc-ssl-certs-darwin.patch
+++ b/pkgs/development/libraries/openssl/use-etc-ssl-certs-darwin.patch
diff --git a/pkgs/development/libraries/openssl/1.1/use-etc-ssl-certs.patch b/pkgs/development/libraries/openssl/use-etc-ssl-certs.patch
index 67d199681f9..67d199681f9 100644
--- a/pkgs/development/libraries/openssl/1.1/use-etc-ssl-certs.patch
+++ b/pkgs/development/libraries/openssl/use-etc-ssl-certs.patch