Commit Graph

523 Commits

Author SHA1 Message Date
Ihar Hrachyshka
27278f6e01 Revert "openssl: disable failing test on cross to musl"
This reverts commit 7500b79a6f.
2025-10-29 19:18:42 -04:00
Ihar Hrachyshka
5d006774c0 openssl: help build system to detect cross builds
Specifically, some tests that rely on build and host platforms using the
same libc will then be skipped.
2025-10-29 19:18:42 -04:00
hellodword
fdd903c161 openssl: fix mingwW64 build 2025-10-24 02:10:46 +00:00
Sizhe Zhao
85cbe2fb67 openssl: allow darwin networking 2025-10-20 13:06:53 +08:00
Yureka
7500b79a6f openssl: disable failing test on cross to musl 2025-10-12 13:28:50 +02:00
K900
8f9b2e5f9a openssl: 3.5.2 -> 3.6.0; openssl_3: 3.0.17 -> 3.0.18; openssl: enable tests and add comments (#447713) 2025-10-07 09:53:52 +03:00
K900
f8d669f413 Merge remote-tracking branch 'origin/master' into staging-next 2025-10-04 21:10:21 +03:00
NAHO
c8d4dabc43 pkgs: remove optional builtins prefixes from prelude functions
Remove optional builtins prefixes from prelude functions by running:

    builtins=(
      abort
      baseNameOf
      break
      derivation
      derivationStrict
      dirOf
      false
      fetchGit
      fetchMercurial
      fetchTarball
      fetchTree
      fromTOML
      import
      isNull
      map
      null
      placeholder
      removeAttrs
      scopedImport
      throw
      toString
      true
    )

    fd \
      --type file \
      . \
      pkgs \
      --exec-batch sed --in-place --regexp-extended "
        s/\<builtins\.($(
          printf '%s\n' "${builtins[@]}" |
            paste --delimiter '|' --serial -
        ))\>/\1/g
      "

    nix fmt
2025-10-04 19:02:37 +02:00
Markus Theil
87c0c5e50c openssl: 3.5.2 -> 3.6.0
Changelog (security fixes):
https://github.com/openssl/openssl/blob/openssl-3.5/CHANGES.md#changes-between-353-and-354-30-sep-2025

Changelog (features):
https://github.com/openssl/openssl/blob/openssl-3.6/CHANGES.md#changes-between-35-and-360-1-oct-2025

Notably:
- more work on PQC algorithms (LMS)
- performance improvements for some assembly implementations

Fixed CVEs:
- CVE-2025-9230
- CVE-2025-9231
- CVE-2025-9232

Signed-off-by: Markus Theil <theil.markus@gmail.com>
2025-10-01 20:40:28 +02:00
Markus Theil
9e4cf668a3 openssl_3: 3.0.17 -> 3.0.18
Changelog:
https://github.com/openssl/openssl/blob/openssl-3.0/CHANGES.md#changes-between-3017-and-3018-30-sep-2025

Fixed CVEs:
- CVE-2025-9230
- CVE-2025-9232

Signed-off-by: Markus Theil <theil.markus@gmail.com>
2025-10-01 13:46:53 +02:00
Silvan Mosberger
1453647d22 openssl: Add missing comments for patches
Markus Theil: Changed reference to NIX_SSL_CERT_FILE commit
2025-10-01 13:45:46 +02:00
Silvan Mosberger
96e5424f74 openssl: Enable tests
Makes the build take about 13 instead of 5 minutes
2025-10-01 13:45:44 +02:00
K900
4999ae577c Merge remote-tracking branch 'origin/master' into staging-next 2025-09-30 21:47:55 +03:00
John Ericson
941a243895 cygwin: add as a cross-compilation target, and get hello to build (#444470) 2025-09-30 14:16:25 +00:00
David McFarland
a56ff336a7 cygwin-dll-link.sh: init 2025-09-27 21:21:48 -03:00
nixpkgs-ci[bot]
ca7f2a47c0 Merge staging-next into staging 2025-09-19 18:06:36 +00:00
Marie Ramlow
556db31dcb openssl: fix powerpc-linux build 2025-09-10 17:44:05 +02:00
Markus Theil
c4c0446ff9 openssl: 3.5.1 -> 3.5.2
No security fixes included.

Contains small fixes for QUIC and FIPS mode.

Changelog: https://github.com/openssl/openssl/blob/openssl-3.5/CHANGES.md#changes-between-351-and-352-5-aug-2025

Signed-off-by: Markus Theil <theil.markus@gmail.com>
2025-08-05 20:02:09 +02:00
Wolfgang Walther
5a0711127c treewide: run nixfmt 1.0.0 2025-07-24 13:55:40 +02:00
Markus Theil
663f537360 openssl_3: 3.0.16 -> 3.0.17
- Fixes no CVEs
- Bugfixes only
- Upstream URL: no changes listed
- Commits Changes: https://github.com/openssl/openssl/compare/openssl-3.0.16...openssl-3.0.17

Signed-off-by: Markus Theil <theil.markus@gmail.com>
2025-07-02 10:28:59 +02:00
Markus Theil
54cf737988 openssl_3_5: 3.5.0 -> 3.5.1
Taken from OpenSSL Release Page:

OpenSSL 3.5.1 is a security patch release. The most severe CVE fixed in this
release is Low.

This release incorporates the following bug fixes and mitigations:

- Fix x509 application adds trusted use instead of rejected use.
  ([CVE-2025-4575])

Signed-off-by: Markus Theil <theil.markus@gmail.com>
2025-07-01 17:18:21 +02:00
Martin Weinelt
15806556b7 openssl: 3.4.1 -> 3.5.0 (#397123) 2025-06-13 11:41:52 +02:00
Peder Bergebakken Sundt
c77ac9dfc3 treewide: fix typos 2025-06-02 16:07:07 +02:00
Markus Theil
6b31f8df35 openssl_3_5: fix for CVE-2025-4575
See: https://openssl-library.org/news/vulnerabilities/#CVE-2025-4575

Signed-off-by: Markus Theil <theil.markus@gmail.com>
2025-05-23 15:31:49 +02:00
Markus Theil
3faaa3c83b openssl: adaptations for combined handshakes and the PQC era
Now that PQC is in OpenSSL 3.5 by default,
handshakes will took longer, as the can combine
a PQC algorithm with a conventional one.

Therefore add the elliptic curve optimization
for x86_64 which Arch Linux is also using by
default (enable-ec_nistp_64_gcc_128).

Furthermore, make the security level configurable
for power users. Setting this to 5 will only allow for
connections with security strength 256 bit. Please
beware, that this may lead to no common cipher and key
lengths (no connection at all). Set to OpenSSL's default
when not set (2 for OpenSSL 3.5).

Signed-off-by: Markus Theil <theil.markus@gmail.com>
2025-05-23 15:21:28 +02:00
Markus Theil
a1de5187fb openssl: 3.4.1 -> 3.5.0
This release introduces PCQ and server side
QUIC support.

Changelog:
https://github.com/openssl/openssl/blob/openssl-3.5/CHANGES.md#openssl-35

Signed-off-by: Markus Theil <theil.markus@gmail.com>
2025-05-23 15:21:28 +02:00
jopejoe1
948c3f5e2c openssl: don't create separateDebugInfo on android
This causes an infinite recursion when evaling tests.cross.gcc.file.aarch64-android
2025-05-13 20:31:03 +02:00
Fernando Rodrigues
05580f4b44 treewide: switch instances of lib.teams.*.members to the new meta.teams attribute
Follow-up to #394797.

Signed-off-by: Fernando Rodrigues <alpha@sigmasquadron.net>
2025-04-25 22:20:17 -03:00
Alyssa Ross
b09f1cd54a openssl: fix hash
This is the hash for the GitHub snapshot of the 3.4.1 tag, not the
official tarball we're using.  When the PR doing this update was
updated after the tarballs came out, updating the hash was forgotten.

I've checked the hashes of the other OpenSSL versions and they're
fine.

Fixes: c05c515eff ("openssl_3_4: init at 3.4.1; openssl_3_3: remove")
2025-02-11 17:45:52 +01:00
Markus Theil
9a706eda06 openssl_3: 3.0.15 -> 3.0.16
Security Fixes in 3.0.16:

* Fixed timing side-channel in ECDSA signature computation. (CVE-2024-13176)
* Fixed possible OOB memory access with invalid low-level GF(2^m) elliptic curve parameters. (CVE-2024-9143)

Signed-off-by: Markus Theil <theil.markus@gmail.com>
2025-02-11 16:02:03 +01:00
Markus Theil
c05c515eff openssl_3_4: init at 3.4.1; openssl_3_3: remove
Updates OpenSSL 3.x latest to 3.4.1

Security Fixes in 3.4.1:
* Fixed RFC7250 handshakes with unauthenticated servers don't abort as expected. ([CVE-2024-12797])
* Fixed timing side-channel in ECDSA signature computation. ([CVE-2024-13176](https://www.openssl.org/news/vulnerabilities.html#CVE-2024-13176))

Release notes:
https://github.com/openssl/openssl/blob/openssl-3.4.0/NEWS.md#openssl-34

Some significant changes:
* Deprecation of TS_VERIFY_CTX_set_* functions and addition of replacement TS_VERIFY_CTX_set0_*
  functions with improved semantics
* SHAKE-128 and SHAKE-256 implementations have no default digest length anymore.
  That means these algorithms cannot be used with EVP_DigestFinal/_ex() unless the xoflen param is set before.
* An empty renegotiate extension will be used in TLS client hellos instead of the empty renegotiation SCSV, for
  all connections with a minimum TLS version > 1.0.
* Deprecation of SSL_SESSION_get_time(), SSL_SESSION_set_time() and SSL_CTX_flush_sessions() functions in favor
  of their respective _ex functions which are Y2038-safe on platforms with Y2038-safe time_t

Some new features:
* Support for directly fetched composite signature algorithms such as RSA-SHA2-256 including new API functions
* New options -not_before and -not_after for explicit setting start and end dates of certificates created with
  the req and x509 apps
* Support for attribute certificates
* Support for pkeyutl in combination with key encapsulation (e.q.
  PQC-KEMs): -encap/-decap

Signed-off-by: Markus Theil <theil.markus@gmail.com>
2025-02-11 15:48:51 +01:00
Silvan Mosberger
667d42c00d treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev 57b193d8dd
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:27:17 +01:00
Markus Theil
b7e2eb1e21 openssl_3_2: remove and switch single user to the default openssl
Signed-off-by: Markus Theil <theil.markus@gmail.com>

Picked from PR https://github.com/NixOS/nixpkgs/pull/345998
except that vcunat used `openssl` instead of `openssl_3_3`

I do think that we should be well covered with 3.0 and 3.3.
https://github.com/openssl/openssl/blob/openssl-3.3.0/NEWS.md
2024-10-08 09:23:19 +02:00
Artturin
f0e657f3b1 Merge branch 'master' into staging-next 2024-09-25 06:05:01 +03:00
Artturin
e0464e4788 treewide: replace stdenv.is with stdenv.hostPlatform.is
In preparation for the deprecation of `stdenv.isX`.

These shorthands are not conducive to cross-compilation because they
hide the platforms.

Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way

One example of why this is bad and especially affects compiler packages
https://www.github.com/NixOS/nixpkgs/pull/343059

There are too many files to go through manually but a treewide should
get users thinking when they see a `hostPlatform.isX` in a place where it
doesn't make sense.

```
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is"
fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is"
```
2024-09-25 00:04:37 +03:00
Markus Theil
12b97a409b openssl_3_3: move cmake rm to correct phase
Signed-off-by: Markus Theil <theil.markus@gmail.com>
2024-09-24 07:55:06 +02:00
Markus Theil
72cc50b662 openssl_3_3: hotfix for cmake builds
Signed-off-by: Markus Theil <theil.markus@gmail.com>
(cherry picked from commit fd1745b860)
2024-09-23 21:03:01 +01:00
Markus Theil
2cd1c935bb openssl_3_2: 3.2.2 -> 3.2.3
Contains two CVE fixes.

* Fixed possible denial of service in X.509 name checks. (CVE-2024-6119)
* Fixed possible buffer overread in SSL_select_next_proto(). (CVE-2024-5535)

Changelog: https://github.com/openssl/openssl/blob/openssl-3.2/CHANGES.md#changes-between-322-and-323-3-sep-2024

Signed-off-by: Markus Theil <theil.markus@gmail.com>
2024-09-16 09:44:41 +02:00
Markus Theil
6fef5775cc openssl_3: 3.0.14 -> 3.0.15
Contains two CVE fixes.

* Fixed possible denial of service in X.509 name checks. (CVE-2024-6119)
* Fixed possible buffer overread in SSL_select_next_proto(). (CVE-2024-5535)

Changelog: https://github.com/openssl/openssl/blob/openssl-3.0/CHANGES.md#changes-between-3014-and-3015-3-sep-2024

Signed-off-by: Markus Theil <theil.markus@gmail.com>
2024-09-16 09:44:41 +02:00
Markus Theil
64ab30598c openssl_3_3: 3.3.1 -> 3.3.2
Contains two CVE fixes.

* Fixed possible denial of service in X.509 name checks. (CVE-2024-6119)
* Fixed possible buffer overread in SSL_select_next_proto(). (CVE-2024-5535)

Changelog: https://github.com/openssl/openssl/blob/openssl-3.3/CHANGES.md#changes-between-331-and-332-3-sep-2024

Signed-off-by: Markus Theil <theil.markus@gmail.com>
2024-09-16 09:44:41 +02:00
Markus Theil
38f10f915a openssl: switch to new download URL scheme (Github releases)
OpenSSL used to provide their software downloads on openssl.org.
Now they use links to Github releases.

OpenSSL 1.1.1w is also available at Github, but with a small
difference in the URL scheme.

Signed-off-by: Markus Theil <theil.markus@gmail.com>
2024-09-16 09:44:40 +02:00
github-actions[bot]
83e85079ff Merge staging-next into staging 2024-09-12 18:04:48 +00:00
Arnout Engelen
c02a0dff78 openssl: expose 'enable-md2' option (#337885) 2024-09-12 17:20:18 +02:00
Philip Taron
40319dafd9 openssl: use makeBinaryWrapper instead of makeShellWrapper (#340951) 2024-09-11 04:37:31 -07:00
Ivan Trubach
155fb5be70 openssl: use makeBinaryWrapper instead of makeShellWrapper
This changes openssl to use makeBinaryWrapper since makeWrapper uses
non-overridable runtimeShell that causes infinite recursion. That is,
fetchurl in pkgs/top-level/all-packages.nix is bootstrapped by
overriding dependencies to use stdenv.fetchurlBoot.
2024-09-10 10:59:31 +03:00
Alyssa Ross
858c3f6081 openssl: fix building for riscv32-linux
Prior to 3.2, there's no linux32-riscv32 target, so we use
linux-latomic as a best approximation in that case.
2024-09-02 19:57:34 +02:00
Alyssa Ross
d303f0f65b openssl: fix build for microblaze 2024-09-01 22:28:34 +02:00
Arnout Engelen
6be6702d45 openssl: expose 'enable-md2' option
needed e.g. to build `onlyoffice-documentserver` from source
2024-08-30 13:50:27 +02:00
Philip Taron
2429bed692 openssl: remove with statements 2024-08-18 06:31:16 -07:00
Vladimír Čunát
211398c03e Merge branch 'staging-next' into staging 2024-07-14 08:35:35 +02:00