Skip to content

Commit

Permalink
Merge pull request #96 from git-for-windows/mingw-w64-openssl-3.1.4
Browse files Browse the repository at this point in the history
mingw-w64-openssl: update to 3.1.4
  • Loading branch information
dscho authored Oct 25, 2023
2 parents e32d5db + 87bfbed commit a51fbea
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 3 deletions.
39 changes: 39 additions & 0 deletions mingw-w64-openssl/0001-test_rand-use-the-better-chomp.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
From 820803594c31daa2c96921f2d7888c88b1edc97e Mon Sep 17 00:00:00 2001
From: Johannes Schindelin <johannes.schindelin@gmx.de>
Date: Wed, 25 Oct 2023 17:10:17 +0200
Subject: [PATCH] test_rand: use the "better chomp"

Following in the footsteps of
https://github.com/openssl/openssl/commit/9ba96fbb2523cb12747c559c704c58bd8f9e7982
(Perl's chop / chomp considered bad, use a regexp instead, 2016-02-11),
let's not use `chomp()` here because it would leave Carriage Returns in
place, making the test fail in the MINGW build on Windows.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
test/recipes/05-test_rand.t | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/test/recipes/05-test_rand.t b/test/recipes/05-test_rand.t
index aa012c1..f2c1374 100644
--- a/test/recipes/05-test_rand.t
+++ b/test/recipes/05-test_rand.t
@@ -28,13 +28,13 @@ SKIP: {

@randdata = run(app(['openssl', 'rand', '-engine', 'ossltest', '-hex', '16' ]),
capture => 1, statusvar => \$success);
- chomp(@randdata);
+ $_ =~ s|\R+$|| for @randdata;
ok($success && $randdata[0] eq $expected,
"rand with ossltest: Check rand output is as expected");

@randdata = run(app(['openssl', 'rand', '-engine', 'dasync', '-hex', '16' ]),
capture => 1, statusvar => \$success);
- chomp(@randdata);
+ $_ =~ s|\R+$|| for @randdata;
ok($success && length($randdata[0]) == 32,
"rand with dasync: Check rand output is of expected length");
}
--
2.42.0.windows.2

9 changes: 6 additions & 3 deletions mingw-w64-openssl/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ _realname=openssl
pkgbase=mingw-w64-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}"
"${MINGW_PACKAGE_PREFIX}-${_realname}-pdb")
pkgver=3.1.3
pkgver=3.1.4
pkgrel=1
pkgdesc="The Open Source toolkit for Secure Sockets Layer and Transport Layer Security (mingw-w64)"
arch=('any')
Expand All @@ -21,12 +21,14 @@ options=('!strip' '!buildflags')
source=("https://www.openssl.org/source/openssl-${pkgver}.tar.gz"{,.asc}
'001-support-aarch64.patch'
'002-relocation.patch'
'0001-test_rand-use-the-better-chomp.patch'
'pathtools.c'
'pathtools.h')
sha256sums=('f0316a2ebd89e7f2352976445458689f80302093788c466692fb2a188b2eacf6'
sha256sums=('840af5366ab9b522bde525826be3ef0fb0af81c6a9ebd84caa600fea1731eee3'
'SKIP'
'21b96771b401442570e885c2d5689a359a91e86dcbf5511db3667202b6c1fa8a'
'5628dd39ab0d3ce4afbb5207bab5d22766abc86a8875b48b6d4d3efd68550e68'
'56fcd20131ae0c563db18ae00c6ba3b95cd9cb1e9934548079284ba3f52ad250'
'08209cbf1633fa92eae7e5d28f95f8df9d6184cc20fa878c99aec4709bb257fd'
'965d3921ec4fdeec94a2718bc2c85ce5e1a00ea0e499330a554074a7ae15dfc6')

Expand Down Expand Up @@ -54,7 +56,8 @@ prepare() {

apply_patch_with_msg \
001-support-aarch64.patch \
002-relocation.patch
002-relocation.patch \
0001-test_rand-use-the-better-chomp.patch

test ! -d "${startdir}/../mingw-w64-pathtools" || {
cmp "${startdir}/../mingw-w64-pathtools/pathtools.c" "${srcdir}/pathtools.c" &&
Expand Down

0 comments on commit a51fbea

Please sign in to comment.