]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
Allow out-of-order change_cipher_spec in DTLS.
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Fri, 26 Aug 2011 16:13:21 +0000 (18:13 +0200)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Fri, 26 Aug 2011 16:13:21 +0000 (18:13 +0200)
lib/gnutls_record.c

index 1cd87a4fd8a194ee43dcec770831d0f61a3ec198..c0806ab703980fa123e9e0e21fed1730dee0a049 100644 (file)
@@ -657,13 +657,12 @@ record_add_to_buffers (gnutls_session_t session,
           break;
 
         case GNUTLS_CHANGE_CIPHER_SPEC:
-          /* this packet is now handled in the recv_int()
-           * function
-           */
-          gnutls_assert ();
-
-          return GNUTLS_E_UNEXPECTED_PACKET;
+          if (!(IS_DTLS(session)))
+            return gnutls_assert_val(GNUTLS_E_UNEXPECTED_PACKET);
+            
+          _gnutls_record_buffer_put (session, type, seq, bufel);
 
+          break;
         case GNUTLS_APPLICATION_DATA:
           if (session->internals.initial_negotiation_completed == 0)
             {