Skip to content

Commit 392f2fd

Browse files
committed
mingw-w64-openssl: update to 3.5.3
Signed-off-by: Matthias Aßhauer <[email protected]>
1 parent 4f76526 commit 392f2fd

File tree

7 files changed

+413
-60
lines changed

7 files changed

+413
-60
lines changed

mingw-w64-openssl/002-relocation.patch

Lines changed: 34 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
--- a/crypto/build.info
22
+++ b/crypto/build.info
33
@@ -107,7 +107,7 @@
4-
cversion.c info.c cpt_err.c ebcdic.c uid.c o_time.c o_dir.c \
5-
o_fopen.c getenv.c o_init.c init.c trace.c provider.c provider_child.c \
6-
punycode.c passphrase.c sleep.c deterministic_nonce.c quic_vlint.c \
7-
- time.c
8-
+ time.c pathtools.c
4+
comp_methods.c cversion.c info.c cpt_err.c ebcdic.c uid.c o_time.c \
5+
o_dir.c o_fopen.c getenv.c o_init.c init.c trace.c provider.c \
6+
provider_child.c punycode.c passphrase.c sleep.c deterministic_nonce.c \
7+
- quic_vlint.c time.c defaults.c ssl_err.c
8+
+ quic_vlint.c time.c defaults.c ssl_err.c pathtools.c
99
SOURCE[../providers/libfips.a]=$UTIL_COMMON
1010

