aboutsummaryrefslogtreecommitdiff
path: root/patches/netcat.c.patch
diff options
context:
space:
mode:
authorBrent Cook <bcook@openbsd.org>2016-10-30 21:43:28 -0500
committerBrent Cook <bcook@openbsd.org>2016-10-30 21:43:28 -0500
commit2570ad9344ca2d2f675789b4f940f42bdcefb7e3 (patch)
treed6cff44b3dda13a8ac0a799b8b9669aeced91d59 /patches/netcat.c.patch
parent332c2eeaa3ad0133bd0ef725884652c509275c88 (diff)
downloadportable-2570ad9344ca2d2f675789b4f940f42bdcefb7e3.tar.gz
portable-2570ad9344ca2d2f675789b4f940f42bdcefb7e3.tar.bz2
portable-2570ad9344ca2d2f675789b4f940f42bdcefb7e3.zip
set correct DEFAULT_CA_FILE path
Diffstat (limited to 'patches/netcat.c.patch')
-rw-r--r--patches/netcat.c.patch38
1 files changed, 24 insertions, 14 deletions
diff --git a/patches/netcat.c.patch b/patches/netcat.c.patch
index fa05477..b69e0e3 100644
--- a/patches/netcat.c.patch
+++ b/patches/netcat.c.patch
@@ -1,6 +1,16 @@
1--- apps/nc/netcat.c.orig Sun Sep 4 05:37:35 2016 1--- apps/nc/netcat.c.orig Mon Oct 3 06:09:29 2016
2+++ apps/nc/netcat.c Sun Sep 4 05:40:24 2016 2+++ apps/nc/netcat.c Sun Oct 30 21:42:27 2016
3@@ -92,9 +92,13 @@ 3@@ -65,7 +65,9 @@
4 #define POLL_NETIN 2
5 #define POLL_STDOUT 3
6 #define BUFSIZE 16384
7+#ifndef DEFAULT_CA_FILE
8 #define DEFAULT_CA_FILE "/etc/ssl/cert.pem"
9+#endif
10
11 #define TLS_LEGACY (1 << 1)
12 #define TLS_NOVERIFY (1 << 2)
13@@ -92,9 +94,13 @@
4 int Dflag; /* sodebug */ 14 int Dflag; /* sodebug */
5 int Iflag; /* TCP receive buffer size */ 15 int Iflag; /* TCP receive buffer size */
6 int Oflag; /* TCP send buffer size */ 16 int Oflag; /* TCP send buffer size */
@@ -14,7 +24,7 @@
14 24
15 int usetls; /* use TLS */ 25 int usetls; /* use TLS */
16 char *Cflag; /* Public cert file */ 26 char *Cflag; /* Public cert file */
17@@ -146,7 +150,7 @@ 27@@ -146,7 +152,7 @@
18 struct servent *sv; 28 struct servent *sv;
19 socklen_t len; 29 socklen_t len;
20 struct sockaddr_storage cliaddr; 30 struct sockaddr_storage cliaddr;
@@ -23,7 +33,7 @@
23 const char *errstr, *proxyhost = "", *proxyport = NULL; 33 const char *errstr, *proxyhost = "", *proxyport = NULL;
24 struct addrinfo proxyhints; 34 struct addrinfo proxyhints;
25 char unix_dg_tmp_socket_buf[UNIX_DG_TMP_SOCKET_SIZE]; 35 char unix_dg_tmp_socket_buf[UNIX_DG_TMP_SOCKET_SIZE];
26@@ -256,12 +260,14 @@ 36@@ -256,12 +262,14 @@
27 case 'u': 37 case 'u':
28 uflag = 1; 38 uflag = 1;
29 break; 39 break;
@@ -38,7 +48,7 @@
38 case 'v': 48 case 'v':
39 vflag = 1; 49 vflag = 1;
40 break; 50 break;
41@@ -294,9 +300,11 @@ 51@@ -294,9 +302,11 @@
42 errx(1, "TCP send window %s: %s", 52 errx(1, "TCP send window %s: %s",
43 errstr, optarg); 53 errstr, optarg);
44 break; 54 break;
@@ -50,7 +60,7 @@
50 case 'T': 60 case 'T':
51 errstr = NULL; 61 errstr = NULL;
52 errno = 0; 62 errno = 0;
53@@ -320,9 +328,11 @@ 63@@ -320,9 +330,11 @@
54 argc -= optind; 64 argc -= optind;
55 argv += optind; 65 argv += optind;
56 66
@@ -62,7 +72,7 @@
62 72
63 if (family == AF_UNIX) { 73 if (family == AF_UNIX) {
64 if (pledge("stdio rpath wpath cpath tmppath unix", NULL) == -1) 74 if (pledge("stdio rpath wpath cpath tmppath unix", NULL) == -1)
65@@ -825,7 +835,10 @@ 75@@ -825,7 +837,10 @@
66 remote_connect(const char *host, const char *port, struct addrinfo hints) 76 remote_connect(const char *host, const char *port, struct addrinfo hints)
67 { 77 {
68 struct addrinfo *res, *res0; 78 struct addrinfo *res, *res0;
@@ -74,7 +84,7 @@
74 84
75 if ((error = getaddrinfo(host, port, &hints, &res0))) 85 if ((error = getaddrinfo(host, port, &hints, &res0)))
76 errx(1, "getaddrinfo: %s", gai_strerror(error)); 86 errx(1, "getaddrinfo: %s", gai_strerror(error));
77@@ -839,8 +852,10 @@ 87@@ -839,8 +854,10 @@
78 if (sflag || pflag) { 88 if (sflag || pflag) {
79 struct addrinfo ahints, *ares; 89 struct addrinfo ahints, *ares;
80 90
@@ -85,7 +95,7 @@
85 memset(&ahints, 0, sizeof(struct addrinfo)); 95 memset(&ahints, 0, sizeof(struct addrinfo));
86 ahints.ai_family = res->ai_family; 96 ahints.ai_family = res->ai_family;
87 ahints.ai_socktype = uflag ? SOCK_DGRAM : SOCK_STREAM; 97 ahints.ai_socktype = uflag ? SOCK_DGRAM : SOCK_STREAM;
88@@ -911,7 +926,10 @@ 98@@ -911,7 +928,10 @@
89 local_listen(char *host, char *port, struct addrinfo hints) 99 local_listen(char *host, char *port, struct addrinfo hints)
90 { 100 {
91 struct addrinfo *res, *res0; 101 struct addrinfo *res, *res0;
@@ -97,7 +107,7 @@
97 int error; 107 int error;
98 108
99 /* Allow nodename to be null. */ 109 /* Allow nodename to be null. */
100@@ -932,9 +950,11 @@ 110@@ -932,9 +952,11 @@
101 res->ai_protocol)) < 0) 111 res->ai_protocol)) < 0)
102 continue; 112 continue;
103 113
@@ -109,7 +119,7 @@
109 119
110 set_common_sockopts(s, res->ai_family); 120 set_common_sockopts(s, res->ai_family);
111 121
112@@ -1392,11 +1412,13 @@ 122@@ -1392,11 +1414,13 @@
113 { 123 {
114 int x = 1; 124 int x = 1;
115 125
@@ -123,7 +133,7 @@
123 if (Dflag) { 133 if (Dflag) {
124 if (setsockopt(s, SOL_SOCKET, SO_DEBUG, 134 if (setsockopt(s, SOL_SOCKET, SO_DEBUG,
125 &x, sizeof(x)) == -1) 135 &x, sizeof(x)) == -1)
126@@ -1433,13 +1455,17 @@ 136@@ -1433,13 +1457,17 @@
127 } 137 }
128 138
129 if (minttl != -1) { 139 if (minttl != -1) {
@@ -142,7 +152,7 @@
142 } 152 }
143 } 153 }
144 154
145@@ -1596,14 +1622,22 @@ 155@@ -1596,14 +1624,22 @@
146 \t-P proxyuser\tUsername for proxy authentication\n\ 156 \t-P proxyuser\tUsername for proxy authentication\n\
147 \t-p port\t Specify local port for remote connects\n\ 157 \t-p port\t Specify local port for remote connects\n\
148 \t-R CAfile CA bundle\n\ 158 \t-R CAfile CA bundle\n\