提交 6929b447 编写于 作者: M Matt Caswell

Remove an OPENSSL_assert which could fail

An OPENSSL_assert was being used which could fail (e.g. on a malloc
failure).
Reviewed-by: NRich Salz <rsalz@openssl.org>
上级 267b7789
...@@ -954,7 +954,8 @@ int tls1_mac(SSL *ssl, unsigned char *md, int send) ...@@ -954,7 +954,8 @@ int tls1_mac(SSL *ssl, unsigned char *md, int send)
EVP_DigestSignUpdate(mac_ctx, header, sizeof(header)); EVP_DigestSignUpdate(mac_ctx, header, sizeof(header));
EVP_DigestSignUpdate(mac_ctx, rec->input, rec->length); EVP_DigestSignUpdate(mac_ctx, rec->input, rec->length);
t = EVP_DigestSignFinal(mac_ctx, md, &md_size); t = EVP_DigestSignFinal(mac_ctx, md, &md_size);
OPENSSL_assert(t > 0); if (t <= 0)
return -1;
if (!send && !SSL_USE_ETM(ssl) && FIPS_mode()) if (!send && !SSL_USE_ETM(ssl) && FIPS_mode())
tls_fips_digest_extra(ssl->enc_read_ctx, tls_fips_digest_extra(ssl->enc_read_ctx,
mac_ctx, rec->input, mac_ctx, rec->input,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册