1111
SOURCE[../libcrypto]=$UPLINKSRC
@@ -24,11 +24,11 @@
2424
*/
2525
if (strcmp(id, "dynamic")) {
2626
- if ((load_dir = ossl_safe_getenv("OPENSSL_ENGINES")) == NULL)
27-
- load_dir = ENGINESDIR;
27+
- load_dir = ossl_get_enginesdir();
2828
+ if ((load_dir = ossl_safe_getenv("OPENSSL_ENGINES")) == NULL) {
2929
+ static char * reloc = NULL;
3030
+ if (reloc == NULL) {
31-
+ reloc = single_path_relocation_lib(OPENSSLBIN, ENGINESDIR);
31+
+ reloc = single_path_relocation_lib(OPENSSLBIN, ossl_get_enginesdir());
3232
+ }
3333
+ load_dir = reloc;
3434
+ }
@@ -37,55 +37,38 @@
3737
!ENGINE_ctrl_cmd_string(iterator, "DIR_LOAD", "2", 0) ||
3838
--- a/crypto/x509/x509_def.c
3939
+++ b/crypto/x509/x509_def.c
40-
@@ -9,27 +9,44 @@
41-
40+
@@ -10,6 +10,7 @@
4241
#include <stdio.h>
42+
#include "internal/e_os.h"
4343
#include "internal/cryptlib.h"
4444
+#include "pathtools.h"
45+
#include "internal/thread_once.h"
4546
#include <openssl/crypto.h>
46-
#include <openssl/x509.h>
47-
48-
const char *X509_get_default_private_dir(void)
47+
#include <openssl/x509.h>
48+
@@ -47,19 +48,19 @@
4949
{
50-
- return X509_PRIVATE_DIR;
51-
+ static char * reloc = NULL;
52-
+ if (reloc == NULL) {
53-
+ reloc = single_path_relocation_lib(OPENSSLBIN, X509_PRIVATE_DIR);
54-
+ }
55-
+ return reloc;
56-
}
50+
get_windows_default_path(x509_private_dir, "\\private");
51+
if (strlen(x509_private_dir) > 0)
52+
- x509_private_dirptr = x509_private_dir;
53+
+ x509_private_dirptr = single_path_relocation_lib(OPENSSLBIN, x509_private_dir);
5754

58-
const char *X509_get_default_cert_area(void)
59-
{
60-
- return X509_CERT_AREA;
61-
+ static char * reloc = NULL;
62-
+ if (reloc == NULL) {
63-
+ reloc = single_path_relocation_lib(OPENSSLBIN, X509_CERT_AREA);
64-
+ }
65-
+ return reloc;
66-
}
55+
get_windows_default_path(x509_cert_area, "\\");
56+
if (strlen(x509_cert_area) > 0)
57+
- x509_cert_areaptr = x509_cert_area;
58+
+ x509_cert_areaptr = single_path_relocation_lib(OPENSSLBIN, x509_cert_area);
6759

68-
const char *X509_get_default_cert_dir(void)
69-
{
70-
- return X509_CERT_DIR;
71-
+ static char * reloc = NULL;
72-
+ if (reloc == NULL) {
73-
+ reloc = single_path_relocation_lib(OPENSSLBIN, X509_CERT_DIR);
74-
+ }
75-
+ return reloc;
76-
}
60+
get_windows_default_path(x509_cert_dir, "\\certs");
61+
if (strlen(x509_cert_dir) > 0)
62+
- x509_cert_dirptr = x509_cert_dir;
63+
+ x509_cert_dirptr = single_path_relocation_lib(OPENSSLBIN, x509_cert_dir);
7764

78-
const char *X509_get_default_cert_file(void)
79-
{
80-
- return X509_CERT_FILE;
81-
+ static char * reloc = NULL;
82-
+ if (reloc == NULL) {
83-
+ reloc = single_path_relocation_lib(OPENSSLBIN, X509_CERT_FILE);
84-
+ }
85-
+ return reloc;
86-
}
65+
get_windows_default_path(x509_cert_file, "\\cert.pem");
66+
if (strlen(x509_cert_file) > 0)
67+
- x509_cert_fileptr = x509_cert_file;
68+
+ x509_cert_fileptr = single_path_relocation_lib(OPENSSLBIN, x509_cert_file);
8769

88-
const char *X509_get_default_cert_dir_env(void)
70+
return 1;
71+
}
8972
--- a/crypto/provider_core.c
9073
+++ b/crypto/provider_core.c
9174
@@ -30,6 +30,7 @@
@@ -96,16 +79,16 @@
9679
#ifndef FIPS_MODULE
9780
# include <openssl/self_test.h>
9881
#endif
99-
@@ -916,8 +917,13 @@
100-
82+
@@ -989,8 +990,13 @@
83+
10184
if (load_dir == NULL) {
10285
load_dir = ossl_safe_getenv("OPENSSL_MODULES");
10386
- if (load_dir == NULL)
104-
- load_dir = MODULESDIR;
87+
- load_dir = ossl_get_modulesdir();
10588
+ if (load_dir == NULL) {
10689
+ static char * reloc = NULL;
10790
+ if (reloc == NULL) {
108-
+ reloc = single_path_relocation_lib(OPENSSLBIN, MODULESDIR);
91+
+ reloc = single_path_relocation_lib(OPENSSLBIN, ossl_get_modulesdir());
10992
+ }
11093
+ load_dir = reloc;
11194
+ }

mingw-w64-openssl/0001-test_rand-use-the-better-chomp.patch renamed to mingw-w64-openssl/003-test_rand-use-the-better-chomp.patch

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ diff --git a/test/recipes/05-test_rand.t b/test/recipes/05-test_rand.t
1818
index aa012c1..f2c1374 100644
1919
--- a/test/recipes/05-test_rand.t
2020
+++ b/test/recipes/05-test_rand.t
21-
@@ -28,13 +28,13 @@ SKIP: {
21+
@@ -36,17 +36,17 @@ SKIP: {
2222

2323
@randdata = run(app(['openssl', 'rand', '-engine', 'ossltest', '-hex', '16' ]),
2424
capture => 1, statusvar => \$success);
@@ -27,6 +27,11 @@ index aa012c1..f2c1374 100644
2727
ok($success && $randdata[0] eq $expected,
2828
"rand with ossltest: Check rand output is as expected");
2929

30+
@randdata = run(app(['openssl', 'rand', '-hex', '2K' ]),
31+
capture => 1, statusvar => \$success);
32+
- chomp(@randdata);
33+
+ $_ =~ s|\R+$|| for @randdata;
34+
3035
@randdata = run(app(['openssl', 'rand', '-engine', 'dasync', '-hex', '16' ]),
3136
capture => 1, statusvar => \$success);
3237
- chomp(@randdata);

0 commit comments

Comments
 (0)