Skip to content

Commit 5327952

Browse files
committed
Minor bug fixes.
1 parent 773f5bd commit 5327952

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/platform/Infineon/crypto/trustm/CHIPCryptoPALHsm_P256_trustm.cpp

+3-6
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,6 @@ P256Keypair::~P256Keypair()
9595
{
9696
Clear();
9797
}
98-
else
99-
{
100-
}
10198
}
10299

103100
CHIP_ERROR P256Keypair::Initialize(ECPKeyTarget key_target)
@@ -124,11 +121,11 @@ CHIP_ERROR P256Keypair::Initialize(ECPKeyTarget key_target)
124121
else
125122
{
126123
#if !ENABLE_TRUSTM_NOC_KEYGEN
127-
if (CHIP_NO_ERROR == Initialize_H(this, &mPublicKey, &mKeypair))
124+
error = Initialize_H(this, &mPublicKey, &mKeypair);
125+
if (CHIP_NO_ERROR == error)
128126
{
129127
mInitialized = true;
130128
}
131-
error = CHIP_NO_ERROR;
132129
return error;
133130
#else
134131
// Add the logic to use different keyid
@@ -199,7 +196,7 @@ CHIP_ERROR P256Keypair::ECDSA_sign_msg(const uint8_t * msg, size_t msg_length, P
199196
{
200197
#if !ENABLE_TRUSTM_NOC_KEYGEN
201198
// Use the mbedtls based method
202-
printf("ECDSA sing msg mbedtls\n");
199+
ChipLogDetail(Crypto, "ECDSA sing msg mbedtls");
203200
return ECDSA_sign_msg_H(&mKeypair, msg, msg_length, out_signature);
204201
#else
205202
if (keyid == OPTIGA_KEY_ID_E0F2)

0 commit comments

Comments
 (0)