Skip to content

Commit

Permalink
silence LGTM for readability
Browse files Browse the repository at this point in the history
  • Loading branch information
reneme committed Jun 2, 2022
1 parent 9e17356 commit 0a7ad40
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lib/tls/tls_signature_scheme.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -321,9 +321,9 @@ bool Signature_Scheme::is_suitable_for(const Private_Key &private_key) const noe
if(keylen <= 250)
return false;

if(m_code == ECDSA_SHA256 && !(keylen >= 250 && keylen <= 350))
return false;

if(m_code == ECDSA_SHA256 && !(keylen >= 250 && keylen <= 350)) // lgtm [cpp/constant-comparison]
return false; // `keylen >= 250` will always be true, because keylen <= 250
// was checked before. Leaving it in for readability.
if(m_code == ECDSA_SHA384 && !(keylen >= 350 && keylen <= 450))
return false;

Expand Down

0 comments on commit 0a7ad40

Please sign in to comment.