Searched hist:"5440719 db58fae341de9079fc7ce556f7662de8b" (Results 1 – 1 of 1) sorted by relevance
| /optee_os/ta/pkcs11/src/ |
| H A D | sanitize_object.c | 5440719db58fae341de9079fc7ce556f7662de8b Fri Dec 11 10:25:07 UTC 2020 Ruchika Gupta <ruchika.gupta@linaro.org> ta: pkcs11: Temporary workaround in sanitize_indirect_attr()
Since the type of key to be generated is implicit in the key generation mechanism, the template does not need to supply a key type or class. (CKA_CLASS and CKA_KEY_TYPE attributes). sanitize_indirect_attr() expects these attributes to be available else gives an error.
The right way of handling this would be perhaps passing a hint of the class and key type to this function if key is being generated using key generated mechanisms. However, we don't have support for wrap/derive key which uses the indirect attributes at present in the code. So, we would not be able to test it. For now, just move the class checking afer the attribute checking which helps avoid this error.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Ruchika Gupta <ruchika.gupta@linaro.org>
|