aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo Buehler <tb@openbsd.org>2023-05-25 09:11:58 +0200
committerTheo Buehler <tb@openbsd.org>2023-05-25 09:13:36 +0200
commit1581cb1823377220ed1976451615a1f5e856adf0 (patch)
tree52a7e1991a9bed749f4e5e6f18ec69f30991f9c8
parenta5f207bea5b54c5066ac99cc8112a5aa0b56dec4 (diff)
downloadportable-1581cb1823377220ed1976451615a1f5e856adf0.tar.gz
portable-1581cb1823377220ed1976451615a1f5e856adf0.tar.bz2
portable-1581cb1823377220ed1976451615a1f5e856adf0.zip
Fix urllib3 CN without SAN tests for LibreSSL 3.7
This is a port of a patch by Christian Heimes and fixes an issue flagged by Quentin Pradet: https://bugs.python.org/issue43522
-rw-r--r--ChangeLog7
-rw-r--r--patches/x509_vpm.c.patch21
2 files changed, 28 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 5babe4f..cc1bfbe 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -28,6 +28,13 @@ history is also available from Git.
28 28
29LibreSSL Portable Release Notes: 29LibreSSL Portable Release Notes:
30 30
31
323.7.3 - Stable release
33
34 * Bug fix
35 - Hostflags in the verify parameters would not propagate from an
36 SSL_CTX to newly created SSL.
37
313.7.2 - Stable release 383.7.2 - Stable release
32 39
33 * Portable changes 40 * Portable changes
diff --git a/patches/x509_vpm.c.patch b/patches/x509_vpm.c.patch
new file mode 100644
index 0000000..8809471
--- /dev/null
+++ b/patches/x509_vpm.c.patch
@@ -0,0 +1,21 @@
1--- crypto/x509/x509_vpm.c.orig Thu May 25 09:08:38 2023
2+++ crypto/x509/x509_vpm.c Thu May 25 09:08:48 2023
3@@ -330,7 +330,9 @@ X509_VERIFY_PARAM_inherit(X509_VERIFY_PARAM *dest, con
4 return 0;
5 }
6
7- /* Copy the host flags if and only if we're copying the host list */
8+ if (test_x509_verify_param_copy_id(hostflags, 0))
9+ dest->id->hostflags = id->hostflags;
10+
11 if (test_x509_verify_param_copy_id(hosts, NULL)) {
12 if (dest->id->hosts) {
13 string_stack_free(dest->id->hosts);
14@@ -341,7 +343,6 @@ X509_VERIFY_PARAM_inherit(X509_VERIFY_PARAM *dest, con
15 sk_deep_copy(id->hosts, strdup, str_free);
16 if (dest->id->hosts == NULL)
17 return 0;
18- dest->id->hostflags = id->hostflags;
19 }
20 }
21