1
0
mirror of https://git.code.sf.net/p/linux-ima/ima-evm-utils synced 2025-04-27 22:32:31 +02:00

evmctl: use the pkcs11 engine for pkcs11: prefixed URIs

If the key has the pkcs11: URI prefix then setup the pkcs11 engine
if the user hasn't chosen a specific engine already.

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
This commit is contained in:
Stefan Berger 2021-09-13 18:18:09 -04:00 committed by Mimi Zohar
parent 1de1e3c8ce
commit 3b32acbc7d

View File

@ -2836,6 +2836,14 @@ int main(int argc, char *argv[])
if (!imaevm_params.keypass)
imaevm_params.keypass = getenv("EVMCTL_KEY_PASSWORD");
if (imaevm_params.keyfile != NULL &&
imaevm_params.eng == NULL &&
!strncmp(imaevm_params.keyfile, "pkcs11:", 7)) {
imaevm_params.eng = setup_engine("pkcs11");
if (!imaevm_params.eng)
goto error;
}
if (argv[optind] == NULL)
usage();
else