提交 9e0ac6a2 编写于 作者: M Matt Caswell

Check ClientHello boundary as per draft-19

Reviewed-by: NRich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2895)
上级 6594189f
...@@ -1534,6 +1534,14 @@ static int tls_early_post_process_client_hello(SSL *s, int *al) ...@@ -1534,6 +1534,14 @@ static int tls_early_post_process_client_hello(SSL *s, int *al)
goto err; goto err;
} }
/* TLSv1.3 defines that a ClientHello must end on a record boundary */
if (SSL_IS_TLS13(s) && RECORD_LAYER_processed_read_pending(&s->rlayer)) {
*al = SSL_AD_UNEXPECTED_MESSAGE;
SSLerr(SSL_F_TLS_EARLY_POST_PROCESS_CLIENT_HELLO,
SSL_R_NOT_ON_RECORD_BOUNDARY);
goto err;
}
if (SSL_IS_DTLS(s)) { if (SSL_IS_DTLS(s)) {
/* Empty cookie was already handled above by returning early. */ /* Empty cookie was already handled above by returning early. */
if (SSL_get_options(s) & SSL_OP_COOKIE_EXCHANGE) { if (SSL_get_options(s) & SSL_OP_COOKIE_EXCHANGE) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册