aboutsummaryrefslogtreecommitdiff
path: root/patches
diff options
context:
space:
mode:
authorBrent Cook <bcook@openbsd.org>2018-01-07 16:21:11 -0600
committerBrent Cook <bcook@openbsd.org>2018-01-07 16:21:11 -0600
commitc3210983a5b466d310dc5af6cc58dec8ad61f02c (patch)
treeb4e74319d23f04bb5983a818b0105d91f16260ef /patches
parent40e04292a0d3a7e3221c2c45ced70f61b94d12ac (diff)
parent861a6ca1db1f3ce95c649274a58ea38c2c4ac4a0 (diff)
downloadportable-c3210983a5b466d310dc5af6cc58dec8ad61f02c.tar.gz
portable-c3210983a5b466d310dc5af6cc58dec8ad61f02c.tar.bz2
portable-c3210983a5b466d310dc5af6cc58dec8ad61f02c.zip
Land #374, hp-ux compatibility
Merge remote-tracking branch 'upstream/pr/374'
Diffstat (limited to 'patches')
-rw-r--r--patches/tlsexttest.c.patch76
1 files changed, 73 insertions, 3 deletions
diff --git a/patches/tlsexttest.c.patch b/patches/tlsexttest.c.patch
index 12d473b..981fc95 100644
--- a/patches/tlsexttest.c.patch
+++ b/patches/tlsexttest.c.patch
@@ -1,6 +1,6 @@
1--- tests/tlsexttest.c.orig Sun Sep 3 00:44:51 2017 1--- tests/tlsexttest.c.orig 2017-12-30 20:03:09.279079726 +0900
2+++ tests/tlsexttest.c Sun Sep 3 00:47:06 2017 2+++ tests/tlsexttest.c 2017-12-30 20:07:21.849939140 +0900
3@@ -1676,7 +1676,9 @@ static unsigned char tlsext_sni_clienthello[] = { 3@@ -1676,7 +1676,9 @@ static unsigned char tlsext_sni_clienthe
4 }; 4 };
5 5
6 static unsigned char tlsext_sni_serverhello[] = { 6 static unsigned char tlsext_sni_serverhello[] = {
@@ -39,3 +39,73 @@
39 if (!tlsext_sni_serverhello_parse(ssl, &cbs, &alert)) { 39 if (!tlsext_sni_serverhello_parse(ssl, &cbs, &alert)) {
40 FAIL("failed to parse serverhello SNI\n"); 40 FAIL("failed to parse serverhello SNI\n");
41 goto err; 41 goto err;
42@@ -2741,7 +2743,10 @@ unsigned char tlsext_clienthello_default
43 0x03, 0x01, 0x03, 0x03, 0x02, 0x01, 0x02, 0x03,
44 };
45
46-unsigned char tlsext_clienthello_disabled[] = {};
47+unsigned char tlsext_clienthello_disabled[] = {
48+ 0x00
49+};
50+const size_t sizeof_tlsext_clienthello_disabled = 0;
51
52 static int
53 test_tlsext_clienthello_build(void)
54@@ -2806,18 +2811,18 @@ test_tlsext_clienthello_build(void)
55 if (!CBB_finish(&cbb, &data, &dlen))
56 errx(1, "failed to finish CBB");
57
58- if (dlen != sizeof(tlsext_clienthello_disabled)) {
59+ if (dlen != sizeof_tlsext_clienthello_disabled) {
60 FAIL("got clienthello extensions with length %zu, "
61 "want length %zu\n", dlen,
62- sizeof(tlsext_clienthello_disabled));
63+ sizeof_tlsext_clienthello_disabled);
64 compare_data(data, dlen, tlsext_clienthello_disabled,
65- sizeof(tlsext_clienthello_disabled));
66+ sizeof_tlsext_clienthello_disabled);
67 goto err;
68 }
69 if (memcmp(data, tlsext_clienthello_disabled, dlen) != 0) {
70 FAIL("clienthello extensions differs:\n");
71 compare_data(data, dlen, tlsext_clienthello_disabled,
72- sizeof(tlsext_clienthello_disabled));
73+ sizeof_tlsext_clienthello_disabled);
74 goto err;
75 }
76
77@@ -2832,7 +2837,10 @@ test_tlsext_clienthello_build(void)
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@@ -2872,18 +2880,18 @@ test_tlsext_serverhello_build(void)
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