29#ifndef DEFAULT_CONNECTOR_URL
30#define DEFAULT_CONNECTOR_URL "http://127.0.0.1:12345"
45 const char *connector_url;
47 connector_url = getenv(
"DEFAULT_CONNECTOR_URL");
48 if (connector_url == NULL) {
72 printf(
"Successfully established session %02d using Authentication Key "
91 printf(
"Imported Authentication Key with ID %04x and password \"%s\"\n",
98 printf(
"Unable to change Authentication Key with ID %04x from this session\n",
107 printf(
"Closed session %02d\n", session_id);
119 printf(
"Successfully established session %02d using Authentication Key "
127 printf(
"Successfully changed Authentication Key with ID %04x to password "
137 printf(
"Closed session %02d\n", session_id);
143 printf(
"Unable to open session with Authentication Key %04x and password "
160 printf(
"Successfully established session %02d using Authentcation Key %04x "
161 "and password \"%s\"\n",
const uint8_t password2[]
#define DEFAULT_CONNECTOR_URL
const uint8_t password1[]
const uint8_t password3[]
CK_SESSION_HANDLE session
Capabilities representation.
yh_rc yh_destroy_session(yh_session **session)
yh_rc yh_create_session_derived(yh_connector *connector, uint16_t authkey_id, const uint8_t *password, size_t password_len, bool recreate, yh_session **session)
yh_rc yh_util_close_session(yh_session *session)
yh_rc yh_authenticate_session(yh_session *session)
yh_rc yh_util_import_authentication_key_derived(yh_session *session, uint16_t *key_id, const char *label, uint16_t domains, const yh_capabilities *capabilities, const yh_capabilities *delegated_capabilities, const uint8_t *password, size_t password_len)
yh_rc yh_util_change_authentication_key_derived(yh_session *session, uint16_t *key_id, const uint8_t *password, size_t password_len)
yh_rc yh_string_to_domains(const char *domains, uint16_t *result)
yh_rc yh_init_connector(const char *url, yh_connector **connector)
yh_rc yh_connect(yh_connector *connector, int timeout)
yh_rc yh_string_to_capabilities(const char *capability, yh_capabilities *result)
yh_rc yh_disconnect(yh_connector *connector)
yh_rc yh_get_session_id(yh_session *session, uint8_t *sid)
@ YHR_GENERIC_ERROR
Return value when encountering an unknown error.
@ YHR_SUCCESS
Returned value when function was successful.
@ YHR_DEVICE_INVALID_ID
Return value when an invalid Object ID is used.
@ YHR_CRYPTOGRAM_MISMATCH
Returned value when failing to verify cryptogram.
yh_capabilities capabilities