Subsections

Key manipulation functions

These functions allow to store and retrieve keys that are not related to any certificate. They manipulate in-memory keys; in order to import and export such keys, refer to Section 5.

CST_append_priv_key

int CST_append_priv_key (CST * st, X509_NAME * account, EVP_PKEY * key, unsigned char * password)

Append private key to storage
Parameters

Returns

Errors

CST_append_pub_key

int CST_append_pub_key (CST * st, X509_NAME * account, EVP_PKEY * key)

Append public key to storage
Parameters

Returns

Errors

CST_get_key_account

X509_NAME* CST_get_key_account (CST * st, cst_t_seqnum keyID)

Get account assigned with key
Parameters

Returns

Errors

CST_delete_all_pub_key

int CST_delete_all_pub_key (CST * st, X509_NAME * account)

Delete all public key for account
Parameters

Returns

Errors

CST_delete_all_priv_key

int CST_delete_all_priv_key (CST * st, X509_NAME * account)

Delete all private key for account
Parameters

Returns

Errors

CST_delete_pub_key

int CST_delete_pub_key (CST * st, const cst_t_seqnum keyID)

Delete public key form storage
Parameters

Returns

Errors

CST_delete_priv_key

int CST_delete_priv_key (CST * st, const cst_t_seqnum keyID)

Delete private key form storage
Parameters

Returns

Errors

CST_priv_key_search_by_name

GSList* CST_priv_key_search_by_name (CST * st, X509_NAME * account)

Get all private keys for a given account.
Parameters

Returns

Errors

CST_pub_key_search_by_name

GSList* CST_pub_key_search_by_name (CST * st, X509_NAME * account)

Get all public keys for a given account.
Parameters

Returns

Errors

CST_EVP_PKEY_to_text

char* CST_EVP_PKEY_to_text (EVP_PKEY * key)

Convert key to human-readable text format
Parameters

Returns

CST_get_key

EVP_PKEY* CST_get_key (CST * st, const cst_t_seqnum keyID, unsigned char * password)

Get private key by storage ID.
Parameters

Returns

Errors

CST_get_pub_key

EVP_PKEY* CST_get_pub_key (CST * st, const cst_t_seqnum keyID)

Get public key EVP_PKEY by keyID
Parameters

Returns

Errors

Elvis Pfutzenreuter 2006-02-17