Skip to content

Commit

Permalink
Update src/description.cpp
Browse files Browse the repository at this point in the history
Co-authored-by: Paul-Louis Ageneau <[email protected]>
  • Loading branch information
Sean-Der and paullouisageneau authored Jan 9, 2024
1 parent 1d6e743 commit 2bb79f0
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/description.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1330,9 +1330,8 @@ std::string CertificateFingerprint::AlgorithmIdentifier(
}

bool CertificateFingerprint::isValid() const {
auto expectedSize = AlgorithmSize(algorithm);

if (this->value.size() != expectedSize * 3 - 1) {
size_t expectedSize = AlgorithmSize(this->algorithm);
if (expectedSize == 0 || this->value.size() != expectedSize * 3 - 1) {
return false;
}

Expand Down

0 comments on commit 2bb79f0

Please sign in to comment.