From b8d83bb15e4364b169920d1cf262ac8475673d27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Trojnara?= Date: Thu, 4 Aug 2022 11:56:57 +0200 Subject: [PATCH] fix the hardcoded "pkcs11" engine id Use the `-pkcs11engine` value if available for the engine id instead of the hardcoded `pkcs11` string. This should address #152. --- osslsigncode.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/osslsigncode.c b/osslsigncode.c index 4afa9b5..8f92310 100644 --- a/osslsigncode.c +++ b/osslsigncode.c @@ -5163,7 +5163,8 @@ static ENGINE *dynamic_engine(GLOBAL_OPTIONS *options) return NULL; /* FAILED */ } if (!ENGINE_ctrl_cmd_string(engine, "SO_PATH", options->p11engine, 0) - || !ENGINE_ctrl_cmd_string(engine, "ID", "pkcs11", 0) + || !ENGINE_ctrl_cmd_string(engine, "ID", + options->p11engine ? options->p11engine : "pkcs11", 0) || !ENGINE_ctrl_cmd_string(engine, "LIST_ADD", "1", 0) || !ENGINE_ctrl_cmd_string(engine, "LOAD", NULL, 0)) { printf("Failed to set 'dynamic' engine\n");