提交 baacd8d4 编写于 作者: D Dr. Stephen Henson

PR: 1981

Submitted by: Robin Seggelmann <seggelmann@fh-muenster.de>
Approved by: steve@openssl.org

DTLS record header bugfix.
上级 6c495bdb
...@@ -586,26 +586,27 @@ again: ...@@ -586,26 +586,27 @@ again:
{ {
if (version != s->version) if (version != s->version)
{ {
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) != (s->version & 0xff00)) if ((version & 0xff00) != (s->version & 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;
} }
/* now s->rstate == SSL_ST_READ_BODY */ /* now s->rstate == SSL_ST_READ_BODY */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册