Skip to content

Commit b200c42

Browse files
fix: corrected parameter of mbedtls_aes_crypt_ecb in _decryptBuffer
1 parent 66c9c0b commit b200c42

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libraries/Update/src/Updater.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ bool UpdateClass::_decryptBuffer() {
328328
return false;
329329
}
330330
}
331-
if (mbedtls_aes_crypt_ecb(&ctx, MBEDTLS_AES_ENCRYPT, _cryptBuffer, _cryptBuffer)) { //use MBEDTLS_AES_ENCRYPT to decrypt flash code
331+
if (mbedtls_aes_crypt_ecb(&ctx, MBEDTLS_AES_DECRYPT, _cryptBuffer, _cryptBuffer)) { //use MBEDTLS_AES_DECRYPT to decrypt flash code
332332
return false;
333333
}
334334
for (int i = 0; i < ENCRYPTED_BLOCK_SIZE; i++) {

0 commit comments

Comments
 (0)