提交 7a04b854 编写于 作者: R Richard Levitte

[PR3597] Advance to the next state variant when reusing messages.

Previously, state variant was not advanced, which resulted in state
being stuck in the st1 variant (usually "_A").

This broke certificate callback retry logic when accepting connections
that were using SSLv2 ClientHello (hence reusing the message), because
their state never advanced to SSL3_ST_SR_CLNT_HELLO_C variant required
for the retry code path.

Reported by Yichun Zhang (agentzh).
Signed-off-by: NPiotr Sikora <piotr@cloudflare.com>
Reviewed-by: NRichard Levitte <levitte@openssl.org>
Reviewed-by: NMatt Caswell <matt@openssl.org>
上级 8123d158
...@@ -358,6 +358,7 @@ long ssl3_get_message(SSL *s, int st1, int stn, int mt, long max, int *ok) ...@@ -358,6 +358,7 @@ long ssl3_get_message(SSL *s, int st1, int stn, int mt, long max, int *ok)
goto f_err; goto f_err;
} }
*ok=1; *ok=1;
s->state = stn;
s->init_msg = s->init_buf->data + 4; s->init_msg = s->init_buf->data + 4;
s->init_num = (int)s->s3->tmp.message_size; s->init_num = (int)s->s3->tmp.message_size;
return s->init_num; return s->init_num;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册