What is the expected behaviour of `C_wrapKey` API if wrapping key is not provided?

222 Views Asked by At

In the library that I have developer passes source key and CK_INVALID_HANDLE (instead of wrapping key) to C_wrapKey API and in return I get success.

I doubt this behaviour. Is this the correct return code?

1

There are 1 best solutions below

1
On

If you mean that C_WrapKey receives an invalid value for hWrappingKey parameter, then it should return CKR_WRAPPING_KEY_HANDLE_INVALID.