Infineon / amazon-freertos

IoT operating system for microcontrollers. https://aws.amazon.com/freertos/
MIT License
10 stars 10 forks source link

C_FindObjects return error if object not found #20

Open spalishchuk opened 3 years ago

spalishchuk commented 3 years ago

In case object not found, function returns xResult = CKR_FUNCTION_FAILED. But it's normal, if seached object not found, in that case must returns CKR_OK and *pulObjectCount = 0.

ayushev commented 3 years ago

@spalishchuk Thanks for the issue. About which code snippet and repository are you talking here? Is it the https://github.com/Infineon/amazon-freertos ?

spalishchuk commented 3 years ago

Yes, https://github.com/Infineon/amazon-freertos/tree/feature/trustm/vendors/infineon/boards/xmc4800_plus_optiga_trust_m Branch feature/trustm

spalishchuk commented 3 years ago

https://github.com/Infineon/amazon-freertos/blob/feature/trustm/vendors/infineon/secure_elements/pkcs11/iot_pkcs11_trustm.c line 2511

ayushev commented 3 years ago

Thanks! It seems like you are right! I need to run the pkcs11 test and IDT to verify whether the fix will still work with the bundle. So this will become part of the next version.