提交 635b7d3f 编写于 作者: M Matt Caswell

Updates following review feedback

Reviewed-by: NRich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2895)
上级 c35cb287
...@@ -1881,12 +1881,9 @@ int create_synthetic_message_hash(SSL *s) ...@@ -1881,12 +1881,9 @@ int create_synthetic_message_hash(SSL *s)
{ {
unsigned char hashval[EVP_MAX_MD_SIZE]; unsigned char hashval[EVP_MAX_MD_SIZE];
size_t hashlen = 0; size_t hashlen = 0;
unsigned char msghdr[SSL3_HM_HEADER_LENGTH] = { unsigned char msghdr[SSL3_HM_HEADER_LENGTH];
SSL3_MT_MESSAGE_HASH,
0, memset(msghdr, 0, sizeof(msghdr));
0,
0
};
/* Get the hash of the initial ClientHello */ /* Get the hash of the initial ClientHello */
if (!ssl3_digest_cached_records(s, 0) if (!ssl3_digest_cached_records(s, 0)
...@@ -1900,6 +1897,7 @@ int create_synthetic_message_hash(SSL *s) ...@@ -1900,6 +1897,7 @@ int create_synthetic_message_hash(SSL *s)
return 0; return 0;
/* Inject the synthetic message_hash message */ /* Inject the synthetic message_hash message */
msghdr[0] = SSL3_MT_MESSAGE_HASH;
msghdr[SSL3_HM_HEADER_LENGTH - 1] = hashlen; msghdr[SSL3_HM_HEADER_LENGTH - 1] = hashlen;
if (!ssl3_finish_mac(s, msghdr, SSL3_HM_HEADER_LENGTH) if (!ssl3_finish_mac(s, msghdr, SSL3_HM_HEADER_LENGTH)
|| !ssl3_finish_mac(s, hashval, hashlen)) { || !ssl3_finish_mac(s, hashval, hashlen)) {
......
...@@ -1534,7 +1534,7 @@ static int tls_early_post_process_client_hello(SSL *s, int *al) ...@@ -1534,7 +1534,7 @@ 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 */ /* TLSv1.3 specifies that a ClientHello must end on a record boundary */
if (SSL_IS_TLS13(s) && RECORD_LAYER_processed_read_pending(&s->rlayer)) { if (SSL_IS_TLS13(s) && RECORD_LAYER_processed_read_pending(&s->rlayer)) {
*al = SSL_AD_UNEXPECTED_MESSAGE; *al = SSL_AD_UNEXPECTED_MESSAGE;
SSLerr(SSL_F_TLS_EARLY_POST_PROCESS_CLIENT_HELLO, SSLerr(SSL_F_TLS_EARLY_POST_PROCESS_CLIENT_HELLO,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册