Skip to content

Commit 89eca38

Browse files
committed
Apply restyled patch
1 parent 1f89f15 commit 89eca38

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ CHIP_ERROR HKDF_sha::HKDF_SHA256(const uint8_t * secret, const size_t secret_len
6767

6868
// Trust M init
6969
trustm_Open();
70-
70+
7171
// Write the secret key
7272
write_data(TRUSTM_HKDF_OID_KEY, secret, secret_length_u16);
7373

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,7 @@ CHIP_ERROR P256Keypair::NewCertificateSigningRequest(uint8_t * csr, size_t & csr
590590
trustm_close();
591591
}
592592
return error;
593-
593+
594594
#endif
595595
}
596596

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

+12-12
Original file line numberDiff line numberDiff line change
@@ -149,20 +149,20 @@ void trustm_Open(void)
149149
return_status = optiga_util_open_application(p_local_util, 0); // skip restore
150150
while (optiga_lib_status == OPTIGA_LIB_BUSY)
151151

152-
// Only run once for initialisation
153-
if (init)
154-
{
155-
xResult = optiga_util_write_data(p_local_util, dOptigaOID, OPTIGA_UTIL_WRITE_ONLY, 0, &cCurrentLimit,1);
156-
157-
if (OPTIGA_LIB_SUCCESS != xResult)
152+
// Only run once for initialisation
153+
if (init)
158154
{
159-
break;
155+
xResult = optiga_util_write_data(p_local_util, dOptigaOID, OPTIGA_UTIL_WRITE_ONLY, 0, &cCurrentLimit, 1);
156+
157+
if (OPTIGA_LIB_SUCCESS != xResult)
158+
{
159+
break;
160+
}
161+
while (optiga_lib_status == OPTIGA_LIB_BUSY)
162+
;
163+
// Set init to true
164+
init = true;
160165
}
161-
while (optiga_lib_status == OPTIGA_LIB_BUSY)
162-
;
163-
// Set init to true
164-
init = true;
165-
}
166166

167167
if (OPTIGA_LIB_SUCCESS != return_status)
168168
{

0 commit comments

Comments
 (0)