From 3b5ae00b00ce25ac6b406f1bef539cd26d6edf33 Mon Sep 17 00:00:00 2001 From: kinichiro Date: Tue, 12 May 2020 20:21:18 +0900 Subject: Fix patch for tests/tlsexttest.c --- patches/tlsexttest.c.patch | 49 +++++++--------------------------------------- 1 file 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 @@ ---- tests/tlsexttest.c.orig Sat Feb 15 11:04:42 2020 -+++ tests/tlsexttest.c Sat Feb 15 11:25:30 2020 -@@ -1656,7 +1656,9 @@ +--- tests/tlsexttest.c.orig Tue May 12 20:06:02 2020 ++++ tests/tlsexttest.c Tue May 12 20:15:28 2020 +@@ -1657,7 +1657,9 @@ }; static unsigned char tlsext_sni_server[] = { @@ -10,7 +10,7 @@ static int test_tlsext_sni_client(void) -@@ -1819,9 +1821,9 @@ +@@ -1820,9 +1822,9 @@ if (!CBB_finish(&cbb, &data, &dlen)) errx(1, "failed to finish CBB"); @@ -22,7 +22,7 @@ goto err; } -@@ -1830,14 +1832,14 @@ +@@ -1831,14 +1833,14 @@ fprintf(stderr, "received:\n"); hexdump(data, dlen); fprintf(stderr, "test data:\n"); @@ -39,7 +39,7 @@ if (!tlsext_sni_client_parse(ssl, &cbs, &alert)) { FAIL("failed to parse server SNI\n"); goto err; -@@ -2721,7 +2723,10 @@ +@@ -2722,7 +2724,10 @@ 0x02, 0x01, 0x02, 0x03, }; @@ -51,7 +51,7 @@ static int test_tlsext_clienthello_build(void) -@@ -2786,18 +2791,18 @@ +@@ -2787,18 +2792,18 @@ if (!CBB_finish(&cbb, &data, &dlen)) errx(1, "failed to finish CBB"); @@ -74,38 +74,3 @@ goto err; } -@@ -2812,7 +2817,10 @@ - return (failure); - } - --unsigned char tlsext_serverhello_default[] = {}; -+unsigned char tlsext_serverhello_default[] = { -+ 0x00 -+}; -+const size_t sizeof_tlsext_serverhello_default = 0; - - unsigned char tlsext_serverhello_enabled[] = { - 0x00, 0x13, 0xff, 0x01, 0x00, 0x01, 0x00, 0x00, -@@ -2852,18 +2860,18 @@ - if (!CBB_finish(&cbb, &data, &dlen)) - errx(1, "failed to finish CBB"); - -- if (dlen != sizeof(tlsext_serverhello_default)) { -+ if (dlen != sizeof_tlsext_serverhello_default) { - FAIL("got serverhello extensions with length %zu, " - "want length %zu\n", dlen, -- sizeof(tlsext_serverhello_default)); -+ sizeof_tlsext_serverhello_default); - compare_data(data, dlen, tlsext_serverhello_default, -- sizeof(tlsext_serverhello_default)); -+ sizeof_tlsext_serverhello_default); - goto err; - } - if (memcmp(data, tlsext_serverhello_default, dlen) != 0) { - FAIL("serverhello extensions differs:\n"); - compare_data(data, dlen, tlsext_serverhello_default, -- sizeof(tlsext_serverhello_default)); -+ sizeof_tlsext_serverhello_default); - goto err; - } - -- cgit v1.2.3-55-g6feb