Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Feb 2020 21:33:58 +0000 (UTC)
From:      Rick Macklem <rmacklem@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r358056 - projects/nfs-over-tls/usr.sbin/rpctlscd
Message-ID:  <202002172133.01HLXw1Y020650@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rmacklem
Date: Mon Feb 17 21:33:58 2020
New Revision: 358056
URL: https://svnweb.freebsd.org/changeset/base/358056

Log:
  Update rpctlscd so that the "-t" option can be used to strip off the
  478 bytes of server->client SSL stuff.  This is only useful for testing
  and only until TLS actually can work (it needs receive side KERN_TLS).

Modified:
  projects/nfs-over-tls/usr.sbin/rpctlscd/rpctlscd.c

Modified: projects/nfs-over-tls/usr.sbin/rpctlscd/rpctlscd.c
==============================================================================
--- projects/nfs-over-tls/usr.sbin/rpctlscd/rpctlscd.c	Mon Feb 17 21:29:05 2020	(r358055)
+++ projects/nfs-over-tls/usr.sbin/rpctlscd/rpctlscd.c	Mon Feb 17 21:33:58 2020	(r358056)
@@ -221,20 +221,18 @@ rpctlscd_verbose_out("rpctlsd_connect s=%d\n", s);
 	if (s < 0)
 		return (FALSE);
 
-	if (testnossl == 0) {
-		/* Do a TLS connect handshake. */
-		ssl = rpctls_connect(rpctls_ctx, s);
-		if (ssl == NULL)
-			rpctlscd_verbose_out("rpctlsd_connect: can't do TLS "
-			    "handshake\n");
-		else {
-			/* Read the 478 bytes of junk off the socket. */
-			siz = 478;
-			ret = 1;
-			while (siz > 0 && ret > 0) {
-				ret = recv(s, &buf[478 - siz], siz, 0);
-				siz -= ret;
-			}
+	/* Do a TLS connect handshake. */
+	ssl = rpctls_connect(rpctls_ctx, s);
+	if (ssl == NULL)
+		rpctlscd_verbose_out("rpctlsd_connect: can't do TLS "
+		    "handshake\n");
+	if (testnossl != 0 && ssl != NULL) {
+		/* Read the 478 bytes of junk off the socket. */
+		siz = 478;
+		ret = 1;
+		while (siz > 0 && ret > 0) {
+			ret = recv(s, &buf[478 - siz], siz, 0);
+			siz -= ret;
 		}
 	}
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202002172133.01HLXw1Y020650>