|
|
62bcd0 |
diff --git b/lib/gnutls_handshake.c a/lib/gnutls_handshake.c
|
|
|
62bcd0 |
index 5930941..e904f2e 100644
|
|
|
62bcd0 |
--- b/lib/gnutls_handshake.c
|
|
|
62bcd0 |
+++ a/lib/gnutls_handshake.c
|
|
|
62bcd0 |
@@ -2510,7 +2510,8 @@ static int _gnutls_recv_supplemental(gnutls_session_t session)
|
|
|
62bcd0 |
* are non fatal errors, only in the specific case of a rehandshake.
|
|
|
62bcd0 |
* Their meaning is that the client rejected the rehandshake request or
|
|
|
62bcd0 |
* in the case of %GNUTLS_E_GOT_APPLICATION_DATA it could also mean that
|
|
|
62bcd0 |
- * some data were pending.
|
|
|
62bcd0 |
+ * some data were pending. A client may receive that error code if
|
|
|
62bcd0 |
+ * it initiates the handshake and the server doesn't agreed.
|
|
|
62bcd0 |
*
|
|
|
62bcd0 |
* Returns: %GNUTLS_E_SUCCESS on success, otherwise a negative error code.
|
|
|
62bcd0 |
**/
|
|
|
62bcd0 |
diff --git b/lib/gnutls_record.c a/lib/gnutls_record.c
|
|
|
62bcd0 |
index 157d12a..40c20fe 100644
|
|
|
62bcd0 |
--- b/lib/gnutls_record.c
|
|
|
62bcd0 |
+++ a/lib/gnutls_record.c
|
|
|
62bcd0 |
@@ -837,7 +837,7 @@ record_add_to_buffers(gnutls_session_t session,
|
|
|
62bcd0 |
* reasons). Otherwise it is an unexpected packet
|
|
|
62bcd0 |
*/
|
|
|
62bcd0 |
if (type == GNUTLS_ALERT
|
|
|
62bcd0 |
- || (htype == GNUTLS_HANDSHAKE_CLIENT_HELLO
|
|
|
62bcd0 |
+ || ((htype == GNUTLS_HANDSHAKE_SERVER_HELLO || htype == GNUTLS_HANDSHAKE_CLIENT_HELLO)
|
|
|
62bcd0 |
&& type == GNUTLS_HANDSHAKE)) {
|
|
|
62bcd0 |
/* even if data is unexpected put it into the buffer */
|
|
|
62bcd0 |
_gnutls_record_buffer_put(session, recv->type,
|