From: Nikos Mavrogiannopoulos Date: Sat, 27 Sep 2014 15:37:32 +0000 (+0200) Subject: if receiving a ChangeCipherSpec fails, return GNUTLS_E_UNEXPECTED_PACKET X-Git-Tag: gnutls_3_4_0~855 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=988c8a4ad0ca5af58dad3f31fab367d8e0b7fb8b;p=thirdparty%2Fgnutls.git if receiving a ChangeCipherSpec fails, return GNUTLS_E_UNEXPECTED_PACKET That is more precise than the current GNUTLS_E_UNEXPECTED_PACKET_LENGTH --- diff --git a/lib/gnutls_handshake.c b/lib/gnutls_handshake.c index 301641e808..f1c525ad27 100644 --- a/lib/gnutls_handshake.c +++ b/lib/gnutls_handshake.c @@ -3007,9 +3007,7 @@ static int recv_handshake_final(gnutls_session_t session, int init) if (ret <= 0) { ERR("recv ChangeCipherSpec", ret); gnutls_assert(); - return (ret < - 0) ? ret : - GNUTLS_E_UNEXPECTED_PACKET_LENGTH; + return (ret<0)?ret:GNUTLS_E_UNEXPECTED_PACKET; } if (vers->id == GNUTLS_DTLS0_9)