提交 45206340 编写于 作者: B Bodo Möller

ignore Client Hellos when we're in handshake anyway

上级 b35e9050
......@@ -284,6 +284,10 @@ long ssl3_get_message(SSL *s, int st1, int stn, int mt, long max, int *ok)
p=(unsigned char *)s->init_buf->data;
if (s->state == st1) /* s->init_num < 4 */
{
int skip_message;
do
{
while (s->init_num < 4)
{
......@@ -298,7 +302,17 @@ long ssl3_get_message(SSL *s, int st1, int stn, int mt, long max, int *ok)
s->init_num+=i;
}
/* XXX server may always send Hello Request */
skip_message = 0;
if (!s->server)
if (p[0] == SSL3_MT_HELLO_REQUEST)
/* The server may always send 'Hello Request' messages --
* we are doing a handshake anyway now, so ignore them
* if their format is correct */
if (p[1] == 0 && p[2] == 0 &&p[3] == 0)
skip_message = 1;
}
while (skip_message);
if ((mt >= 0) && (*p != mt))
{
al=SSL_AD_UNEXPECTED_MESSAGE;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册