Skip to content

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

Description

@shrikant1407

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions