Update from HEAD.
This commit is contained in:
23
ssl/d1_pkt.c
23
ssl/d1_pkt.c
@@ -542,27 +542,28 @@ again:
|
|||||||
{
|
{
|
||||||
if (version != s->version && version != DTLS1_BAD_VER)
|
if (version != s->version && version != DTLS1_BAD_VER)
|
||||||
{
|
{
|
||||||
SSLerr(SSL_F_DTLS1_GET_RECORD,SSL_R_WRONG_VERSION_NUMBER);
|
/* unexpected version, silently discard */
|
||||||
/* Send back error using their
|
rr->length = 0;
|
||||||
* version number :-) */
|
s->packet_length = 0;
|
||||||
s->version=version;
|
goto again;
|
||||||
al=SSL_AD_PROTOCOL_VERSION;
|
|
||||||
goto f_err;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((version & 0xff00) != (DTLS1_VERSION & 0xff00) &&
|
if ((version & 0xff00) != (DTLS1_VERSION & 0xff00) &&
|
||||||
(version & 0xff00) != (DTLS1_BAD_VER & 0xff00))
|
(version & 0xff00) != (DTLS1_BAD_VER & 0xff00))
|
||||||
{
|
{
|
||||||
SSLerr(SSL_F_DTLS1_GET_RECORD,SSL_R_WRONG_VERSION_NUMBER);
|
/* wrong version, silently discard record */
|
||||||
goto err;
|
rr->length = 0;
|
||||||
|
s->packet_length = 0;
|
||||||
|
goto again;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rr->length > SSL3_RT_MAX_ENCRYPTED_LENGTH)
|
if (rr->length > SSL3_RT_MAX_ENCRYPTED_LENGTH)
|
||||||
{
|
{
|
||||||
al=SSL_AD_RECORD_OVERFLOW;
|
/* record too long, silently discard it */
|
||||||
SSLerr(SSL_F_DTLS1_GET_RECORD,SSL_R_PACKET_LENGTH_TOO_LONG);
|
rr->length = 0;
|
||||||
goto f_err;
|
s->packet_length = 0;
|
||||||
|
goto again;
|
||||||
}
|
}
|
||||||
|
|
||||||
s->client_version = version;
|
s->client_version = version;
|
||||||
|
|||||||
Reference in New Issue
Block a user