diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2018-02-10 06:25:17 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2018-02-10 06:25:17 +0000 |
commit | ebeee780d18aa8a4845789a0daa11230ab3fdc91 (patch) | |
tree | cc7aaf1b15e034b46e4f7a51488ddff392e401de /usr.bin/ftp/fetch.c | |
parent | 2ff8cf849551b24534d7822d27266fff3a757b58 (diff) |
Add TLS session support to ftp(1).
If a session file is specified via the `-S session=...', ftp(1) will
attempt to resume TLS sessions based on the session data contained within
this file. Upon completion of a successful TLS handshake the session file
will be updated with new session data, if available.
Discussed with deraadt@ and beck@.
Requested by and input from espie@.
Diffstat (limited to 'usr.bin/ftp/fetch.c')
-rw-r--r-- | usr.bin/ftp/fetch.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/ftp/fetch.c b/usr.bin/ftp/fetch.c index 7c3363cfd61..30f73122da5 100644 --- a/usr.bin/ftp/fetch.c +++ b/usr.bin/ftp/fetch.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fetch.c,v 1.166 2018/02/07 23:04:50 procter Exp $ */ +/* $OpenBSD: fetch.c,v 1.167 2018/02/10 06:25:16 jsing Exp $ */ /* $NetBSD: fetch.c,v 1.14 1997/08/18 10:20:20 lukem Exp $ */ /*- @@ -1037,6 +1037,9 @@ improper: cleanup_url_get: #ifndef NOSSL if (tls != NULL) { + if (tls_session_fd != -1) + dprintf(STDERR_FILENO, "tls session resumed: %s\n", + tls_conn_session_resumed(tls) ? "yes" : "no"); do { i = tls_close(tls); } while (i == TLS_WANT_POLLIN || i == TLS_WANT_POLLOUT); |