Don't treat PACKET_remaining() as boolean

Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3244)
This commit is contained in:
Tatsuhiro Tsujikawa 2017-04-21 22:10:32 +09:00 committed by Matt Caswell
parent bf5c84f5d1
commit 8e1634ec36
2 changed files with 6 additions and 6 deletions

View File

@ -1712,9 +1712,9 @@ MSG_PROCESS_RETURN tls_process_server_certificate(SSL *s, PACKET *pkt)
if (!tls_collect_extensions(s, &extensions,
SSL_EXT_TLS1_3_CERTIFICATE, &rawexts,
&al, NULL, chainidx == 0)
|| !tls_parse_all_extensions(s, SSL_EXT_TLS1_3_CERTIFICATE,
rawexts, x, chainidx, &al,
!PACKET_remaining(pkt))) {
|| !tls_parse_all_extensions(s, SSL_EXT_TLS1_3_CERTIFICATE,
rawexts, x, chainidx, &al,
PACKET_remaining(pkt) == 0)) {
OPENSSL_free(rawexts);
goto f_err;
}

View File

@ -3218,9 +3218,9 @@ MSG_PROCESS_RETURN tls_process_client_certificate(SSL *s, PACKET *pkt)
if (!tls_collect_extensions(s, &extensions,
SSL_EXT_TLS1_3_CERTIFICATE, &rawexts,
&al, NULL, chainidx == 0)
|| !tls_parse_all_extensions(s, SSL_EXT_TLS1_3_CERTIFICATE,
rawexts, x, chainidx, &al,
!PACKET_remaining(&spkt))) {
|| !tls_parse_all_extensions(s, SSL_EXT_TLS1_3_CERTIFICATE,
rawexts, x, chainidx, &al,
PACKET_remaining(&spkt) == 0)) {
OPENSSL_free(rawexts);
goto f_err;
}