svn commit: r358056 - projects/nfs-over-tls/usr.sbin/rpctlscd
Rick Macklem
rmacklem at FreeBSD.org
Mon Feb 17 21:33:59 UTC 2020
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;
}
}
More information about the svn-src-projects
mailing list