@@ -628,8 +628,6 @@ int SE05XClass::writeAESKey(int objectId, const byte data[], size_t length)
628
628
{
629
629
smStatus_t status;
630
630
SE05x_Result_t result;
631
- uint16_t offset = 0 ;
632
- uint16_t size;
633
631
634
632
status = Se05x_API_CheckObjectExists (&_se05x_session, objectId, &result);
635
633
if (status != SM_OK) {
@@ -642,9 +640,7 @@ int SE05XClass::writeAESKey(int objectId, const byte data[], size_t length)
642
640
return 0 ;
643
641
}
644
642
645
- uint16_t left = length;
646
-
647
- status = Se05x_API_WriteSymmKey (&_se05x_session, NULL , 3 , objectId, NULL , data, length, kSE05x_INS_NA , kSE05x_SymmKeyType_AES );
643
+ status = Se05x_API_WriteSymmKey (&_se05x_session, NULL , 3 , objectId, SE05x_KeyID_KEK_NONE, data, length, kSE05x_INS_NA , kSE05x_SymmKeyType_AES );
648
644
649
645
if (status != SM_OK) {
650
646
SMLOG_E (" Error in Se05x_API_WriteSymmKey \n " );
@@ -657,9 +653,6 @@ int SE05XClass::writeHMACKey(int objectId, const byte data[], size_t length)
657
653
{
658
654
smStatus_t status;
659
655
SE05x_Result_t result;
660
- uint8_t exists = 0 ;
661
- uint16_t offset = 0 ;
662
- uint16_t size;
663
656
664
657
status = Se05x_API_CheckObjectExists (&_se05x_session, objectId, &result);
665
658
if (status != SM_OK) {
@@ -669,7 +662,6 @@ int SE05XClass::writeHMACKey(int objectId, const byte data[], size_t length)
669
662
670
663
if (result == kSE05x_Result_SUCCESS ) {
671
664
SMLOG_E (" Object exists \n " );
672
- exists = 1 ;
673
665
}
674
666
675
667
status = Se05x_API_WriteSymmKey (&_se05x_session, NULL , 0 , objectId, SE05x_KeyID_KEK_NONE, data, length, kSE05x_INS_NA , kSE05x_SymmKeyType_HMAC );
0 commit comments