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