Skip to content

Commit

Permalink
Update tls13.c, remove warning from clang --analyze
Browse files Browse the repository at this point in the history
  • Loading branch information
guanzhi committed Jun 18, 2024
1 parent b1b6c17 commit 5676042
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/tls13.c
Original file line number Diff line number Diff line change
Expand Up @@ -1308,7 +1308,10 @@ int tls13_record_get_handshake_finished(const uint8_t *record,
return -1;
}
if (*verify_data_len != SM3_DIGEST_SIZE
&& *verify_data_len != SHA384_DIGEST_SIZE) {
#if ENABLE_SHA2
&& *verify_data_len != SHA384_DIGEST_SIZE
#endif
) {
error_print();
return -1;
}
Expand Down Expand Up @@ -1973,8 +1976,8 @@ int tls13_do_accept(TLS_CONNECT *conn)
SM2_KEY server_ecdhe;
SM2_Z256_POINT client_ecdhe_public;
SM2_KEY client_sign_key;
const BLOCK_CIPHER *cipher;
const DIGEST *digest;
const BLOCK_CIPHER *cipher = NULL;
const DIGEST *digest = NULL;
DIGEST_CTX dgst_ctx;
DIGEST_CTX null_dgst_ctx;
size_t padding_len;
Expand Down

0 comments on commit 5676042

Please sign in to comment.