diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2010-01-10 14:21:42 +0100 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2010-01-11 00:26:51 +0100 |
commit | 1a338cbaaeec11d958de8da4d1ae036979fccf3e (patch) | |
tree | 5f5341d38761f3acc5167ad38983023033b4a0e5 /src/cli.c | |
parent | 581718c927838474200c305587241ae15511cb82 (diff) | |
download | gnutls-1a338cbaaeec11d958de8da4d1ae036979fccf3e.tar.gz |
Added safe renegotiation patch from Steve Dispensa, modified to suit gnutls
code style and error checking. Modified to conform to draft-ietf-tls-renegotiation-03.txt.
gnutls-cli will search input for **RENEGOTIATION** to perform a renegotiation
and gnutls-serv will perform one if requested.
Diffstat (limited to 'src/cli.c')
-rw-r--r-- | src/cli.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -826,6 +826,17 @@ after_handshake: continue; } + if (strstr(buffer, "**REHANDSHAKE**") != NULL) { + fprintf (stderr, "*** Starting TLS rehandshake\n"); + ret = do_handshake (&hd); + if (ret < 0) + { + fprintf (stderr, "*** Rehandshake has failed\n"); + user_term = 1; + retval = 1; + break; + } + } if (crlf != 0) { char *b = strchr (buffer, '\n'); |