diff options
author | Brent Cook <bcook@openbsd.org> | 2018-11-07 20:00:29 -0600 |
---|---|---|
committer | Brent Cook <bcook@openbsd.org> | 2018-11-07 20:04:11 -0600 |
commit | 11bb39ecf6e58a5e44fc8043004b3f455f30b8fe (patch) | |
tree | 9845ff5edbb4cc370bb5f0ab9c4787668bd46f07 | |
parent | 34394e7ee024d2b88bed9c61b9a19bba6ec5e49e (diff) | |
download | portable-11bb39ecf6e58a5e44fc8043004b3f455f30b8fe.tar.gz portable-11bb39ecf6e58a5e44fc8043004b3f455f30b8fe.tar.bz2 portable-11bb39ecf6e58a5e44fc8043004b3f455f30b8fe.zip |
Rediffed patches for merge fuzz
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | patches/aeadtest.c.patch | 8 | ||||
-rw-r--r-- | patches/bio.h.patch | 16 | ||||
-rw-r--r-- | patches/netcat.c.patch | 32 | ||||
-rw-r--r-- | patches/ocsp_test.c.patch | 6 | ||||
-rw-r--r-- | patches/tlsexttest.c.patch | 16 |
6 files changed, 39 insertions, 40 deletions
@@ -126,6 +126,7 @@ include/openssl/*.h | |||
126 | /apps/ocspcheck/*.c | 126 | /apps/ocspcheck/*.c |
127 | /apps/ocspcheck/ocspcheck* | 127 | /apps/ocspcheck/ocspcheck* |
128 | /apps/ocspcheck/compat/memmem.c | 128 | /apps/ocspcheck/compat/memmem.c |
129 | /apps/ocspcheck/compat/inet_ntop.c | ||
129 | 130 | ||
130 | /apps/nc/*.h | 131 | /apps/nc/*.h |
131 | /apps/nc/*.c | 132 | /apps/nc/*.c |
diff --git a/patches/aeadtest.c.patch b/patches/aeadtest.c.patch index 09838bc..a7b3fca 100644 --- a/patches/aeadtest.c.patch +++ b/patches/aeadtest.c.patch | |||
@@ -1,9 +1,9 @@ | |||
1 | --- tests/aeadtest.c.orig 2016-10-18 17:03:33.845870889 +0900 | 1 | --- tests/aeadtest.c.orig 2018-07-24 21:59:17.000000000 -0500 |
2 | +++ tests/aeadtest.c 2016-10-18 17:11:19.880841283 +0900 | 2 | +++ tests/aeadtest.c 2018-11-07 18:44:43.000000000 -0600 |
3 | @@ -76,6 +76,12 @@ | 3 | @@ -76,6 +76,12 @@ |
4 | 4 | ||
5 | #define BUF_MAX 1024 | 5 | #define BUF_MAX 1024 |
6 | 6 | ||
7 | +#ifdef _MSC_VER | 7 | +#ifdef _MSC_VER |
8 | +#ifdef IN | 8 | +#ifdef IN |
9 | +#undef IN | 9 | +#undef IN |
diff --git a/patches/bio.h.patch b/patches/bio.h.patch index 9bfd43a..e726e20 100644 --- a/patches/bio.h.patch +++ b/patches/bio.h.patch | |||
@@ -1,12 +1,12 @@ | |||
1 | --- include/openssl/bio.h.orig Mon Oct 3 06:09:28 2016 | 1 | --- include/openssl/bio.h.orig 2018-07-24 21:59:17.000000000 -0500 |
2 | +++ include/openssl/bio.h Sun Nov 6 04:24:57 2016 | 2 | +++ include/openssl/bio.h 2018-11-07 18:44:43.000000000 -0600 |
3 | @@ -713,8 +713,24 @@ | 3 | @@ -713,6 +713,22 @@ |
4 | 4 | ||
5 | /*long BIO_ghbn_ctrl(int cmd,int iarg,char *parg);*/ | 5 | /*long BIO_ghbn_ctrl(int cmd,int iarg,char *parg);*/ |
6 | 6 | ||
7 | +#ifdef __MINGW_PRINTF_FORMAT | 7 | +#ifdef __MINGW_PRINTF_FORMAT |
8 | int | 8 | +int |
9 | BIO_printf(BIO *bio, const char *format, ...) | 9 | +BIO_printf(BIO *bio, const char *format, ...) |
10 | + __attribute__((__format__(__MINGW_PRINTF_FORMAT, 2, 3), __nonnull__(2))); | 10 | + __attribute__((__format__(__MINGW_PRINTF_FORMAT, 2, 3), __nonnull__(2))); |
11 | +int | 11 | +int |
12 | +BIO_vprintf(BIO *bio, const char *format, va_list args) | 12 | +BIO_vprintf(BIO *bio, const char *format, va_list args) |
@@ -20,11 +20,9 @@ | |||
20 | + __attribute__((__deprecated__, __format__(__MINGW_PRINTF_FORMAT, 3, 0), | 20 | + __attribute__((__deprecated__, __format__(__MINGW_PRINTF_FORMAT, 3, 0), |
21 | + __nonnull__(3))); | 21 | + __nonnull__(3))); |
22 | +#else | 22 | +#else |
23 | +int | ||
24 | +BIO_printf(BIO *bio, const char *format, ...) | ||
25 | __attribute__((__format__(__printf__, 2, 3), __nonnull__(2))); | ||
26 | int | 23 | int |
27 | BIO_vprintf(BIO *bio, const char *format, va_list args) | 24 | BIO_printf(BIO *bio, const char *format, ...) |
25 | __attribute__((__format__(__printf__, 2, 3), __nonnull__(2))); | ||
28 | @@ -727,6 +743,8 @@ | 26 | @@ -727,6 +743,8 @@ |
29 | BIO_vsnprintf(char *buf, size_t n, const char *format, va_list args) | 27 | BIO_vsnprintf(char *buf, size_t n, const char *format, va_list args) |
30 | __attribute__((__deprecated__, __format__(__printf__, 3, 0), | 28 | __attribute__((__deprecated__, __format__(__printf__, 3, 0), |
diff --git a/patches/netcat.c.patch b/patches/netcat.c.patch index 2965ea7..07205ec 100644 --- a/patches/netcat.c.patch +++ b/patches/netcat.c.patch | |||
@@ -1,5 +1,5 @@ | |||
1 | --- apps/nc/netcat.c.orig Mon Jul 17 06:06:51 2017 | 1 | --- apps/nc/netcat.c.orig 2018-11-07 17:01:38.000000000 -0600 |
2 | +++ apps/nc/netcat.c Mon Jul 17 06:11:24 2017 | 2 | +++ apps/nc/netcat.c 2018-11-07 17:37:57.000000000 -0600 |
3 | @@ -92,9 +92,13 @@ | 3 | @@ -92,9 +92,13 @@ |
4 | int Dflag; /* sodebug */ | 4 | int Dflag; /* sodebug */ |
5 | int Iflag; /* TCP receive buffer size */ | 5 | int Iflag; /* TCP receive buffer size */ |
@@ -11,7 +11,7 @@ | |||
11 | +#ifdef SO_RTABLE | 11 | +#ifdef SO_RTABLE |
12 | int rtableid = -1; | 12 | int rtableid = -1; |
13 | +#endif | 13 | +#endif |
14 | 14 | ||
15 | int usetls; /* use TLS */ | 15 | int usetls; /* use TLS */ |
16 | char *Cflag; /* Public cert file */ | 16 | char *Cflag; /* Public cert file */ |
17 | @@ -266,12 +270,14 @@ | 17 | @@ -266,12 +270,14 @@ |
@@ -44,13 +44,13 @@ | |||
44 | @@ -344,9 +352,11 @@ | 44 | @@ -344,9 +352,11 @@ |
45 | argc -= optind; | 45 | argc -= optind; |
46 | argv += optind; | 46 | argv += optind; |
47 | 47 | ||
48 | +#ifdef SO_RTABLE | 48 | +#ifdef SO_RTABLE |
49 | if (rtableid >= 0) | 49 | if (rtableid >= 0) |
50 | if (setrtable(rtableid) == -1) | 50 | if (setrtable(rtableid) == -1) |
51 | err(1, "setrtable"); | 51 | err(1, "setrtable"); |
52 | +#endif | 52 | +#endif |
53 | 53 | ||
54 | /* Cruft to make sure options are clean, and used properly. */ | 54 | /* Cruft to make sure options are clean, and used properly. */ |
55 | if (argv[0] && !argv[1] && family == AF_UNIX) { | 55 | if (argv[0] && !argv[1] && family == AF_UNIX) { |
56 | @@ -909,7 +919,10 @@ | 56 | @@ -909,7 +919,10 @@ |
@@ -62,13 +62,13 @@ | |||
62 | +#ifdef SO_BINDANY | 62 | +#ifdef SO_BINDANY |
63 | + int on = 1; | 63 | + int on = 1; |
64 | +#endif | 64 | +#endif |
65 | 65 | ||
66 | if ((error = getaddrinfo(host, port, &hints, &res0))) | 66 | if ((error = getaddrinfo(host, port, &hints, &res0))) |
67 | errx(1, "getaddrinfo for host \"%s\" port %s: %s", host, | 67 | errx(1, "getaddrinfo for host \"%s\" port %s: %s", host, |
68 | @@ -924,8 +937,10 @@ | 68 | @@ -924,8 +937,10 @@ |
69 | if (sflag || pflag) { | 69 | if (sflag || pflag) { |
70 | struct addrinfo ahints, *ares; | 70 | struct addrinfo ahints, *ares; |
71 | 71 | ||
72 | +#ifdef SO_BINDANY | 72 | +#ifdef SO_BINDANY |
73 | /* try SO_BINDANY, but don't insist */ | 73 | /* try SO_BINDANY, but don't insist */ |
74 | setsockopt(s, SOL_SOCKET, SO_BINDANY, &on, sizeof(on)); | 74 | setsockopt(s, SOL_SOCKET, SO_BINDANY, &on, sizeof(on)); |
@@ -86,24 +86,24 @@ | |||
86 | + int ret, x = 1; | 86 | + int ret, x = 1; |
87 | +#endif | 87 | +#endif |
88 | int error; | 88 | int error; |
89 | 89 | ||
90 | /* Allow nodename to be null. */ | 90 | /* Allow nodename to be null. */ |
91 | @@ -1017,9 +1035,11 @@ | 91 | @@ -1017,9 +1035,11 @@ |
92 | res->ai_protocol)) < 0) | 92 | res->ai_protocol)) < 0) |
93 | continue; | 93 | continue; |
94 | 94 | ||
95 | +#ifdef SO_REUSEPORT | 95 | +#ifdef SO_REUSEPORT |
96 | ret = setsockopt(s, SOL_SOCKET, SO_REUSEPORT, &x, sizeof(x)); | 96 | ret = setsockopt(s, SOL_SOCKET, SO_REUSEPORT, &x, sizeof(x)); |
97 | if (ret == -1) | 97 | if (ret == -1) |
98 | err(1, NULL); | 98 | err(1, NULL); |
99 | +#endif | 99 | +#endif |
100 | 100 | ||
101 | set_common_sockopts(s, res->ai_family); | 101 | set_common_sockopts(s, res->ai_family); |
102 | 102 | ||
103 | @@ -1475,11 +1495,13 @@ | 103 | @@ -1475,11 +1495,13 @@ |
104 | { | 104 | { |
105 | int x = 1; | 105 | int x = 1; |
106 | 106 | ||
107 | +#ifdef TCP_MD5SIG | 107 | +#ifdef TCP_MD5SIG |
108 | if (Sflag) { | 108 | if (Sflag) { |
109 | if (setsockopt(s, IPPROTO_TCP, TCP_MD5SIG, | 109 | if (setsockopt(s, IPPROTO_TCP, TCP_MD5SIG, |
@@ -117,7 +117,7 @@ | |||
117 | @@ -1490,9 +1512,16 @@ | 117 | @@ -1490,9 +1512,16 @@ |
118 | IP_TOS, &Tflag, sizeof(Tflag)) == -1) | 118 | IP_TOS, &Tflag, sizeof(Tflag)) == -1) |
119 | err(1, "set IP ToS"); | 119 | err(1, "set IP ToS"); |
120 | 120 | ||
121 | +#ifdef IPV6_TCLASS | 121 | +#ifdef IPV6_TCLASS |
122 | else if (af == AF_INET6 && setsockopt(s, IPPROTO_IPV6, | 122 | else if (af == AF_INET6 && setsockopt(s, IPPROTO_IPV6, |
123 | IPV6_TCLASS, &Tflag, sizeof(Tflag)) == -1) | 123 | IPV6_TCLASS, &Tflag, sizeof(Tflag)) == -1) |
@@ -133,14 +133,14 @@ | |||
133 | if (setsockopt(s, SOL_SOCKET, SO_RCVBUF, | 133 | if (setsockopt(s, SOL_SOCKET, SO_RCVBUF, |
134 | @@ -1516,13 +1545,17 @@ | 134 | @@ -1516,13 +1545,17 @@ |
135 | } | 135 | } |
136 | 136 | ||
137 | if (minttl != -1) { | 137 | if (minttl != -1) { |
138 | +#ifdef IP_MINTTL | 138 | +#ifdef IP_MINTTL |
139 | if (af == AF_INET && setsockopt(s, IPPROTO_IP, | 139 | if (af == AF_INET && setsockopt(s, IPPROTO_IP, |
140 | IP_MINTTL, &minttl, sizeof(minttl))) | 140 | IP_MINTTL, &minttl, sizeof(minttl))) |
141 | err(1, "set IP min TTL"); | 141 | err(1, "set IP min TTL"); |
142 | +#endif | 142 | +#endif |
143 | 143 | ||
144 | - else if (af == AF_INET6 && setsockopt(s, IPPROTO_IPV6, | 144 | - else if (af == AF_INET6 && setsockopt(s, IPPROTO_IPV6, |
145 | +#ifdef IPV6_MINHOPCOUNT | 145 | +#ifdef IPV6_MINHOPCOUNT |
146 | + if (af == AF_INET6 && setsockopt(s, IPPROTO_IPV6, | 146 | + if (af == AF_INET6 && setsockopt(s, IPPROTO_IPV6, |
@@ -149,7 +149,7 @@ | |||
149 | +#endif | 149 | +#endif |
150 | } | 150 | } |
151 | } | 151 | } |
152 | 152 | ||
153 | @@ -1748,14 +1781,22 @@ | 153 | @@ -1748,14 +1781,22 @@ |
154 | \t-P proxyuser\tUsername for proxy authentication\n\ | 154 | \t-P proxyuser\tUsername for proxy authentication\n\ |
155 | \t-p port\t Specify local port for remote connects\n\ | 155 | \t-p port\t Specify local port for remote connects\n\ |
diff --git a/patches/ocsp_test.c.patch b/patches/ocsp_test.c.patch index 03e02ac..39f1326 100644 --- a/patches/ocsp_test.c.patch +++ b/patches/ocsp_test.c.patch | |||
@@ -1,9 +1,9 @@ | |||
1 | --- tests/ocsp_test.c.orig 2016-10-18 18:12:39.854607509 +0900 | 1 | --- tests/ocsp_test.c.orig 2018-07-24 21:59:17.000000000 -0500 |
2 | +++ tests/ocsp_test.c 2016-10-18 18:14:29.261600559 +0900 | 2 | +++ tests/ocsp_test.c 2018-11-07 18:44:43.000000000 -0600 |
3 | @@ -35,6 +35,11 @@ | 3 | @@ -35,6 +35,11 @@ |
4 | hints.ai_family = AF_INET; | 4 | hints.ai_family = AF_INET; |
5 | hints.ai_socktype = SOCK_STREAM; | 5 | hints.ai_socktype = SOCK_STREAM; |
6 | 6 | ||
7 | +#ifdef _MSC_VER | 7 | +#ifdef _MSC_VER |
8 | + if (BIO_sock_init() != 1) | 8 | + if (BIO_sock_init() != 1) |
9 | + exit(-1); | 9 | + exit(-1); |
diff --git a/patches/tlsexttest.c.patch b/patches/tlsexttest.c.patch index 6a4184d..cdec053 100644 --- a/patches/tlsexttest.c.patch +++ b/patches/tlsexttest.c.patch | |||
@@ -1,5 +1,5 @@ | |||
1 | --- tests/tlsexttest.c.orig 2017-12-30 20:03:09.279079726 +0900 | 1 | --- tests/tlsexttest.c.orig Wed Nov 7 20:01:26 2018 |
2 | +++ tests/tlsexttest.c 2017-12-30 20:07:21.849939140 +0900 | 2 | +++ tests/tlsexttest.c Wed Nov 7 20:01:35 2018 |
3 | @@ -1676,7 +1676,9 @@ | 3 | @@ -1676,7 +1676,9 @@ |
4 | }; | 4 | }; |
5 | 5 | ||
@@ -10,7 +10,7 @@ | |||
10 | 10 | ||
11 | static int | 11 | static int |
12 | test_tlsext_sni_clienthello(void) | 12 | test_tlsext_sni_clienthello(void) |
13 | @@ -1841,9 +1843,9 @@ | 13 | @@ -1839,9 +1841,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 | @@ -1852,14 +1854,14 @@ | 25 | @@ -1850,14 +1852,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_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 | @@ -2744,7 +2746,10 @@ | 42 | @@ -2741,7 +2743,10 @@ |
43 | 0x03, 0x01, 0x03, 0x03, 0x02, 0x01, 0x02, 0x03, | 43 | 0x03, 0x01, 0x03, 0x03, 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 | @@ -2811,18 +2816,18 @@ | 54 | @@ -2806,18 +2811,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,7 +74,7 @@ | |||
74 | goto err; | 74 | goto err; |
75 | } | 75 | } |
76 | 76 | ||
77 | @@ -2837,7 +2842,10 @@ | 77 | @@ -2832,7 +2837,10 @@ |
78 | return (failure); | 78 | return (failure); |
79 | } | 79 | } |
80 | 80 | ||
@@ -86,7 +86,7 @@ | |||
86 | 86 | ||
87 | unsigned char tlsext_serverhello_enabled[] = { | 87 | unsigned char tlsext_serverhello_enabled[] = { |
88 | 0x00, 0x13, 0xff, 0x01, 0x00, 0x01, 0x00, 0x00, | 88 | 0x00, 0x13, 0xff, 0x01, 0x00, 0x01, 0x00, 0x00, |
89 | @@ -2877,18 +2885,18 @@ | 89 | @@ -2872,18 +2880,18 @@ |
90 | if (!CBB_finish(&cbb, &data, &dlen)) | 90 | if (!CBB_finish(&cbb, &data, &dlen)) |
91 | errx(1, "failed to finish CBB"); | 91 | errx(1, "failed to finish CBB"); |
92 | 92 | ||