From: Nikos Mavrogiannopoulos Date: Fri, 26 Aug 2011 16:13:21 +0000 (+0200) Subject: Allow out-of-order change_cipher_spec in DTLS. X-Git-Tag: gnutls_3_0_2~27 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=407c53056f717a3ef385d6e5fed6cb9cb7efacf4;p=thirdparty%2Fgnutls.git Allow out-of-order change_cipher_spec in DTLS. --- diff --git a/lib/gnutls_record.c b/lib/gnutls_record.c index 1cd87a4fd8..c0806ab703 100644 --- a/lib/gnutls_record.c +++ b/lib/gnutls_record.c @@ -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) {