aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrent Cook <busterb@gmail.com>2020-02-15 11:32:11 -0600
committerBrent Cook <busterb@gmail.com>2020-02-15 11:32:11 -0600
commit14dd93c37a2a38dee7b8d2e0b823b0e0cc21e8d4 (patch)
tree1771e8d5243dc8d8662fe0676ed9847fb20cbcc5
parent7f3bfc89224d5868675e101d7fb32baa806f84d8 (diff)
downloadportable-14dd93c37a2a38dee7b8d2e0b823b0e0cc21e8d4.tar.gz
portable-14dd93c37a2a38dee7b8d2e0b823b0e0cc21e8d4.tar.bz2
portable-14dd93c37a2a38dee7b8d2e0b823b0e0cc21e8d4.zip
rebase patches
-rw-r--r--patches/netcat.c.patch35
-rw-r--r--patches/tlsexttest.c.patch18
2 files changed, 26 insertions, 27 deletions
diff --git a/patches/netcat.c.patch b/patches/netcat.c.patch
index f32623c..7d82aca 100644
--- a/patches/netcat.c.patch
+++ b/patches/netcat.c.patch
@@ -1,5 +1,5 @@
1--- apps/nc/netcat.c.orig Mon Nov 18 01:13:56 2019 1--- apps/nc/netcat.c.orig Sat Feb 15 11:04:42 2020
2+++ apps/nc/netcat.c Sat Nov 30 03:29:50 2019 2+++ apps/nc/netcat.c Sat Feb 15 11:24:38 2020
3@@ -93,9 +93,13 @@ 3@@ -93,9 +93,13 @@
4 int Dflag; /* sodebug */ 4 int Dflag; /* sodebug */
5 int Iflag; /* TCP receive buffer size */ 5 int Iflag; /* TCP receive buffer size */
@@ -53,7 +53,7 @@
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 (argc == 1 && family == AF_UNIX) { 55 if (argc == 1 && family == AF_UNIX) {
56@@ -926,7 +936,10 @@ 56@@ -947,7 +957,10 @@
57 char *ipaddr) 57 char *ipaddr)
58 { 58 {
59 struct addrinfo *res, *res0; 59 struct addrinfo *res, *res0;
@@ -65,7 +65,7 @@
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@@ -941,8 +954,10 @@ 68@@ -962,8 +975,10 @@
69 if (sflag || pflag) { 69 if (sflag || pflag) {
70 struct addrinfo ahints, *ares; 70 struct addrinfo ahints, *ares;
71 71
@@ -76,7 +76,7 @@
76 memset(&ahints, 0, sizeof(struct addrinfo)); 76 memset(&ahints, 0, sizeof(struct addrinfo));
77 ahints.ai_family = res->ai_family; 77 ahints.ai_family = res->ai_family;
78 ahints.ai_socktype = uflag ? SOCK_DGRAM : SOCK_STREAM; 78 ahints.ai_socktype = uflag ? SOCK_DGRAM : SOCK_STREAM;
79@@ -1034,7 +1049,10 @@ 79@@ -1055,7 +1070,10 @@
80 local_listen(const char *host, const char *port, struct addrinfo hints) 80 local_listen(const char *host, const char *port, struct addrinfo hints)
81 { 81 {
82 struct addrinfo *res, *res0; 82 struct addrinfo *res, *res0;
@@ -88,7 +88,7 @@
88 int error; 88 int error;
89 89
90 /* Allow nodename to be null. */ 90 /* Allow nodename to be null. */
91@@ -1055,9 +1073,11 @@ 91@@ -1076,9 +1094,11 @@
92 res->ai_protocol)) == -1) 92 res->ai_protocol)) == -1)
93 continue; 93 continue;
94 94
@@ -100,7 +100,7 @@
100 100
101 set_common_sockopts(s, res->ai_family); 101 set_common_sockopts(s, res->ai_family);
102 102
103@@ -1555,11 +1575,13 @@ 103@@ -1548,11 +1568,13 @@
104 { 104 {
105 int x = 1; 105 int x = 1;
106 106
@@ -114,7 +114,7 @@
114 if (Dflag) { 114 if (Dflag) {
115 if (setsockopt(s, SOL_SOCKET, SO_DEBUG, 115 if (setsockopt(s, SOL_SOCKET, SO_DEBUG,
116 &x, sizeof(x)) == -1) 116 &x, sizeof(x)) == -1)
117@@ -1570,9 +1592,16 @@ 117@@ -1563,9 +1585,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
@@ -131,7 +131,7 @@
131 } 131 }
132 if (Iflag) { 132 if (Iflag) {
133 if (setsockopt(s, SOL_SOCKET, SO_RCVBUF, 133 if (setsockopt(s, SOL_SOCKET, SO_RCVBUF,
134@@ -1596,13 +1625,17 @@ 134@@ -1589,13 +1618,17 @@
135 } 135 }
136 136
137 if (minttl != -1) { 137 if (minttl != -1) {
@@ -150,30 +150,29 @@
150 } 150 }
151 } 151 }
152 152
153@@ -1824,14 +1857,22 @@ 153@@ -1820,15 +1853,19 @@
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\
156 \t-R CAfile CA bundle\n\ 156 \t-R CAfile CA bundle\n\
157- \t-r Randomize remote ports\n\ 157- \t-r Randomize remote ports\n\
158- \t-S Enable the TCP MD5 signature option\n\ 158- \t-S Enable the TCP MD5 signature option\n\
159- \t-s sourceaddr Local source address\n\
159+ \t-r Randomize remote ports\n" 160+ \t-r Randomize remote ports\n"
160+#ifdef TCP_MD5SIG 161+#ifdef TCP_MD5SIG
161+ "\ 162+ "\t-S Enable the TCP MD5 signature option\n"
162+ \t-S Enable the TCP MD5 signature option\n"
163+#endif 163+#endif
164+ "\ 164+ "\t-s sourceaddr Local source address\n\
165 \t-s source Local source address\n\
166 \t-T keyword TOS value or TLS options\n\ 165 \t-T keyword TOS value or TLS options\n\
167 \t-t Answer TELNET negotiation\n\ 166 \t-t Answer TELNET negotiation\n\
168 \t-U Use UNIX domain socket\n\ 167 \t-U Use UNIX domain socket\n\
169- \t-u UDP mode\n\ 168- \t-u UDP mode\n\
170- \t-V rtable Specify alternate routing table\n\ 169- \t-V rtable Specify alternate routing table\n\
170- \t-v Verbose\n\
171+ \t-u UDP mode\n" 171+ \t-u UDP mode\n"
172+#ifdef SO_RTABLE 172+#ifdef SO_RTABLE
173+ "\ 173+ "\t-V rtable Specify alternate routing table\n"
174+ \t-V rtable Specify alternate routing table\n"
175+#endif 174+#endif
176+ "\ 175+ "\t-v Verbose\n\
177 \t-v Verbose\n\
178 \t-W recvlimit Terminate after receiving a number of packets\n\ 176 \t-W recvlimit Terminate after receiving a number of packets\n\
179 \t-w timeout Timeout for connects and final net reads\n\ 177 \t-w timeout Timeout for connects and final net reads\n\
178 \t-X proto Proxy protocol: \"4\", \"5\" (SOCKS) or \"connect\"\n\
diff --git a/patches/tlsexttest.c.patch b/patches/tlsexttest.c.patch
index ffb222b..205f30b 100644
--- a/patches/tlsexttest.c.patch
+++ b/patches/tlsexttest.c.patch
@@ -1,6 +1,6 @@
1--- tests/tlsexttest.c.orig Thu Apr 11 06:27:40 2019 1--- tests/tlsexttest.c.orig Sat Feb 15 11:04:42 2020
2+++ tests/tlsexttest.c Tue May 7 02:07:40 2019 2+++ tests/tlsexttest.c Sat Feb 15 11:25:30 2020
3@@ -1654,7 +1654,9 @@ 3@@ -1656,7 +1656,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@@ -1817,9 +1819,9 @@ 13@@ -1819,9 +1821,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@@ -1828,14 +1830,14 @@ 25@@ -1830,14 +1832,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@@ -2719,7 +2721,10 @@ 42@@ -2721,7 +2723,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@@ -2784,18 +2789,18 @@ 54@@ -2786,18 +2791,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@@ -2810,7 +2815,10 @@ 77@@ -2812,7 +2817,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@@ -2850,18 +2858,18 @@ 89@@ -2852,18 +2860,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