It looks like the subject and issuer variables are no longer used in
report_tls() since the recent libtls api change. Also a few whitespace
mods.
Regards,
Index: netcat.c
===================================================================
RCS file: /cvs/src/usr.bin/nc/netcat.c,v
retrieving revision 1.139
diff -u -p -r1.139 netcat.c
--- netcat.c 11 Oct 2015 00:26:23 -0000 1.139
+++ netcat.c 16 Oct 2015 02:26:09 -0000
@@ -670,6 +670,7 @@ tls_setup_client(struct tls *tls_ctx, in
strcmp(tls_expecthash, tls_peer_cert_hash(tls_ctx)) != 0)
errx(1, "peer certificate is not %s", tls_expecthash);
}
+
struct tls *
tls_setup_server(struct tls *tls_ctx, int connfd, char *host)
{
@@ -709,6 +710,7 @@ tls_setup_server(struct tls *tls_ctx, in
}
return NULL;
}
+
/*
* unix_connect()
* Returns a socket connected to a local unix socket. Returns -1 on failure.
@@ -1135,7 +1137,6 @@ drainbuf(int fd, unsigned char *buf, siz
return n;
}
-
ssize_t
fillbuf(int fd, unsigned char *buf, size_t *bufpos, struct tls *tls)
{
@@ -1442,7 +1443,6 @@ map_tls(char *s, int *val)
void
report_tls(struct tls * tls_ctx, char * host, char *tls_expectname)
{
- char *subject = NULL, *issuer = NULL;
fprintf(stderr, "TLS handshake negotiated %s/%s with host %s\n",
tls_conn_version(tls_ctx), tls_conn_cipher(tls_ctx), host);
fprintf(stderr, "Peer name %s\n",
@@ -1456,9 +1456,8 @@ report_tls(struct tls * tls_ctx, char *
if (tls_peer_cert_hash(tls_ctx))
fprintf(stderr, "Cert Hash: %s\n",
tls_peer_cert_hash(tls_ctx));
- free(subject);
- free(issuer);
}
+
void
report_connect(const struct sockaddr *sa, socklen_t salen)
{