|
CK_RV C_Finalize(CK_VOID_PTR reserved) { |
|
print_log(VERBOSE, "C_Finalize"); |
|
return CKR_OK; |
|
} |
|
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; |
|
} |