aboutsummaryrefslogtreecommitdiff
path: root/patches/x509_vpm.c.patch
blob: b0a32155883a8b5ba37b501f93c5f4144cf3fdb8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--- crypto/x509/x509_vpm.c.orig	Thu May 25 07:41:58 2023
+++ crypto/x509/x509_vpm.c	Thu May 25 07:47:42 2023
@@ -328,7 +328,9 @@ X509_VERIFY_PARAM_inherit(X509_VERIFY_PARAM *dest, con
 			return 0;
 	}
 
-	/* Copy the host flags if and only if we're copying the host list */
+	if (test_x509_verify_param_copy_id(hostflags, 0))
+		dest->id->hostflags = id->hostflags;
+
 	if (test_x509_verify_param_copy_id(hosts, NULL)) {
 		if (dest->id->hosts) {
 			string_stack_free(dest->id->hosts);
@@ -339,7 +341,6 @@ X509_VERIFY_PARAM_inherit(X509_VERIFY_PARAM *dest, con
 			    sk_deep_copy(id->hosts, strdup, str_free);
 			if (dest->id->hosts == NULL)
 				return 0;
-			dest->id->hostflags = id->hostflags;
 		}
 	}