From 5163a823f9d59e9d7824871090611440d099a587 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Ter=C3=A4s?= Date: Tue, 5 Sep 2023 14:37:58 +0300 Subject: [PATCH 1/2] Fix p11prov_common_gen_init debug log entry MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Timo Teräs --- src/keymgmt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/keymgmt.c b/src/keymgmt.c index cf44ff40..af3ffebd 100644 --- a/src/keymgmt.c +++ b/src/keymgmt.c @@ -139,7 +139,7 @@ static void *p11prov_common_gen_init(void *provctx, int selection, unsigned char def_e[] = { 0x01, 0x00, 0x01 }; int ret; - P11PROV_debug("rsa gen_init %p", provctx); + P11PROV_debug("common gen_init %p", provctx); ret = p11prov_ctx_status(provctx); if (ret != CKR_OK) { From 7fe5ddb75ea89bf3c6193492e4979ec892b69975 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Ter=C3=A4s?= Date: Tue, 5 Sep 2023 14:38:32 +0300 Subject: [PATCH 2/2] Fix EC private key generation template size MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Timo Teräs --- src/keymgmt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/keymgmt.c b/src/keymgmt.c index af3ffebd..9f0ebda7 100644 --- a/src/keymgmt.c +++ b/src/keymgmt.c @@ -1154,7 +1154,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 6 +#define EC_PRIVKEY_TMPL_SIZE 5 CK_ATTRIBUTE privkey_template[EC_PRIVKEY_TMPL_SIZE + COMMON_TMPL_SIZE] = { { CKA_TOKEN, DISCARD_CONST(&val_true), sizeof(CK_BBOOL) }, { CKA_PRIVATE, DISCARD_CONST(&val_true), sizeof(CK_BBOOL) },