aboutsummaryrefslogtreecommitdiff
path: root/patches/tlsexttest.c.patch
diff options
context:
space:
mode:
authorkinichiro <kinichiro.inoguchi@gmail.com>2020-05-12 20:21:18 +0900
committerkinichiro <kinichiro.inoguchi@gmail.com>2020-05-12 20:21:18 +0900
commit3b5ae00b00ce25ac6b406f1bef539cd26d6edf33 (patch)
tree624fe6fe650db16b4dd40755a94656a10babde43 /patches/tlsexttest.c.patch
parent740488d89e69d026b8db0bf75b8bfe02ee464a3d (diff)
downloadportable-3b5ae00b00ce25ac6b406f1bef539cd26d6edf33.tar.gz
portable-3b5ae00b00ce25ac6b406f1bef539cd26d6edf33.tar.bz2
portable-3b5ae00b00ce25ac6b406f1bef539cd26d6edf33.zip
Fix patch for tests/tlsexttest.c
Diffstat (limited to 'patches/tlsexttest.c.patch')
-rw-r--r--patches/tlsexttest.c.patch49
1 files changed, 7 insertions, 42 deletions
diff --git a/patches/tlsexttest.c.patch b/patches/tlsexttest.c.patch
index 205f30b..e3acfd8 100644
--- a/patches/tlsexttest.c.patch
+++ b/patches/tlsexttest.c.patch
@@ -1,6 +1,6 @@
1--- tests/tlsexttest.c.orig Sat Feb 15 11:04:42 2020 1--- tests/tlsexttest.c.orig Tue May 12 20:06:02 2020
2+++ tests/tlsexttest.c Sat Feb 15 11:25:30 2020 2+++ tests/tlsexttest.c Tue May 12 20:15:28 2020
3@@ -1656,7 +1656,9 @@ 3@@ -1657,7 +1657,9 @@
4 }; 4 };
5 5
6 static unsigned char tlsext_sni_server[] = { 6 static unsigned char tlsext_sni_server[] = {
@@ -10,7 +10,7 @@
10 10
11 static int 11 static int
12 test_tlsext_sni_client(void) 12 test_tlsext_sni_client(void)
13@@ -1819,9 +1821,9 @@ 13@@ -1820,9 +1822,9 @@
14 if (!CBB_finish(&cbb, &data, &dlen)) 14 if (!CBB_finish(&cbb, &data, &dlen))
15 errx(1, "failed to finish CBB"); 15 errx(1, "failed to finish CBB");
16 16
@@ -22,7 +22,7 @@
22 goto err; 22 goto err;
23 } 23 }
24 24
25@@ -1830,14 +1832,14 @@ 25@@ -1831,14 +1833,14 @@
26 fprintf(stderr, "received:\n"); 26 fprintf(stderr, "received:\n");
27 hexdump(data, dlen); 27 hexdump(data, dlen);
28 fprintf(stderr, "test data:\n"); 28 fprintf(stderr, "test data:\n");
@@ -39,7 +39,7 @@
39 if (!tlsext_sni_client_parse(ssl, &cbs, &alert)) { 39 if (!tlsext_sni_client_parse(ssl, &cbs, &alert)) {
40 FAIL("failed to parse server SNI\n"); 40 FAIL("failed to parse server SNI\n");
41 goto err; 41 goto err;
42@@ -2721,7 +2723,10 @@ 42@@ -2722,7 +2724,10 @@
43 0x02, 0x01, 0x02, 0x03, 43 0x02, 0x01, 0x02, 0x03,
44 }; 44 };
45 45
@@ -51,7 +51,7 @@
51 51
52 static int 52 static int
53 test_tlsext_clienthello_build(void) 53 test_tlsext_clienthello_build(void)
54@@ -2786,18 +2791,18 @@ 54@@ -2787,18 +2792,18 @@
55 if (!CBB_finish(&cbb, &data, &dlen)) 55 if (!CBB_finish(&cbb, &data, &dlen))
56 errx(1, "failed to finish CBB"); 56 errx(1, "failed to finish CBB");
57 57
@@ -74,38 +74,3 @@
74 goto err; 74 goto err;
75 } 75 }
76 76
77@@ -2812,7 +2817,10 @@
78 return (failure);
79 }
80
81-unsigned char tlsext_serverhello_default[] = {};
82+unsigned char tlsext_serverhello_default[] = {
83+ 0x00
84+};
85+const size_t sizeof_tlsext_serverhello_default = 0;
86
87 unsigned char tlsext_serverhello_enabled[] = {
88 0x00, 0x13, 0xff, 0x01, 0x00, 0x01, 0x00, 0x00,
89@@ -2852,18 +2860,18 @@
90 if (!CBB_finish(&cbb, &data, &dlen))
91 errx(1, "failed to finish CBB");
92
93- if (dlen != sizeof(tlsext_serverhello_default)) {
94+ if (dlen != sizeof_tlsext_serverhello_default) {
95 FAIL("got serverhello extensions with length %zu, "
96 "want length %zu\n", dlen,
97- sizeof(tlsext_serverhello_default));
98+ sizeof_tlsext_serverhello_default);
99 compare_data(data, dlen, tlsext_serverhello_default,
100- sizeof(tlsext_serverhello_default));
101+ sizeof_tlsext_serverhello_default);
102 goto err;
103 }
104 if (memcmp(data, tlsext_serverhello_default, dlen) != 0) {
105 FAIL("serverhello extensions differs:\n");
106 compare_data(data, dlen, tlsext_serverhello_default,
107- sizeof(tlsext_serverhello_default));
108+ sizeof_tlsext_serverhello_default);
109 goto err;
110 }
111