From 0c7504e9c4b0754057da31851ff0863183bd7b1f Mon Sep 17 00:00:00 2001 From: Kshitiz Varshney Date: Tue, 3 Sep 2024 08:28:28 +0200 Subject: [PATCH] Increased size of EC_PRIVKEY_TMPL_SIZE This commit updates EC_PRIVKEY_TMPL_SIZE to 6 for accomodating CKA_DERIVE flag. Signed-off-by: Kshitiz Varshney --- src/keymgmt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/keymgmt.c b/src/keymgmt.c index bd2d2143..3fde3004 100644 --- a/src/keymgmt.c +++ b/src/keymgmt.c @@ -1286,7 +1286,7 @@ static void *p11prov_ec_gen(void *genctx, OSSL_CALLBACK *cb_fn, void *cb_arg) { CKA_EC_PARAMS, (CK_BYTE *)ctx->data.ec.ec_params, ctx->data.ec.ec_params_size }, }; -#define EC_PRIVKEY_TMPL_SIZE 5 +#define EC_PRIVKEY_TMPL_SIZE 6 CK_ATTRIBUTE privkey_template[EC_PRIVKEY_TMPL_SIZE + COMMON_TMPL_SIZE] = { { CKA_TOKEN, DISCARD_CONST(&val_true), sizeof(CK_BBOOL) }, { CKA_DERIVE, DISCARD_CONST(&val_true), sizeof(CK_BBOOL) },