Skip to content

Commit

Permalink
Use CHECK_EQ instead of CHECK
Browse files Browse the repository at this point in the history
  • Loading branch information
davidben authored Sep 20, 2023
1 parent 3e10dc2 commit a3756fe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/crypto/crypto_common.cc
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,7 @@ static bool PrintGeneralName(const BIOPointer& out, const GENERAL_NAME* gen) {
}

bool SafeX509SubjectAltNamePrint(const BIOPointer& out, X509_EXTENSION* ext) {
CHECK(OBJ_obj2nid(X509_EXTENSION_get_object(ext)) == NID_subject_alt_name);
CHECK_EQ(OBJ_obj2nid(X509_EXTENSION_get_object(ext)), NID_subject_alt_name);

GENERAL_NAMES* names = static_cast<GENERAL_NAMES*>(X509V3_EXT_d2i(ext));
if (names == nullptr)
Expand All @@ -839,7 +839,7 @@ bool SafeX509SubjectAltNamePrint(const BIOPointer& out, X509_EXTENSION* ext) {
}

bool SafeX509InfoAccessPrint(const BIOPointer& out, X509_EXTENSION* ext) {
CHECK(OBJ_obj2nid(X509_EXTENSION_get_object(ext)) == NID_info_access);
CHECK_EQ(OBJ_obj2nid(X509_EXTENSION_get_object(ext)), NID_info_access);

AUTHORITY_INFO_ACCESS* descs =
static_cast<AUTHORITY_INFO_ACCESS*>(X509V3_EXT_d2i(ext));
Expand Down

0 comments on commit a3756fe

Please sign in to comment.