diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2014-11-22 10:55:21 +0100 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2014-11-22 10:55:40 +0100 |
commit | 4614bb3e3d4ff80d91f91c4d3e5a9afccd60cde0 (patch) | |
tree | 5e6c4571682c44a0c1408ccd42b9adce7bc40c4d | |
parent | eb152864d13844e15323901590a984eb022b486a (diff) | |
download | gnutls-4614bb3e3d4ff80d91f91c4d3e5a9afccd60cde0.tar.gz |
restore only the documented behavior
-rw-r--r-- | lib/gnutls_handshake.c | 3 | ||||
-rw-r--r-- | lib/gnutls_record.c | 2 | ||||
-rw-r--r-- | tests/mini-rehandshake-2.c | 1 |
3 files changed, 2 insertions, 4 deletions
diff --git a/lib/gnutls_handshake.c b/lib/gnutls_handshake.c index e904f2e29d..5930941589 100644 --- a/lib/gnutls_handshake.c +++ b/lib/gnutls_handshake.c @@ -2510,8 +2510,7 @@ static int _gnutls_recv_supplemental(gnutls_session_t session) * are non fatal errors, only in the specific case of a rehandshake. * Their meaning is that the client rejected the rehandshake request or * in the case of %GNUTLS_E_GOT_APPLICATION_DATA it could also mean that - * some data were pending. A client may receive that error code if - * it initiates the handshake and the server doesn't agreed. + * some data were pending. * * Returns: %GNUTLS_E_SUCCESS on success, otherwise a negative error code. **/ diff --git a/lib/gnutls_record.c b/lib/gnutls_record.c index 40c20fe5d4..157d12a773 100644 --- a/lib/gnutls_record.c +++ b/lib/gnutls_record.c @@ -837,7 +837,7 @@ record_add_to_buffers(gnutls_session_t session, * reasons). Otherwise it is an unexpected packet */ if (type == GNUTLS_ALERT - || ((htype == GNUTLS_HANDSHAKE_SERVER_HELLO || htype == GNUTLS_HANDSHAKE_CLIENT_HELLO) + || (htype == GNUTLS_HANDSHAKE_CLIENT_HELLO && type == GNUTLS_HANDSHAKE)) { /* even if data is unexpected put it into the buffer */ _gnutls_record_buffer_put(session, recv->type, diff --git a/tests/mini-rehandshake-2.c b/tests/mini-rehandshake-2.c index 10f130125b..6daa6cc7ed 100644 --- a/tests/mini-rehandshake-2.c +++ b/tests/mini-rehandshake-2.c @@ -452,7 +452,6 @@ void doit(void) signal(SIGPIPE, SIG_IGN); start(0); - start(1); } #endif /* _WIN32 */ |