diff options
author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2017-04-21 22:10:32 +0900 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2017-04-26 16:56:37 +0100 |
commit | 8e1634ec36c9a125f3aa1c48b743ff864c6fcbd3 (patch) | |
tree | 3228430919079eaf5c1b0fc9ca1a64b3b8c824ae /ssl | |
parent | bf5c84f5d17ed68076ba1faa4a9eaaf4f51e4bf1 (diff) | |
download | openssl-8e1634ec36c9a125f3aa1c48b743ff864c6fcbd3.tar.gz |
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)
Diffstat (limited to 'ssl')
-rw-r--r-- | ssl/statem/statem_clnt.c | 6 | ||||
-rw-r--r-- | ssl/statem/statem_srvr.c | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/ssl/statem/statem_clnt.c b/ssl/statem/statem_clnt.c index 0b4931d6d0..a66dd40806 100644 --- a/ssl/statem/statem_clnt.c +++ b/ssl/statem/statem_clnt.c @@ -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; } diff --git a/ssl/statem/statem_srvr.c b/ssl/statem/statem_srvr.c index f6ecbf7006..9dfdbe5e6a 100644 --- a/ssl/statem/statem_srvr.c +++ b/ssl/statem/statem_srvr.c @@ -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; } |