summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2016-08-22 08:18:15 +0200
committerNikos Mavrogiannopoulos <nmav@redhat.com>2016-08-22 08:21:12 +0200
commit12f5166d46db1459455b33b32c01b1fde5c73701 (patch)
tree08fed772869df944604cbb5b3e7eacc3acff990f
parentf1e47b8520e49ba9c036150a4da02e5c448f3098 (diff)
downloadgnutls-12f5166d46db1459455b33b32c01b1fde5c73701.tar.gz
gnutls-cli: print 'Handshake was completed'
The change of moving the handshake process as part of the socket establishment, prevented the text 'Handshake was completed' from being printed as part of a successful handshake. That message was used by applications like gnus which use gnutls-cli. This patch reverts that change and prints that message on successful handshakes.
-rw-r--r--src/cli.c2
-rw-r--r--src/socket.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/src/cli.c b/src/cli.c
index 92482221fd..0913898f8b 100644
--- a/src/cli.c
+++ b/src/cli.c
@@ -1218,6 +1218,8 @@ int main(int argc, char **argv)
socket_open(&hd, hostname, service, OPT_ARG(STARTTLS_PROTO), socket_flags, CONNECT_MSG, NULL);
hd.verbose = verbose;
+ printf("- Handshake was completed\n");
+
if (resume != 0)
if (try_resume(&hd))
return 1;
diff --git a/src/socket.c b/src/socket.c
index aae9ee7403..5507c71499 100644
--- a/src/socket.c
+++ b/src/socket.c
@@ -465,8 +465,7 @@ socket_open(socket_st * hd, const char *hostname, const char *service,
else if (err < 0) {
fprintf(stderr, "*** handshake has failed: %s\n", gnutls_strerror(err));
exit(1);
- } else if (hd->verbose)
- printf("- Handshake was completed\n");
+ }
}
break;