]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
Corrected case where handshake data were received during a session. It now stores...
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Sat, 8 Aug 2009 06:06:57 +0000 (09:06 +0300)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Sat, 8 Aug 2009 06:06:57 +0000 (09:06 +0300)
lib/gnutls_handshake.c
lib/gnutls_record.c

index 1ad4f5209e873a500c3c37a60bb8dd5b7a324b71..5ccd31746a629eaefbad164625ed5f512667e3ca 100644 (file)
@@ -2259,7 +2259,9 @@ _gnutls_recv_supplemental (gnutls_session_t session)
   * then %GNUTLS_E_GOT_APPLICATION_DATA or
   * %GNUTLS_E_WARNING_ALERT_RECEIVED may be returned.  Note that these
   * are non fatal errors, only in the specific case of a rehandshake.
-  * Their meaning is that the client rejected the rehandshake request.
+  * Their meaning is that the client rejected the rehandshake request or
+  * in the case of %GNUTLS_E_GOT_APPLICATION_DATA it might also mean that
+  * some data were pending.
   *
   * Returns: %GNUTLS_E_SUCCESS on success, otherwise an error.
   *
index 42869bec9ecd0073f20a4415f45e535e932d099e..62df8715174d32eef232f3a976fdb9090aafcbf5 100644 (file)
@@ -744,6 +744,12 @@ record_check_type (gnutls_session_t session,
          if (session->security_parameters.entity == GNUTLS_SERVER)
            {
              gnutls_assert ();
+             ret = _gnutls_record_buffer_put (recv_type, session, (void *) data, data_size);
+             if (ret < 0) 
+               {
+                 gnutls_assert();
+                 return ret;
+                }
              return GNUTLS_E_REHANDSHAKE;
            }