set correct DEFAULT_CA_FILE path
This commit is contained in:
parent
332c2eeaa3
commit
2570ad9344
@ -1,6 +1,16 @@
|
|||||||
--- apps/nc/netcat.c.orig Sun Sep 4 05:37:35 2016
|
--- apps/nc/netcat.c.orig Mon Oct 3 06:09:29 2016
|
||||||
+++ apps/nc/netcat.c Sun Sep 4 05:40:24 2016
|
+++ apps/nc/netcat.c Sun Oct 30 21:42:27 2016
|
||||||
@@ -92,9 +92,13 @@
|
@@ -65,7 +65,9 @@
|
||||||
|
#define POLL_NETIN 2
|
||||||
|
#define POLL_STDOUT 3
|
||||||
|
#define BUFSIZE 16384
|
||||||
|
+#ifndef DEFAULT_CA_FILE
|
||||||
|
#define DEFAULT_CA_FILE "/etc/ssl/cert.pem"
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
#define TLS_LEGACY (1 << 1)
|
||||||
|
#define TLS_NOVERIFY (1 << 2)
|
||||||
|
@@ -92,9 +94,13 @@
|
||||||
int Dflag; /* sodebug */
|
int Dflag; /* sodebug */
|
||||||
int Iflag; /* TCP receive buffer size */
|
int Iflag; /* TCP receive buffer size */
|
||||||
int Oflag; /* TCP send buffer size */
|
int Oflag; /* TCP send buffer size */
|
||||||
@ -14,7 +24,7 @@
|
|||||||
|
|
||||||
int usetls; /* use TLS */
|
int usetls; /* use TLS */
|
||||||
char *Cflag; /* Public cert file */
|
char *Cflag; /* Public cert file */
|
||||||
@@ -146,7 +150,7 @@
|
@@ -146,7 +152,7 @@
|
||||||
struct servent *sv;
|
struct servent *sv;
|
||||||
socklen_t len;
|
socklen_t len;
|
||||||
struct sockaddr_storage cliaddr;
|
struct sockaddr_storage cliaddr;
|
||||||
@ -23,7 +33,7 @@
|
|||||||
const char *errstr, *proxyhost = "", *proxyport = NULL;
|
const char *errstr, *proxyhost = "", *proxyport = NULL;
|
||||||
struct addrinfo proxyhints;
|
struct addrinfo proxyhints;
|
||||||
char unix_dg_tmp_socket_buf[UNIX_DG_TMP_SOCKET_SIZE];
|
char unix_dg_tmp_socket_buf[UNIX_DG_TMP_SOCKET_SIZE];
|
||||||
@@ -256,12 +260,14 @@
|
@@ -256,12 +262,14 @@
|
||||||
case 'u':
|
case 'u':
|
||||||
uflag = 1;
|
uflag = 1;
|
||||||
break;
|
break;
|
||||||
@ -38,7 +48,7 @@
|
|||||||
case 'v':
|
case 'v':
|
||||||
vflag = 1;
|
vflag = 1;
|
||||||
break;
|
break;
|
||||||
@@ -294,9 +300,11 @@
|
@@ -294,9 +302,11 @@
|
||||||
errx(1, "TCP send window %s: %s",
|
errx(1, "TCP send window %s: %s",
|
||||||
errstr, optarg);
|
errstr, optarg);
|
||||||
break;
|
break;
|
||||||
@ -50,7 +60,7 @@
|
|||||||
case 'T':
|
case 'T':
|
||||||
errstr = NULL;
|
errstr = NULL;
|
||||||
errno = 0;
|
errno = 0;
|
||||||
@@ -320,9 +328,11 @@
|
@@ -320,9 +330,11 @@
|
||||||
argc -= optind;
|
argc -= optind;
|
||||||
argv += optind;
|
argv += optind;
|
||||||
|
|
||||||
@ -62,7 +72,7 @@
|
|||||||
|
|
||||||
if (family == AF_UNIX) {
|
if (family == AF_UNIX) {
|
||||||
if (pledge("stdio rpath wpath cpath tmppath unix", NULL) == -1)
|
if (pledge("stdio rpath wpath cpath tmppath unix", NULL) == -1)
|
||||||
@@ -825,7 +835,10 @@
|
@@ -825,7 +837,10 @@
|
||||||
remote_connect(const char *host, const char *port, struct addrinfo hints)
|
remote_connect(const char *host, const char *port, struct addrinfo hints)
|
||||||
{
|
{
|
||||||
struct addrinfo *res, *res0;
|
struct addrinfo *res, *res0;
|
||||||
@ -74,7 +84,7 @@
|
|||||||
|
|
||||||
if ((error = getaddrinfo(host, port, &hints, &res0)))
|
if ((error = getaddrinfo(host, port, &hints, &res0)))
|
||||||
errx(1, "getaddrinfo: %s", gai_strerror(error));
|
errx(1, "getaddrinfo: %s", gai_strerror(error));
|
||||||
@@ -839,8 +852,10 @@
|
@@ -839,8 +854,10 @@
|
||||||
if (sflag || pflag) {
|
if (sflag || pflag) {
|
||||||
struct addrinfo ahints, *ares;
|
struct addrinfo ahints, *ares;
|
||||||
|
|
||||||
@ -85,7 +95,7 @@
|
|||||||
memset(&ahints, 0, sizeof(struct addrinfo));
|
memset(&ahints, 0, sizeof(struct addrinfo));
|
||||||
ahints.ai_family = res->ai_family;
|
ahints.ai_family = res->ai_family;
|
||||||
ahints.ai_socktype = uflag ? SOCK_DGRAM : SOCK_STREAM;
|
ahints.ai_socktype = uflag ? SOCK_DGRAM : SOCK_STREAM;
|
||||||
@@ -911,7 +926,10 @@
|
@@ -911,7 +928,10 @@
|
||||||
local_listen(char *host, char *port, struct addrinfo hints)
|
local_listen(char *host, char *port, struct addrinfo hints)
|
||||||
{
|
{
|
||||||
struct addrinfo *res, *res0;
|
struct addrinfo *res, *res0;
|
||||||
@ -97,7 +107,7 @@
|
|||||||
int error;
|
int error;
|
||||||
|
|
||||||
/* Allow nodename to be null. */
|
/* Allow nodename to be null. */
|
||||||
@@ -932,9 +950,11 @@
|
@@ -932,9 +952,11 @@
|
||||||
res->ai_protocol)) < 0)
|
res->ai_protocol)) < 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
@ -109,7 +119,7 @@
|
|||||||
|
|
||||||
set_common_sockopts(s, res->ai_family);
|
set_common_sockopts(s, res->ai_family);
|
||||||
|
|
||||||
@@ -1392,11 +1412,13 @@
|
@@ -1392,11 +1414,13 @@
|
||||||
{
|
{
|
||||||
int x = 1;
|
int x = 1;
|
||||||
|
|
||||||
@ -123,7 +133,7 @@
|
|||||||
if (Dflag) {
|
if (Dflag) {
|
||||||
if (setsockopt(s, SOL_SOCKET, SO_DEBUG,
|
if (setsockopt(s, SOL_SOCKET, SO_DEBUG,
|
||||||
&x, sizeof(x)) == -1)
|
&x, sizeof(x)) == -1)
|
||||||
@@ -1433,13 +1455,17 @@
|
@@ -1433,13 +1457,17 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if (minttl != -1) {
|
if (minttl != -1) {
|
||||||
@ -142,7 +152,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1596,14 +1622,22 @@
|
@@ -1596,14 +1624,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\
|
||||||
\t-R CAfile CA bundle\n\
|
\t-R CAfile CA bundle\n\
|
||||||
|
Loading…
x
Reference in New Issue
Block a user