Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TPM engine couldn't load when loading the tpm engine more than once with 1.2.0 version of TPM2-TSS-ENGINE #270

Open
shrikant1407 opened this issue Mar 29, 2023 · 1 comment

Comments

@shrikant1407
Copy link

we are trying to load the TPM engine using OpenSSL API as follows:

ENGINE_load_dynamic();
engine = ENGINE_by_id("dynamic");
if (engine == NULL) {
	LOG(LOG_ERROR, "Could not find external engine.\n");
	goto error;
}

if (!ENGINE_ctrl_cmd_string(engine, "SO_PATH", TPM2_TSS_ENGINE_SO_PATH,
				    0)) {
	LOG(LOG_ERROR, "Could not set TPM Engine path.\n");
	goto error;
}

if (!ENGINE_ctrl_cmd_string(engine, "LOAD", NULL, 0)) {
	LOG(LOG_ERROR, "Could not load TPM engine.\n");
	goto error;
}

The flow for loading such an engine is triggered by ENGINE_ctrl_cmd_string(engine, "SO_PATH", TPM2_TSS_ENGINE_SO_PATH, 0), and when using a dynamic path it will dynamically load the engine's .sofile. Our application needs to load the TPM engine more than once but it's not able to load at the second instance. The same configuration was working with 1.1.0 version of TPM2-TSS-ENGINE

@AndreasFuchsTPM
Copy link
Member

Could you provide me with a complete snippet that we can add to the tests ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants