Skip to content

Commit

Permalink
Code review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Damian-Nordic committed Oct 17, 2022
1 parent c85a001 commit 41778cc
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/crypto/CHIPCryptoPALPSA.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -782,8 +782,7 @@ P256Keypair::~P256Keypair()

CHIP_ERROR P256Keypair::NewCertificateSigningRequest(uint8_t * out_csr, size_t & csr_length) const
{
VerifyOrReturnError(out_csr != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
VerifyOrReturnError(csr_length > 0, CHIP_ERROR_INVALID_ARGUMENT);
VerifyOrReturnError(isBufferNonEmpty(out_csr, csr_length), CHIP_ERROR_INVALID_ARGUMENT);
VerifyOrReturnError(mInitialized, CHIP_ERROR_WELL_UNINITIALIZED);

MutableByteSpan csr(out_csr, csr_length);
Expand Down

0 comments on commit 41778cc

Please sign in to comment.