*
* @pre User is already logged in and the user key is already loaded into memory in plain text form.
*
- * @see ckmc_remove_key()
+ * @see ckmc_remove_alias()
* @see ckmc_get_key()
* @see ckmc_get_key_alias_list()
* @see #ckmc_key_s
int ckmc_save_key(const char *alias, const ckmc_key_s key, const ckmc_policy_s policy);
/**
+ * @deprecated Deprecated since 2.4. [Use ckmc_remove_alias() instead]
* @brief Removes a key from key manager.
*
* @since_tizen 2.3
* @pre User is already logged in and the user key is already loaded into memory in plain text form.
*
* @see ckmc_save_key()
- * @see ckmc_remove_key()
+ * @see ckmc_remove_alias()
* @see ckmc_get_key_alias_list()
*/
int ckmc_get_key(const char *alias, const char *password, ckmc_key_s **ppkey);
* @pre User is already logged in and the user key is already loaded into memory in plain text form.
*
* @see ckmc_save_key()
- * @see ckmc_remove_key()
+ * @see ckmc_remove_alias()
* @see ckmc_get_key()
*/
int ckmc_get_key_alias_list(ckmc_alias_list_s** ppalias_list);
*
* @pre User is already logged in and the user key is already loaded into memory in plain text form.
*
- * @see ckmc_remove_cert()
+ * @see ckmc_remove_alias()
* @see ckmc_get_cert()
* @see ckmc_get_cert_alias_list()
* @see #ckmc_cert_s
int ckmc_save_cert(const char *alias, const ckmc_cert_s cert, const ckmc_policy_s policy);
/**
+ * @deprecated Deprecated since 2.4. [Use ckmc_remove_alias() instead]
* @brief Removes a certificate from key manager.
*
* @since_tizen 2.3
* @pre User is already logged in and the user key is already loaded into memory in plain text form.
*
* @see ckmc_save_cert()
- * @see ckmc_remove_cert()
+ * @see ckmc_remove_alias()
* @see ckmc_get_cert_alias_list()
*/
int ckmc_get_cert(const char *alias, const char *password, ckmc_cert_s **ppcert);
* @pre User is already logged in and the user key is already loaded into memory in plain text form.
*
* @see ckmc_save_cert()
- * @see ckmc_remove_cert()
+ * @see ckmc_remove_alias()
* @see ckmc_get_cert()
*/
int ckmc_get_cert_alias_list(ckmc_alias_list_s** ppalias_list);
* @brief Stores PKCS12's contents inside key manager based on the provided policies.
* All items from the PKCS12 will use the same alias.
*
- * @since_tizen 2.3
+ * @since_tizen 2.4
* @privlevel public
* @privilege %http://tizen.org/privilege/keymanager
*
*
* @pre User is already logged in and the user key is already loaded into memory in plain text form.
*
- * @see ckmc_remove_pkcs12()
+ * @see ckmc_remove_alias()
* @see ckmc_get_pkcs12()
* @see ckmc_get_data_alias_list()
- * @see ckmc_load_from_pkcs12_file2()
+ * @see ckmc_pkcs12_load()
* @see #ckmc_pkcs12_s
* @see #ckmc_policy_s
*/
const ckmc_policy_s cert_policy);
/**
+ * @deprecated Deprecated since 2.4. [Use ckmc_remove_alias() instead]
* @brief Removes all PKCS12 contents from key manager.
*
- * @since_tizen 2.3
+ * @since_tizen 2.4
* @privlevel public
* @privilege %http://tizen.org/privilege/keymanager
*
*
* @pre User is already logged in and the user key is already loaded into memory in plain text form.
*
+ * @see ckmc_remove_alias()
* @see ckmc_save_pkcs12()
* @see ckmc_get_pkcs12()
*/
/**
* @brief Gets a pkcs12 from key manager.
*
- * @since_tizen 2.3
+ * @since_tizen 2.4
* @privlevel public
* @privilege %http://tizen.org/privilege/keymanager
*
* longer needed.
*
* @param[in] alias The name of a data to retrieve
- * @param[in] keyPassword Password that was used to encrypt privateKey (may be NULL)
- * @param[in] certPassword Password used to encrypt certificates (may be NULL)
+ * @param[in] key_password Password that was used to encrypt privateKey (may be NULL)
+ * @param[in] cert_password Password used to encrypt certificates (may be NULL)
* @param[out] pkcs12 The pointer to a newly created ckmc_pkcs12_s handle
*
* @return @c 0 on success,
* @pre User is already logged in and the user key is already loaded into memory in plain text form.
*
* @see ckmc_save_pkcs12()
- * @see ckmc_remove_pkcs12()
+ * @see ckmc_remove_alias()
*/
-int ckmc_get_pkcs12(const char *alias, const char *keyPassword, const char *certPassword, ckmc_pkcs12_s **pkcs12);
+int ckmc_get_pkcs12(const char *alias, const char *key_password, const char *cert_password, ckmc_pkcs12_s **pkcs12);
/**
* @brief Stores a data inside key manager based on the provided policy.
*
* @pre User is already logged in and the user key is already loaded into memory in plain text form.
*
- * @see ckmc_remove_data()
+ * @see ckmc_remove_alias()
* @see ckmc_get_data()
* @see ckmc_get_data_alias_list()
* @see #ckmc_raw_buffer_s
int ckmc_save_data(const char *alias, ckmc_raw_buffer_s data, const ckmc_policy_s policy);
/**
+ * @deprecated Deprecated since 2.4. [Use ckmc_remove_alias() instead]
* @brief Removes a data from key manager.
*
* @since_tizen 2.3
* @pre User is already logged in and the user key is already loaded into memory in plain text form.
*
* @see ckmc_save_data()
- * @see ckmc_remove_data()
+ * @see ckmc_remove_alias()
* @see ckmc_get_data_alias_list()
*/
int ckmc_get_data(const char *alias, const char *password, ckmc_raw_buffer_s **ppdata);
* @pre User is already logged in and the user key is already loaded into memory in plain text form.
*
* @see ckmc_save_data()
- * @see ckmc_remove_data()
+ * @see ckmc_remove_alias()
* @see ckmc_get_data()
*/
int ckmc_get_data_alias_list(ckmc_alias_list_s** ppalias_list);
const ckmc_rsa_padding_algo_e padding);
/**
- * @deprecated, see ckmc_get_certificate_chain()
* @brief Verifies a certificate chain and returns that chain.
*
* @since_tizen 2.3
ckmc_cert_list_s **ppcert_chain_list);
/**
- * @deprecated, see ckmc_get_certificate_chain_with_alias()
* @brief Verifies a certificate chain using an alias list of untrusted certificates and return that
* chain.
*
*
* @pre User is already logged in and the user key is already loaded into memory in plain text form.
*
- * @see ckmc_get_cert_chain())
+ * @see ckmc_get_cert_chain()
* @see ckmc_cert_list_all_free()
*/
int ckmc_get_cert_chain_with_alias(const ckmc_cert_s *cert,
* @brief Verifies a certificate chain and returns that chain using user entered trusted and
* untrusted CA certificates
*
- * @since_tizen 3.0
+ * @since_tizen 2.4
* @privlevel public
* @privilege %http://tizen.org/privilege/keymanager
*
*
* @pre User is already logged in and the user key is already loaded into memory in plain text form.
*
- * @see ckmc_get_cert_chain_with_alias())
+ * @see ckmc_get_cert_chain_with_trustedcert_alias()
* @see ckmc_cert_list_all_free()
*/
-int ckmc_get_certificate_chain(const ckmc_cert_s *cert,
- const ckmc_cert_list_s *untrustedcerts,
- const ckmc_cert_list_s *trustedcerts,
- const bool use_trustedsystemcerts,
- ckmc_cert_list_s **ppcert_chain_list);
+int ckmc_get_cert_chain_with_trustedcert(const ckmc_cert_s *cert,
+ const ckmc_cert_list_s *untrustedcerts,
+ const ckmc_cert_list_s *trustedcerts,
+ const bool use_trustedsystemcerts,
+ ckmc_cert_list_s **ppcert_chain_list);
/**
* @brief Verifies a certificate chain and returns that chain using alias lists of untrusted and
* trusted certificates
*
- * @since_tizen 3.0
+ * @since_tizen 2.4
* @privlevel public
* @privilege %http://tizen.org/privilege/keymanager
*
*
* @pre User is already logged in and the user key is already loaded into memory in plain text form.
*
- * @see ckmc_get_cert_chain())
+ * @see ckmc_get_cert_chain_with_trustedcert()
* @see ckmc_cert_list_all_free()
*/
-int ckmc_get_certificate_chain_with_alias(const ckmc_cert_s *cert,
- const ckmc_alias_list_s *untrustedcerts,
- const ckmc_alias_list_s *trustedcerts,
- const bool use_trustedsystemcerts,
- ckmc_cert_list_s **ppcert_chain_list);
+int ckmc_get_cert_chain_with_trustedcert_alias(const ckmc_cert_s *cert,
+ const ckmc_alias_list_s *untrustedcerts,
+ const ckmc_alias_list_s *trustedcerts,
+ const bool use_trustedsystemcerts,
+ ckmc_cert_list_s **ppcert_chain_list);
/**
* @brief Perform OCSP which checks certificate is whether revoked or not
*
- * @since_tizen 3.0
+ * @since_tizen 2.4
* @privlevel public
* @privilege %http://tizen.org/privilege/keymanager
*
int ckmc_ocsp_check(const ckmc_cert_list_s *pcert_chain_list, ckmc_ocsp_status_e *ocsp_status);
/**
- * @deprecated, see ckmc_set_permission()
+ * @deprecated Deprecated since 2.4. [Use ckmc_set_permission() instead]
* @brief Allows another application to access client's application data
*
* @since_tizen 2.3
/**
* @brief Allows another application to access client's application data
*
- * @since_tizen 3.0
+ * @since_tizen 2.4
* @privlevel public
* @privilege %http://tizen.org/privilege/keymanager
*
int ckmc_set_permission(const char *alias, const char *accessor, int permissions);
/**
- * @deprecated, see ckmc_set_permission()
+ * @deprecated Deprecated since 2.4. [Use ckmc_set_permission() instead]
* @brief Revokes another application's access to client's application data
*
* @since_tizen 2.3
/**
* @brief Removes a an entry (no matter of type) from the key manager.
*
- * @since_tizen 3.0
+ * @since_tizen 2.4
* @privlevel public
* @privilege %http://tizen.org/privilege/keymanager
*
} ckmc_rsa_padding_algo_e;
/**
- * @deprecated, use ckmc_permission_e instead
+ * @deprecated Deprecated since 2.4. [Use ckmc_permission_e() instead]
* @brief Enumeration for database access rights.
* @since_tizen 2.3
*/
/**
* @brief Enumeration for permissions to access/modify alias.
- * @since_tizen 3.0
+ * @since_tizen 2.4
*/
typedef enum __ckmc_permission{
CKMC_PERMISSION_NONE = 0x00, /**< clear permissions */
/**
* @brief Enumeration for OCSP status.
- * @since_tizen 3.0
+ * @since_tizen 2.4
*/
typedef enum __ckmc_ocsp_status {
CKMC_OCSP_STATUS_GOOD = 0, /**< OCSP status is good */
/**
* @brief The structure for PKCS12 used in key manager CAPI.
- * @since_tizen 2.3
+ * @since_tizen 2.4
*/
typedef struct __ckmc_pkcs12 {
ckmc_key_s *priv_key; /**< private key, may be null */
int ckmc_load_cert_from_file(const char *file_path, ckmc_cert_s **cert);
/**
+ * @internal
* @brief Creates a new @a ckmc_pkcs12_s handle and returns it.
*
- * @since_tizen 2.3
+ * @since_tizen 2.4
*
* @remarks You must destroy the newly created @a ckmc_pkcs12_s by calling ckmc_pkcs12_free() if it
* is no longer needed.
*
* @see ckmc_pkcs12_free()
* @see ckmc_load_from_pkcs12_file()
- * @see ckmc_load_from_pkcs12_file2()
+ * @see ckmc_pkcs12_load()
* @see #ckmc_key_s
* @see #ckmc_cert_s
* @see #ckmc_cert_list_s
ckmc_pkcs12_s **pkcs12_bundle);
/**
- * @deprecated, use @a ckmc_load_from_pkcs12_file2() instead
+ * @deprecated Deprecated since 2.4. [Use ckmc_pkcs12_load() instead]
* @brief Creates a new @a ckmc_key_s(private key), @a ckmc_cert_s(certificate), and
* @a ckmc_cert_list_s(CA certificates) handle from a given PKCS#12 file and returns them.
*
* @retval #CKMC_ERROR_FILE_ACCESS_DENIED Provided file does not exist or cannot be accessed
*
* @see ckmc_pkcs12_new()
- * @see ckmc_load_from_pkcs12_file2()
+ * @see ckmc_pkcs12_load()
* @see ckmc_key_free()
* @see ckmc_cert_free()
* @see ckmc_cert_list_all_free()
/**
* @brief Creates a new @a ckmc_pkcs12_s handle from a given PKCS#12 file and returns it.
*
- * @since_tizen 2.3
+ * @since_tizen 2.4
*
* @remarks You must destroy the newly created @a ckmc_pkcs12_s by calling ckmc_pkcs12_free() if
* they are no longer needed.
* @see ckmc_pkcs12_free()
* @see #ckmc_pkcs12_s
*/
-int ckmc_load_from_pkcs12_file2(const char *file_path,
+int ckmc_pkcs12_load(const char *file_path,
const char *passphrase,
ckmc_pkcs12_s **pkcs12_bundle);
/**
* @brief Destroys the @a ckmc_pkcs12_s handle and releases all its resources.
*
- * @since_tizen 2.3
+ * @since_tizen 2.4
*
* @param[in] pkcs12 The @a ckmc_pkcs12_s handle to destroy
*
* @see ckmc_pkcs12_new()
- * @see ckmc_load_from_pkcs12_file2()
+ * @see ckmc_pkcs12_load()
*/
void ckmc_pkcs12_free(ckmc_pkcs12_s *pkcs12);
}
KEY_MANAGER_CAPI
-int ckmc_get_pkcs12(const char *alias, const char *keyPassword, const char *certPassword, ckmc_pkcs12_s **pkcs12)
+int ckmc_get_pkcs12(const char *alias, const char *key_password, const char *cert_password, ckmc_pkcs12_s **pkcs12)
{
int ret;
CKM::PKCS12ShPtr pkcs;
return CKMC_ERROR_INVALID_PARAMETER;
}
- if (keyPassword)
- keyPass = keyPassword;
+ if (key_password)
+ keyPass = key_password;
- if (certPassword)
- certPass = certPassword;
+ if (cert_password)
+ certPass = cert_password;
auto mgr = CKM::Manager::create();
}
KEY_MANAGER_CAPI
-int ckmc_get_certificate_chain(const ckmc_cert_s* cert,
- const ckmc_cert_list_s* untrustedcerts,
- const ckmc_cert_list_s* trustedcerts,
- const bool sys_certs,
- ckmc_cert_list_s** ppcert_chain_list)
+int ckmc_get_cert_chain_with_trustedcert(const ckmc_cert_s* cert,
+ const ckmc_cert_list_s* untrustedcerts,
+ const ckmc_cert_list_s* trustedcerts,
+ const bool sys_certs,
+ ckmc_cert_list_s** ppcert_chain_list)
{
int ret;
CKM::ManagerShPtr mgr = CKM::Manager::create();
}
KEY_MANAGER_CAPI
-int ckmc_get_certificate_chain_with_alias(const ckmc_cert_s* cert,
- const ckmc_alias_list_s* untrustedcerts,
- const ckmc_alias_list_s* trustedcerts,
- const bool sys_certs,
- ckmc_cert_list_s** ppcert_chain_list)
+int ckmc_get_cert_chain_with_trustedcert_alias(const ckmc_cert_s* cert,
+ const ckmc_alias_list_s* untrustedcerts,
+ const ckmc_alias_list_s* trustedcerts,
+ const bool sys_certs,
+ ckmc_cert_list_s** ppcert_chain_list)
{
int ret;
CKM::ManagerShPtr mgr = CKM::Manager::create();