Skip to content

Commit

Permalink
Don't log successful certificate conversions as error logs. (#25258)
Browse files Browse the repository at this point in the history
  • Loading branch information
bzbarsky-apple authored and erwinpan1 committed Jul 4, 2023
1 parent 82b6236 commit 9573561
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/darwin/Framework/CHIP/MTRCertificates.mm
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,12 @@ + (MTRCertificateTLVBytes _Nullable)convertX509Certificate:(MTRCertificateDERByt
chip::MutableByteSpan chipCertBytes(chipCertBuffer);

CHIP_ERROR errorCode = chip::Credentials::ConvertX509CertToChipCert(x509CertBytes, chipCertBytes);
MTR_LOG_ERROR("convertX509Certificate: %s", chip::ErrorStr(errorCode));

if (errorCode != CHIP_NO_ERROR)
if (errorCode != CHIP_NO_ERROR) {
MTR_LOG_ERROR("convertX509Certificate: %s", errorCode.AsString());
return nil;
}

MTR_LOG_INFO("convertX509Certificate: Success");

return AsData(chipCertBytes);
}
Expand Down

0 comments on commit 9573561

Please sign in to comment.