summaryrefslogtreecommitdiff
path: root/src/cli.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2015-01-12 23:14:35 +0100
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2015-01-12 23:14:35 +0100
commit82a9120112a723a6317352135beb125bbe4c6fc3 (patch)
tree164151803319b8b9e223a25c02a214a3e93230a0 /src/cli.c
parentae5474c0568dae799b337bcd9c5da8fe1e48ae25 (diff)
downloadgnutls-82a9120112a723a6317352135beb125bbe4c6fc3.tar.gz
gnutls-cli: added --starttls-proto option
Diffstat (limited to 'src/cli.c')
-rw-r--r--src/cli.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/cli.c b/src/cli.c
index 613cf4d0a7..371b4d3268 100644
--- a/src/cli.c
+++ b/src/cli.c
@@ -856,6 +856,9 @@ static int try_resume(socket_st * hd)
("\n\n- Connecting again- trying to resume previous session\n");
socket_open(hd, hostname, service, udp, CONNECT_MSG);
+ if (HAVE_OPT(STARTTLS_PROTO))
+ socket_starttls(hd, OPT_ARG(STARTTLS_PROTO));
+
hd->session = init_tls_session(hostname);
gnutls_session_set_data(hd->session, session_data,
session_data_size);
@@ -1131,6 +1134,9 @@ int main(int argc, char **argv)
socket_open(&hd, hostname, service, udp, CONNECT_MSG);
hd.verbose = verbose;
+ if (HAVE_OPT(STARTTLS_PROTO))
+ socket_starttls(&hd, OPT_ARG(STARTTLS_PROTO));
+
hd.session = init_tls_session(hostname);
if (starttls)
goto after_handshake;