Split the secure element driver method table memory layout

Instead of having one giant table containing all possible methods,
represent a driver's method table as a structure containing pointers
to substructures. This way a driver that doesn't implement a certain
class of operations can use NULL for this class as a whole instead of
storing NULL for each method.
This commit is contained in:
Gilles Peskine 2019-06-26 19:06:52 +02:00
parent f989dbe6d8
commit 6e59c42d1d

View file

@ -980,12 +980,12 @@ typedef struct {
* Use #PSA_DRV_SE_HAL_VERSION.
*/
uint32_t hal_version;
psa_drv_se_key_management_t key_management;
psa_drv_se_mac_t mac;
psa_drv_se_cipher_t cipher;
psa_drv_se_aead_t aead;
psa_drv_se_asymmetric_t asymmetric;
psa_drv_se_key_derivation_t derivation;
const psa_drv_se_key_management_t *key_management;
const psa_drv_se_mac_t *mac;
const psa_drv_se_cipher_t *cipher;
const psa_drv_se_aead_t *aead;
const psa_drv_se_asymmetric_t *asymmetric;
const psa_drv_se_key_derivation_t *derivation;
} psa_drv_se_t;
/** The current version of the secure element driver HAL.