Skip to content

Commit 64e3ce6

Browse files
Provided review suggestions
Signed-off-by: Arkadiusz Balys <arkadiusz.balys@nordicsemi.no>
1 parent a6a0b6e commit 64e3ce6

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

src/crypto/CHIPCryptoPALmbedTLS.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -783,7 +783,7 @@ P256Keypair::~P256Keypair()
783783

784784
CHIP_ERROR P256Keypair::NewCertificateSigningRequest(uint8_t * out_csr, size_t & csr_length) const
785785
{
786-
#if CHIP_CRYPTO_USE_X509
786+
#if CHIP_CRYPTO_USE_X509 && defined(MBEDTLS_X509_CSR_WRITE_C)
787787
CHIP_ERROR error = CHIP_NO_ERROR;
788788
int result = 0;
789789
size_t out_length;
@@ -834,7 +834,7 @@ CHIP_ERROR P256Keypair::NewCertificateSigningRequest(uint8_t * out_csr, size_t &
834834
#else
835835
ChipLogError(Crypto, "MBEDTLS_X509_CSR_WRITE_C is not enabled. CSR cannot be created");
836836
return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE;
837-
#endif // CHIP_CRYPTO_USE_X509
837+
#endif // CHIP_CRYPTO_USE_X509 && defined(MBEDTLS_X509_CSR_WRITE_C)
838838
}
839839

840840
typedef struct Spake2p_Context

src/crypto/CHIPCryptoPALmbedTLSCert.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@
4646
#include <mbedtls/ecp.h>
4747
#endif // (MBEDTLS_VERSION_NUMBER >= 0x04000000)
4848

49-
#include <mbedtls/x509_csr.h>
50-
5149
#if CHIP_CRYPTO_USE_X509
5250
#include <mbedtls/x509_crt.h>
5351
#endif // CHIP_CRYPTO_USE_X509

0 commit comments

Comments
 (0)