Tizen Native API
|
Functions | |
void | ckmc_key_free (ckmc_key_s *key) |
Destroys the ckmc_key_s handle and releases all its resources. | |
void | ckmc_buffer_free (ckmc_raw_buffer_s *buffer) |
Destroys the ckmc_raw_buffer_s handle and releases all its resources. | |
void | ckmc_cert_free (ckmc_cert_s *cert) |
Destroys the ckmc_cert handle and releases all its resources. | |
int | ckmc_load_cert_from_file (const char *file_path, ckmc_cert_s **cert) |
Creates a new ckmc_cert_s handle from a given file and returns it. | |
int | ckmc_load_from_pkcs12_file (const char *file_path, const char *passphrase, ckmc_key_s **private_key, ckmc_cert_s **cert, ckmc_cert_list_s **ca_cert_list) |
Creates a new ckmc_key_s(private key), ckmc_cert_s(certificate), and ckmc_cert_list_s(CA certificates) handle from a given PKCS#12 file and returns them. | |
void | ckmc_alias_list_all_free (ckmc_alias_list_s *first) |
Destroys the ckmc_alias_list_s handle and releases all its resources from the provided first handle cascadingly. | |
void | ckmc_cert_list_all_free (ckmc_cert_list_s *first) |
Destroys the ckmc_cert_list_s handle and releases all its resources from the provided first handle cascadingly. | |
Typedefs | |
typedef enum __ckmc_key_type | ckmc_key_type_e |
Enumeration for key types of key manager. | |
typedef enum __ckmc_data_format | ckmc_data_format_e |
Enumeration for data format. | |
typedef enum __ckmc_ec_type | ckmc_ec_type_e |
Enumeration for elliptic curve. | |
typedef enum __ckmc_hash_algo | ckmc_hash_algo_e |
Enumeration for hash algorithm. | |
typedef enum __ckmc_rsa_padding_algo | ckmc_rsa_padding_algo_e |
Enumeration for RSA padding algorithm. | |
typedef enum __ckmc_access_right | ckmc_access_right_e |
Enumeration for database access rights. | |
typedef struct __ckmc_raw_buff | ckmc_raw_buffer_s |
the structure for binary buffer used in key manager CAPI. | |
typedef struct __ckmc_policy | ckmc_policy_s |
The structure for a policy for storing key/certificate/binary data. | |
typedef struct __ckmc_key | ckmc_key_s |
The structure for key used in key manager CAPI. | |
typedef struct __ckmc_cert | ckmc_cert_s |
The structure for certificate used in key manager CAPI. | |
typedef struct __ckmc_alias_list | ckmc_alias_list_s |
The structure for linked list of alias. | |
typedef struct __ckmc_cert_list | ckmc_cert_list_s |
The structure for linked list of ckmc_cert_s. |
It defines data types used in these APIs and provides utility methods handling them.
#include <ckmc/ckmc-type.h>
It defines data types for key, certificate,raw buffer, and linked list used in these APIs. It also provides new and free methods for them.
typedef enum __ckmc_access_right ckmc_access_right_e |
Enumeration for database access rights.
typedef struct __ckmc_alias_list ckmc_alias_list_s |
The structure for linked list of alias.
typedef struct __ckmc_cert_list ckmc_cert_list_s |
The structure for linked list of ckmc_cert_s.
typedef struct __ckmc_cert ckmc_cert_s |
The structure for certificate used in key manager CAPI.
typedef enum __ckmc_data_format ckmc_data_format_e |
Enumeration for data format.
typedef enum __ckmc_ec_type ckmc_ec_type_e |
Enumeration for elliptic curve.
typedef enum __ckmc_hash_algo ckmc_hash_algo_e |
Enumeration for hash algorithm.
typedef struct __ckmc_key ckmc_key_s |
The structure for key used in key manager CAPI.
typedef enum __ckmc_key_type ckmc_key_type_e |
Enumeration for key types of key manager.
typedef struct __ckmc_policy ckmc_policy_s |
The structure for a policy for storing key/certificate/binary data.
typedef struct __ckmc_raw_buff ckmc_raw_buffer_s |
the structure for binary buffer used in key manager CAPI.
typedef enum __ckmc_rsa_padding_algo ckmc_rsa_padding_algo_e |
Enumeration for RSA padding algorithm.
enum __ckmc_access_right |
enum __ckmc_data_format |
enum __ckmc_ec_type |
Enumeration for elliptic curve.
enum __ckmc_hash_algo |
enum __ckmc_key_type |
Enumeration for key types of key manager.
enum key_manager_error_e |
Enumeration for Key Manager Errors.
void ckmc_alias_list_all_free | ( | ckmc_alias_list_s * | first | ) |
Destroys the ckmc_alias_list_s handle and releases all its resources from the provided first handle cascadingly.
[in] | first | The first ckmc_alias_list_s handle to destroy |
void ckmc_buffer_free | ( | ckmc_raw_buffer_s * | buffer | ) |
Destroys the ckmc_raw_buffer_s handle and releases all its resources.
[in] | buffer | The ckmc_raw_buffer_s handle to destroy |
void ckmc_cert_free | ( | ckmc_cert_s * | cert | ) |
Destroys the ckmc_cert handle and releases all its resources.
[in] | cert | The ckmc_cert_s handle to destroy |
void ckmc_cert_list_all_free | ( | ckmc_cert_list_s * | first | ) |
Destroys the ckmc_cert_list_s handle and releases all its resources from the provided first handle cascadingly.
[in] | first | The first ckmc_cert_list_s handle to destroy |
void ckmc_key_free | ( | ckmc_key_s * | key | ) |
Destroys the ckmc_key_s handle and releases all its resources.
[in] | key | The ckmc_key_s handle to destroy |
int ckmc_load_cert_from_file | ( | const char * | file_path, |
ckmc_cert_s ** | cert | ||
) |
Creates a new ckmc_cert_s handle from a given file and returns it.
[in] | file_path | The path of certificate file to be loaded The only DER or PEM encoded certificate file is supported. |
[out] | cert | The pointer of newly created ckmc_cert_s handle |
CKMC_ERROR_NONE | Successful |
CKMC_ERROR_OUT_OF_MEMORY | Not enough memory space |
CKMC_ERROR_INVALID_FORMAT | Invalid certificate file format |
CKMC_ERROR_FILE_ACCESS_DENIED | Provided file does not exist or cannot be accessed |
int ckmc_load_from_pkcs12_file | ( | const char * | file_path, |
const char * | passphrase, | ||
ckmc_key_s ** | private_key, | ||
ckmc_cert_s ** | cert, | ||
ckmc_cert_list_s ** | ca_cert_list | ||
) |
Creates a new ckmc_key_s(private key), ckmc_cert_s(certificate), and ckmc_cert_list_s(CA certificates) handle from a given PKCS#12 file and returns them.
[in] | file_path | The path of PKCS12 file to be loaded |
[in] | passphrase | The passphrase used to decrypt the PCKS12 file If PKCS12 file is not encrypted, passphrase can be null. |
[out] | private_key | The pointer of newly created ckmc_key_s handle for a private key |
[out] | cert | The pointer of newly created ckmc_cert_s handle for a certificate It is null if the PKCS12 file does not contain a certificate. |
[out] | ca_cert_list | The pointer of newly created ckmc_cert_list_s handle for CA certificates It is null if the PKCS12 file does not contain CA certificates. |
CKMC_ERROR_NONE | Successful |
CKMC_ERROR_OUT_OF_MEMORY | Not enough memory space |
CKMC_ERROR_INVALID_FORMAT | Invalid PKCS12 file format |
CKMC_ERROR_FILE_ACCESS_DENIED | Provided file does not exist or cannot be accessed |
char const* const ckmc_label_name_separator |
alias can be provided as an alias alone, or together with label - in this case, separator is used to separate label and alias.