irtimmer/tpm2-pk11

main_session never get closed after C_Finalize()

Closed this issue · 1 comments

tpm2-pk11/src/pk11.c

Lines 150 to 153 in f08ab6a

CK_RV C_Finalize(CK_VOID_PTR reserved) {
print_log(VERBOSE, "C_Finalize");
return CKR_OK;
}

tpm2-pk11/src/pk11.c

Lines 278 to 288 in f08ab6a

CK_RV C_Initialize(CK_VOID_PTR pInitArgs) {
print_log(VERBOSE, "C_Initialize");
char configfile_path[256];
snprintf(configfile_path, sizeof(configfile_path), "%s/" TPM2_PK11_CONFIG_DIR "/" TPM2_PK11_CONFIG_FILE, getenv("HOME"));
if (config_load(configfile_path, &pk11_config) < 0)
return CKR_GENERAL_ERROR;
session_init(&main_session, &pk11_config);
log_init(pk11_config.log_file, pk11_config.log_level);
return CKR_OK;
}

Issue have been solved with commit a639761