Rediffed patches for merge fuzz

This commit is contained in:
Brent Cook 2018-11-07 20:00:29 -06:00
parent 34394e7ee0
commit 11bb39ecf6
6 changed files with 39 additions and 40 deletions

1
.gitignore vendored
View File

@ -126,6 +126,7 @@ include/openssl/*.h
/apps/ocspcheck/*.c /apps/ocspcheck/*.c
/apps/ocspcheck/ocspcheck* /apps/ocspcheck/ocspcheck*
/apps/ocspcheck/compat/memmem.c /apps/ocspcheck/compat/memmem.c
/apps/ocspcheck/compat/inet_ntop.c
/apps/nc/*.h /apps/nc/*.h
/apps/nc/*.c /apps/nc/*.c

View File

@ -1,9 +1,9 @@
--- tests/aeadtest.c.orig 2016-10-18 17:03:33.845870889 +0900 --- tests/aeadtest.c.orig 2018-07-24 21:59:17.000000000 -0500
+++ tests/aeadtest.c 2016-10-18 17:11:19.880841283 +0900 +++ tests/aeadtest.c 2018-11-07 18:44:43.000000000 -0600
@@ -76,6 +76,12 @@ @@ -76,6 +76,12 @@
#define BUF_MAX 1024 #define BUF_MAX 1024
+#ifdef _MSC_VER +#ifdef _MSC_VER
+#ifdef IN +#ifdef IN
+#undef IN +#undef IN

View File

@ -1,12 +1,12 @@
--- include/openssl/bio.h.orig Mon Oct 3 06:09:28 2016 --- include/openssl/bio.h.orig 2018-07-24 21:59:17.000000000 -0500
+++ include/openssl/bio.h Sun Nov 6 04:24:57 2016 +++ include/openssl/bio.h 2018-11-07 18:44:43.000000000 -0600
@@ -713,8 +713,24 @@ @@ -713,6 +713,22 @@
/*long BIO_ghbn_ctrl(int cmd,int iarg,char *parg);*/ /*long BIO_ghbn_ctrl(int cmd,int iarg,char *parg);*/
+#ifdef __MINGW_PRINTF_FORMAT +#ifdef __MINGW_PRINTF_FORMAT
int +int
BIO_printf(BIO *bio, const char *format, ...) +BIO_printf(BIO *bio, const char *format, ...)
+ __attribute__((__format__(__MINGW_PRINTF_FORMAT, 2, 3), __nonnull__(2))); + __attribute__((__format__(__MINGW_PRINTF_FORMAT, 2, 3), __nonnull__(2)));
+int +int
+BIO_vprintf(BIO *bio, const char *format, va_list args) +BIO_vprintf(BIO *bio, const char *format, va_list args)
@ -20,11 +20,9 @@
+ __attribute__((__deprecated__, __format__(__MINGW_PRINTF_FORMAT, 3, 0), + __attribute__((__deprecated__, __format__(__MINGW_PRINTF_FORMAT, 3, 0),
+ __nonnull__(3))); + __nonnull__(3)));
+#else +#else
+int
+BIO_printf(BIO *bio, const char *format, ...)
__attribute__((__format__(__printf__, 2, 3), __nonnull__(2)));
int int
BIO_vprintf(BIO *bio, const char *format, va_list args) BIO_printf(BIO *bio, const char *format, ...)
__attribute__((__format__(__printf__, 2, 3), __nonnull__(2)));
@@ -727,6 +743,8 @@ @@ -727,6 +743,8 @@
BIO_vsnprintf(char *buf, size_t n, const char *format, va_list args) BIO_vsnprintf(char *buf, size_t n, const char *format, va_list args)
__attribute__((__deprecated__, __format__(__printf__, 3, 0), __attribute__((__deprecated__, __format__(__printf__, 3, 0),

View File

@ -1,5 +1,5 @@
--- apps/nc/netcat.c.orig Mon Jul 17 06:06:51 2017 --- apps/nc/netcat.c.orig 2018-11-07 17:01:38.000000000 -0600
+++ apps/nc/netcat.c Mon Jul 17 06:11:24 2017 +++ apps/nc/netcat.c 2018-11-07 17:37:57.000000000 -0600
@@ -92,9 +92,13 @@ @@ -92,9 +92,13 @@
int Dflag; /* sodebug */ int Dflag; /* sodebug */
int Iflag; /* TCP receive buffer size */ int Iflag; /* TCP receive buffer size */
@ -11,7 +11,7 @@
+#ifdef SO_RTABLE +#ifdef SO_RTABLE
int rtableid = -1; int rtableid = -1;
+#endif +#endif
int usetls; /* use TLS */ int usetls; /* use TLS */
char *Cflag; /* Public cert file */ char *Cflag; /* Public cert file */
@@ -266,12 +270,14 @@ @@ -266,12 +270,14 @@
@ -44,13 +44,13 @@
@@ -344,9 +352,11 @@ @@ -344,9 +352,11 @@
argc -= optind; argc -= optind;
argv += optind; argv += optind;
+#ifdef SO_RTABLE +#ifdef SO_RTABLE
if (rtableid >= 0) if (rtableid >= 0)
if (setrtable(rtableid) == -1) if (setrtable(rtableid) == -1)
err(1, "setrtable"); err(1, "setrtable");
+#endif +#endif
/* Cruft to make sure options are clean, and used properly. */ /* Cruft to make sure options are clean, and used properly. */
if (argv[0] && !argv[1] && family == AF_UNIX) { if (argv[0] && !argv[1] && family == AF_UNIX) {
@@ -909,7 +919,10 @@ @@ -909,7 +919,10 @@
@ -62,13 +62,13 @@
+#ifdef SO_BINDANY +#ifdef SO_BINDANY
+ int on = 1; + int on = 1;
+#endif +#endif
if ((error = getaddrinfo(host, port, &hints, &res0))) if ((error = getaddrinfo(host, port, &hints, &res0)))
errx(1, "getaddrinfo for host \"%s\" port %s: %s", host, errx(1, "getaddrinfo for host \"%s\" port %s: %s", host,
@@ -924,8 +937,10 @@ @@ -924,8 +937,10 @@
if (sflag || pflag) { if (sflag || pflag) {
struct addrinfo ahints, *ares; struct addrinfo ahints, *ares;
+#ifdef SO_BINDANY +#ifdef SO_BINDANY
/* try SO_BINDANY, but don't insist */ /* try SO_BINDANY, but don't insist */
setsockopt(s, SOL_SOCKET, SO_BINDANY, &on, sizeof(on)); setsockopt(s, SOL_SOCKET, SO_BINDANY, &on, sizeof(on));
@ -86,24 +86,24 @@
+ int ret, x = 1; + int ret, x = 1;
+#endif +#endif
int error; int error;
/* Allow nodename to be null. */ /* Allow nodename to be null. */
@@ -1017,9 +1035,11 @@ @@ -1017,9 +1035,11 @@
res->ai_protocol)) < 0) res->ai_protocol)) < 0)
continue; continue;
+#ifdef SO_REUSEPORT +#ifdef SO_REUSEPORT
ret = setsockopt(s, SOL_SOCKET, SO_REUSEPORT, &x, sizeof(x)); ret = setsockopt(s, SOL_SOCKET, SO_REUSEPORT, &x, sizeof(x));
if (ret == -1) if (ret == -1)
err(1, NULL); err(1, NULL);
+#endif +#endif
set_common_sockopts(s, res->ai_family); set_common_sockopts(s, res->ai_family);
@@ -1475,11 +1495,13 @@ @@ -1475,11 +1495,13 @@
{ {
int x = 1; int x = 1;
+#ifdef TCP_MD5SIG +#ifdef TCP_MD5SIG
if (Sflag) { if (Sflag) {
if (setsockopt(s, IPPROTO_TCP, TCP_MD5SIG, if (setsockopt(s, IPPROTO_TCP, TCP_MD5SIG,
@ -117,7 +117,7 @@
@@ -1490,9 +1512,16 @@ @@ -1490,9 +1512,16 @@
IP_TOS, &Tflag, sizeof(Tflag)) == -1) IP_TOS, &Tflag, sizeof(Tflag)) == -1)
err(1, "set IP ToS"); err(1, "set IP ToS");
+#ifdef IPV6_TCLASS +#ifdef IPV6_TCLASS
else if (af == AF_INET6 && setsockopt(s, IPPROTO_IPV6, else if (af == AF_INET6 && setsockopt(s, IPPROTO_IPV6,
IPV6_TCLASS, &Tflag, sizeof(Tflag)) == -1) IPV6_TCLASS, &Tflag, sizeof(Tflag)) == -1)
@ -133,14 +133,14 @@
if (setsockopt(s, SOL_SOCKET, SO_RCVBUF, if (setsockopt(s, SOL_SOCKET, SO_RCVBUF,
@@ -1516,13 +1545,17 @@ @@ -1516,13 +1545,17 @@
} }
if (minttl != -1) { if (minttl != -1) {
+#ifdef IP_MINTTL +#ifdef IP_MINTTL
if (af == AF_INET && setsockopt(s, IPPROTO_IP, if (af == AF_INET && setsockopt(s, IPPROTO_IP,
IP_MINTTL, &minttl, sizeof(minttl))) IP_MINTTL, &minttl, sizeof(minttl)))
err(1, "set IP min TTL"); err(1, "set IP min TTL");
+#endif +#endif
- else if (af == AF_INET6 && setsockopt(s, IPPROTO_IPV6, - else if (af == AF_INET6 && setsockopt(s, IPPROTO_IPV6,
+#ifdef IPV6_MINHOPCOUNT +#ifdef IPV6_MINHOPCOUNT
+ if (af == AF_INET6 && setsockopt(s, IPPROTO_IPV6, + if (af == AF_INET6 && setsockopt(s, IPPROTO_IPV6,
@ -149,7 +149,7 @@
+#endif +#endif
} }
} }
@@ -1748,14 +1781,22 @@ @@ -1748,14 +1781,22 @@
\t-P proxyuser\tUsername for proxy authentication\n\ \t-P proxyuser\tUsername for proxy authentication\n\
\t-p port\t Specify local port for remote connects\n\ \t-p port\t Specify local port for remote connects\n\

View File

@ -1,9 +1,9 @@
--- tests/ocsp_test.c.orig 2016-10-18 18:12:39.854607509 +0900 --- tests/ocsp_test.c.orig 2018-07-24 21:59:17.000000000 -0500
+++ tests/ocsp_test.c 2016-10-18 18:14:29.261600559 +0900 +++ tests/ocsp_test.c 2018-11-07 18:44:43.000000000 -0600
@@ -35,6 +35,11 @@ @@ -35,6 +35,11 @@
hints.ai_family = AF_INET; hints.ai_family = AF_INET;
hints.ai_socktype = SOCK_STREAM; hints.ai_socktype = SOCK_STREAM;
+#ifdef _MSC_VER +#ifdef _MSC_VER
+ if (BIO_sock_init() != 1) + if (BIO_sock_init() != 1)
+ exit(-1); + exit(-1);

View File

@ -1,5 +1,5 @@
--- tests/tlsexttest.c.orig 2017-12-30 20:03:09.279079726 +0900 --- tests/tlsexttest.c.orig Wed Nov 7 20:01:26 2018
+++ tests/tlsexttest.c 2017-12-30 20:07:21.849939140 +0900 +++ tests/tlsexttest.c Wed Nov 7 20:01:35 2018
@@ -1676,7 +1676,9 @@ @@ -1676,7 +1676,9 @@
}; };
@ -10,7 +10,7 @@
static int static int
test_tlsext_sni_clienthello(void) test_tlsext_sni_clienthello(void)
@@ -1841,9 +1843,9 @@ @@ -1839,9 +1841,9 @@
if (!CBB_finish(&cbb, &data, &dlen)) if (!CBB_finish(&cbb, &data, &dlen))
errx(1, "failed to finish CBB"); errx(1, "failed to finish CBB");
@ -22,7 +22,7 @@
goto err; goto err;
} }
@@ -1852,14 +1854,14 @@ @@ -1850,14 +1852,14 @@
fprintf(stderr, "received:\n"); fprintf(stderr, "received:\n");
hexdump(data, dlen); hexdump(data, dlen);
fprintf(stderr, "test data:\n"); fprintf(stderr, "test data:\n");
@ -39,7 +39,7 @@
if (!tlsext_sni_serverhello_parse(ssl, &cbs, &alert)) { if (!tlsext_sni_serverhello_parse(ssl, &cbs, &alert)) {
FAIL("failed to parse serverhello SNI\n"); FAIL("failed to parse serverhello SNI\n");
goto err; goto err;
@@ -2744,7 +2746,10 @@ @@ -2741,7 +2743,10 @@
0x03, 0x01, 0x03, 0x03, 0x02, 0x01, 0x02, 0x03, 0x03, 0x01, 0x03, 0x03, 0x02, 0x01, 0x02, 0x03,
}; };
@ -51,7 +51,7 @@
static int static int
test_tlsext_clienthello_build(void) test_tlsext_clienthello_build(void)
@@ -2811,18 +2816,18 @@ @@ -2806,18 +2811,18 @@
if (!CBB_finish(&cbb, &data, &dlen)) if (!CBB_finish(&cbb, &data, &dlen))
errx(1, "failed to finish CBB"); errx(1, "failed to finish CBB");
@ -74,7 +74,7 @@
goto err; goto err;
} }
@@ -2837,7 +2842,10 @@ @@ -2832,7 +2837,10 @@
return (failure); return (failure);
} }
@ -86,7 +86,7 @@
unsigned char tlsext_serverhello_enabled[] = { unsigned char tlsext_serverhello_enabled[] = {
0x00, 0x13, 0xff, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x13, 0xff, 0x01, 0x00, 0x01, 0x00, 0x00,
@@ -2877,18 +2885,18 @@ @@ -2872,18 +2880,18 @@
if (!CBB_finish(&cbb, &data, &dlen)) if (!CBB_finish(&cbb, &data, &dlen))
errx(1, "failed to finish CBB"); errx(1, "failed to finish CBB");