Add line wrapping and fix formatting in C API
authorKrzysztof Jackiewicz <k.jackiewicz@samsung.com>
Thu, 22 Jan 2015 14:17:12 +0000 (15:17 +0100)
committerMaciej J. Karpiuk <m.karpiuk2@samsung.com>
Tue, 17 Feb 2015 11:02:44 +0000 (12:02 +0100)
[Issue#] N/A
[Feature/Bug] N/A
[Problem] Too long lines. Unreadable API declarations.
[Cause] N/A
[Solution] Lines wrapped to 100 chars. Common function argument wrapping policy.

[Verification] Successfull compilation.

Change-Id: Ic3a9e732dc311662eb8b18640102ecca952e8b5d

src/include/ckmc/ckmc-control.h
src/include/ckmc/ckmc-manager.h
src/include/ckmc/ckmc-type.h

index 61765c9..2e83eca 100644 (file)
@@ -40,13 +40,15 @@ extern "C" {
 
 /**
  * @brief Decrypts a user key(DKEK) with password.
- *        A decrypted user key exists only on memory. If this API is called for the first time, a user key will be generated internally.
+ *        A decrypted user key exists only on memory. If this API is called for the first time, a
+ *        user key will be generated internally.
  *
  * @since_tizen 2.3
  * @privlevel platform
  * @privilege %http://tizen.org/privilege/keymanager.admin
  *
- * @remarks The user key is a randomly generated key used in encrypting user data. And the user key is protected by a user's password.
+ * @remarks The user key is a randomly generated key used in encrypting user data. And the user key
+ *          is protected by a user's password.
  *
  * @param[in] user      The user ID of a user whose key is decrypted
  * @param[in] password  The password used in decrypting a user key
@@ -115,7 +117,8 @@ int ckmc_remove_user_data(uid_t user);
 
 /**
  * @brief Changes a password for a user.
- *        The key manager decrypts a user key (DKEK) with old password and re-encrypts a user key with new password.
+ *        The key manager decrypts a user key (DKEK) with old password and re-encrypts a user key
+ *        with new password.
  *
  * @since_tizen 2.3
  * @privlevel platform
@@ -189,7 +192,8 @@ int ckmc_reset_user_password(uid_t user, const char *new_password);
  *
  * @retval #CKMC_ERROR_NONE                 Successful
  * @retval #CKMC_ERROR_INVALID_PARAMETER    Input parameter is invalid
- * @retval #CKMC_ERROR_DB_LOCKED            A user key is not loaded in memory (a user is not logged in)
+ * @retval #CKMC_ERROR_DB_LOCKED            A user key is not loaded in memory (a user is not logged
+ *                                          in)
  * @retval #CKMC_ERROR_DB_ALIAS_UNKNOWN     Alias does not exist
  * @retval #CKMC_ERROR_PERMISSION_DENIED    Failed to access key manager
  *
@@ -198,7 +202,11 @@ int ckmc_reset_user_password(uid_t user, const char *new_password);
  * @see ckmc_set_permission_by_adm()
  * @see ckmc_set_permission()
  */
-int ckmc_allow_access_by_adm(uid_t user, const char *owner, const char *alias, const char *accessor, ckmc_access_right_e granted);
+int ckmc_allow_access_by_adm(uid_t user,
+                             const char *owner,
+                             const char *alias,
+                             const char *accessor,
+                             ckmc_access_right_e granted);
 
 /**
  * @brief Allows another application to access client's application data
@@ -213,14 +221,16 @@ int ckmc_allow_access_by_adm(uid_t user, const char *owner, const char *alias, c
  * @param[in] user        User ID of a user whose data will be affected
  * @param[in] alias       Data alias for which access will be granted
  * @param[in] accessor    Package id of the application that will gain access rights
- * @param[in] permissions Mask of permissions granted for @a accessor application (@a ckmc_permission_e)
+ * @param[in] permissions Mask of permissions granted for @a accessor application
+ *                        (@a ckmc_permission_e)
  *                        (previous permission mask will be replaced with the new mask value)
  *
  * @return @c 0 on success, otherwise a negative error value
  *
  * @retval #CKMC_ERROR_NONE                 Successful
  * @retval #CKMC_ERROR_INVALID_PARAMETER    Input parameter is invalid
- * @retval #CKMC_ERROR_DB_LOCKED            A user key is not loaded in memory (a user is not logged in)
+ * @retval #CKMC_ERROR_DB_LOCKED            A user key is not loaded in memory (a user is not logged
+ *                                          in)
  * @retval #CKMC_ERROR_DB_ALIAS_UNKNOWN     Alias does not exist
  * @retval #CKMC_ERROR_PERMISSION_DENIED    Failed to access key manager
  *
@@ -252,7 +262,8 @@ int ckmc_set_permission_by_adm(uid_t user, const char *alias, const char *access
  * @retval #CKMC_ERROR_NONE                 Successful
  * @retval #CKMC_ERROR_INVALID_PARAMETER    Input parameter is invalid or the @a accessor doesn't
  *                                          have access to @a alias
- * @retval #CKMC_ERROR_DB_LOCKED            A user key is not loaded in memory (a user is not logged in)
+ * @retval #CKMC_ERROR_DB_LOCKED            A user key is not loaded in memory (a user is not logged
+ *                                          in)
  * @retval #CKMC_ERROR_DB_ALIAS_UNKNOWN     Alias does not exist
  * @retval #CKMC_ERROR_PERMISSION_DENIED    Failed to access key manager
  *
index fc24a94..3703495 100644 (file)
@@ -16,7 +16,8 @@
  *
  * @file        ckmc-manager.h
  * @version     1.0
- * @brief       Provides management functions(storing, retrieving, and removing) for keys, certificates and data of a user and additional crypto functions.
+ * @brief       Provides management functions(storing, retrieving, and removing) for keys,
+ *              certificates and data of a user and additional crypto functions.
  */
 
 
@@ -46,10 +47,15 @@ extern "C" {
  * @privlevel public
  * @privilege %http://tizen.org/privilege/keymanager
  *
- * @remarks Currently only six types of keys are supported for this API. These are RSA public/private key, DSA public/private key and ECDSA public/private key.
- * @remarks key_type in key may be set to #CKMC_KEY_NONE as an input. key_type is determined inside key manager during storing keys.
- * @remarks Some private key files are protected by a password. If raw_key in key read from those encrypted files is encrypted with a password, the password should be provided in the #ckmc_key_s structure.
- * @remarks If password in policy is provided, the key is additionally encrypted with the password in policy.
+ * @remarks Currently only six types of keys are supported for this API. These are RSA
+ *          public/private key, DSA public/private key and ECDSA public/private key.
+ * @remarks key_type in key may be set to #CKMC_KEY_NONE as an input. key_type is determined inside
+ *          key manager during storing keys.
+ * @remarks Some private key files are protected by a password. If raw_key in key read from those
+ *          encrypted files is encrypted with a password, the password should be provided in the
+ *          #ckmc_key_s structure.
+ * @remarks If password in policy is provided, the key is additionally encrypted with the password
+ *          in policy.
  *
  * @param[in] alias   The name of a key to be stored
  * @param[in] key     The key's binary value to be stored
@@ -60,7 +66,8 @@ extern "C" {
  *
  * @retval #CKMC_ERROR_NONE              Successful
  * @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid
- * @retval #CKMC_ERROR_DB_LOCKED         A user key is not loaded in memory (a user is not logged in)
+ * @retval #CKMC_ERROR_DB_LOCKED         A user key is not loaded in memory (a user is not logged
+ *                                       in)
  * @retval #CKMC_ERROR_DB_ALIAS_EXISTS   Alias already exists
  * @retval #CKMC_ERROR_INVALID_FORMAT    The format of raw_key is not valid
  * @retval #CKMC_ERROR_DB_ERROR          Failed due to a database error
@@ -93,7 +100,8 @@ int ckmc_save_key(const char *alias, const ckmc_key_s key, const ckmc_policy_s p
  *
  * @retval #CKMC_ERROR_NONE              Successful
  * @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid
- * @retval #CKMC_ERROR_DB_LOCKED         A user key is not loaded in memory (a user is not logged in)
+ * @retval #CKMC_ERROR_DB_LOCKED         A user key is not loaded in memory (a user is not logged
+ *                                       in)
  * @retval #CKMC_ERROR_DB_ERROR          Failed due to a database error
  * @retval #CKMC_ERROR_DB_ALIAS_UNKNOWN  Alias does not exist
  * @retval #CKMC_ERROR_PERMISSION_DENIED Failed to access key manager
@@ -114,11 +122,13 @@ int ckmc_remove_key(const char *alias);
  * @privilege %http://tizen.org/privilege/keymanager
  *
  * @remarks A client can access only data stored by the client.
- * @remarks You must destroy the newly created @a ppkey by calling ckmc_key_free() if it is no longer needed.
+ * @remarks You must destroy the newly created @a ppkey by calling ckmc_key_free() if it is no
+ *          longer needed.
  *
  * @param[in] alias     The name of a key to retrieve
  * @param[in] password  The password used in decrypting a key value \n
- *                      If password of policy is provided in ckmc_save_key(), the same password should be provided.
+ *                      If password of policy is provided in ckmc_save_key(), the same password
+ *                      should be provided.
  * @param[out] ppkey    The pointer to a newly created ckmc_key_s handle
  *
  * @return @c 0 on success,
@@ -126,7 +136,8 @@ int ckmc_remove_key(const char *alias);
  *
  * @retval #CKMC_ERROR_NONE              Successful
  * @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid
- * @retval #CKMC_ERROR_DB_LOCKED         A user key is not loaded in memory (a user is not logged in)
+ * @retval #CKMC_ERROR_DB_LOCKED         A user key is not loaded in memory (a user is not logged
+ *                                       in)
  * @retval #CKMC_ERROR_DB_ERROR          Failed due to a database error
  * @retval #CKMC_ERROR_DB_ALIAS_UNKNOWN  Alias does not exist
  * @retval #CKMC_ERROR_PERMISSION_DENIED Failed to access key manager
@@ -147,9 +158,11 @@ int ckmc_get_key(const char *alias, const char *password, ckmc_key_s **ppkey);
  * @privilege %http://tizen.org/privilege/keymanager
  *
  * @remarks A client can access only data stored by the client.
- * @remarks You must destroy the newly created @a ppalias_list by calling ckmc_alias_list_all_free() if it is no longer needed.
+ * @remarks You must destroy the newly created @a ppalias_list by calling ckmc_alias_list_all_free()
+ *          if it is no longer needed.
  *
- * @param[out] ppalias_list  The pointer to a newly created ckmc_alias_list_s handle containing all available alias of keys \n
+ * @param[out] ppalias_list  The pointer to a newly created ckmc_alias_list_s handle containing all
+ *                           available alias of keys \n
  *                           If there is no available key alias, *ppalias_list will be null.
  *
  * @return @c 0 on success,
@@ -157,7 +170,8 @@ int ckmc_get_key(const char *alias, const char *password, ckmc_key_s **ppkey);
  *
  * @retval #CKMC_ERROR_NONE              Successful
  * @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid
- * @retval #CKMC_ERROR_DB_LOCKED         A user key is not loaded in memory (a user is not logged in)
+ * @retval #CKMC_ERROR_DB_LOCKED         A user key is not loaded in memory (a user is not logged
+ *                                       in)
  * @retval #CKMC_ERROR_DB_ERROR          Failed due to a database error
  * @retval #CKMC_ERROR_DB_ALIAS_UNKNOWN  Alias does not exist
  * @retval #CKMC_ERROR_PERMISSION_DENIED Failed to access key manager
@@ -180,7 +194,8 @@ int ckmc_get_key_alias_list(ckmc_alias_list_s** ppalias_list);
  * @privlevel public
  * @privilege %http://tizen.org/privilege/keymanager
  *
- * @remarks the certificate's binary value will be converted and saved as binary DER encoded certificates.
+ * @remarks the certificate's binary value will be converted and saved as binary DER encoded
+ *          certificates.
  *
  * @param[in] alias  The name of a certificate to be stored
  * @param[in] cert   The certificate's binary value to be stored
@@ -191,7 +206,8 @@ int ckmc_get_key_alias_list(ckmc_alias_list_s** ppalias_list);
  *
  * @retval #CKMC_ERROR_NONE               Successful
  * @retval #CKMC_ERROR_INVALID_PARAMETER  Input parameter is invalid
- * @retval #CKMC_ERROR_DB_LOCKED          A user key is not loaded in memory (a user is not logged in)
+ * @retval #CKMC_ERROR_DB_LOCKED          A user key is not loaded in memory (a user is not logged
+ *                                        in)
  * @retval #CKMC_ERROR_DB_ALIAS_EXISTS    Alias already exists
  * @retval #CKMC_ERROR_INVALID_FORMAT     The format of raw_cert is not valid
  * @retval #CKMC_ERROR_DB_ERROR           Failed due to a database error
@@ -224,7 +240,8 @@ int ckmc_save_cert(const char *alias, const ckmc_cert_s cert, const ckmc_policy_
  *
  * @retval #CKMC_ERROR_NONE               Successful
  * @retval #CKMC_ERROR_INVALID_PARAMETER  Input parameter is invalid
- * @retval #CKMC_ERROR_DB_LOCKED          A user key is not loaded in memory (a user is not logged in)
+ * @retval #CKMC_ERROR_DB_LOCKED          A user key is not loaded in memory (a user is not logged
+ *                                        in)
  * @retval #CKMC_ERROR_DB_ERROR           Failed due to a database error
  * @retval #CKMC_ERROR_DB_ALIAS_UNKNOWN   Alias does not exist
  * @retval #CKMC_ERROR_PERMISSION_DENIED  Failed to access key manager
@@ -246,11 +263,13 @@ int ckmc_remove_cert(const char *alias);
  *
  * @remarks A client can access only certificate stored by the client.
  * @remarks A DER encoded certificate will be returned as a return value.
- * @remarks You must destroy the newly created @a ppcert by calling ckmc_cert_free() if it is no longer needed.
+ * @remarks You must destroy the newly created @a ppcert by calling ckmc_cert_free() if it is no
+ *          longer needed.
  *
  * @param[in] alias    The name of a certificate to retrieve
  * @param[in] password The password used in decrypting a certificate value \n
- *                     If password of policy is provided in ckmc_save_cert(), the same password should be provided.
+ *                     If password of policy is provided in ckmc_save_cert(), the same password
+ *                     should be provided.
  * @param[out] ppcert  The pointer to a newly created ckmc_cert_s handle
  *
  * @return @c 0 on success,
@@ -258,7 +277,8 @@ int ckmc_remove_cert(const char *alias);
  *
  * @retval #CKMC_ERROR_NONE               Successful
  * @retval #CKMC_ERROR_INVALID_PARAMETER  Input parameter is invalid
- * @retval #CKMC_ERROR_DB_LOCKED          A user key is not loaded in memory (a user is not logged in)
+ * @retval #CKMC_ERROR_DB_LOCKED          A user key is not loaded in memory (a user is not logged
+ *                                        in)
  * @retval #CKMC_ERROR_DB_ERROR           Failed due to a database error
  * @retval #CKMC_ERROR_DB_ALIAS_UNKNOWN   Alias does not exists
  * @retval #CKMC_ERROR_PERMISSION_DENIED  Failed to access key manager
@@ -279,9 +299,11 @@ int ckmc_get_cert(const char *alias, const char *password, ckmc_cert_s **ppcert)
  * @privilege %http://tizen.org/privilege/keymanager
  *
  * @remarks A client can access only data stored by the client.
- * @remarks You must destroy the newly created @a ppalias_list by calling ckmc_alias_list_all_free() if it is no longer needed.
+ * @remarks You must destroy the newly created @a ppalias_list by calling ckmc_alias_list_all_free()
+ *          if it is no longer needed.
  *
- * @param[out] ppalias_list The pointer to a newly created ckmc_alias_list_s handle containing all available alias of keys \n
+ * @param[out] ppalias_list The pointer to a newly created ckmc_alias_list_s handle containing all
+ *                          available alias of keys \n
  *                          If there is no available key alias, *ppalias_list will be null.
  *
  * @return @c 0 on success,
@@ -289,7 +311,8 @@ int ckmc_get_cert(const char *alias, const char *password, ckmc_cert_s **ppcert)
  *
  * @retval #CKMC_ERROR_NONE               Successful
  * @retval #CKMC_ERROR_INVALID_PARAMETER  Input parameter is invalid
- * @retval #CKMC_ERROR_DB_LOCKED          A user key is not loaded in memory (a user is not logged in)
+ * @retval #CKMC_ERROR_DB_LOCKED          A user key is not loaded in memory (a user is not logged
+ *                                        in)
  * @retval #CKMC_ERROR_DB_ERROR           Failed due to a database error
  * @retval #CKMC_ERROR_DB_ALIAS_UNKNOWN   Alias does not exist
  * @retval #CKMC_ERROR_PERMISSION_DENIED  Failed to access key manager
@@ -323,7 +346,8 @@ int ckmc_get_cert_alias_list(ckmc_alias_list_s** ppalias_list);
  *
  * @retval #CKMC_ERROR_NONE               Successful
  * @retval #CKMC_ERROR_INVALID_PARAMETER  Input parameter is invalid
- * @retval #CKMC_ERROR_DB_LOCKED          A user key is not loaded in memory (a user is not logged in)
+ * @retval #CKMC_ERROR_DB_LOCKED          A user key is not loaded in memory (a user is not logged
+ *                                        in)
  * @retval #CKMC_ERROR_DB_ALIAS_EXISTS    Alias already exists
  * @retval #CKMC_ERROR_DB_ERROR           Failed due to a database error
  * @retval #CKMC_ERROR_PERMISSION_DENIED  Failed to access key manager
@@ -337,7 +361,10 @@ int ckmc_get_cert_alias_list(ckmc_alias_list_s** ppalias_list);
  * @see #ckmc_pkcs12_s
  * @see #ckmc_policy_s
  */
-int ckmc_save_pkcs12(const char *alias, const ckmc_pkcs12_s *pkcs, const ckmc_policy_s key_policy, const ckmc_policy_s cert_policy);
+int ckmc_save_pkcs12(const char *alias,
+                     const ckmc_pkcs12_s *pkcs,
+                     const ckmc_policy_s key_policy,
+                     const ckmc_policy_s cert_policy);
 
 /**
  * @brief Removes all PKCS12 contents from key manager.
@@ -356,7 +383,8 @@ int ckmc_save_pkcs12(const char *alias, const ckmc_pkcs12_s *pkcs, const ckmc_po
  *
  * @retval #CKMC_ERROR_NONE               Successful
  * @retval #CKMC_ERROR_INVALID_PARAMETER  Input parameter is invalid
- * @retval #CKMC_ERROR_DB_LOCKED          A user key is not loaded in memory (a user is not logged in)
+ * @retval #CKMC_ERROR_DB_LOCKED          A user key is not loaded in memory (a user is not logged
+ *                                        in)
  * @retval #CKMC_ERROR_DB_ERROR           Failed due to a database error
  * @retval #CKMC_ERROR_DB_ALIAS_UNKNOWN   Alias does not exist
  * @retval #CKMC_ERROR_PERMISSION_DENIED  Failed to access key manager
@@ -376,7 +404,8 @@ int ckmc_remove_pkcs12(const char *alias);
  * @privilege %http://tizen.org/privilege/keymanager
  *
  * @remarks A client can access only data stored by the client.
- * @remarks You must destroy the newly created @a pkcs12 by calling ckmc_pkcs12_free() if it is no longer needed.
+ * @remarks You must destroy the newly created @a pkcs12 by calling ckmc_pkcs12_free() if it is no
+ *          longer needed.
  *
  * @param[in]  alias     The name of a data to retrieve
  * @param[out] pkcs12    The pointer to a newly created ckmc_pkcs12_s handle
@@ -386,7 +415,8 @@ int ckmc_remove_pkcs12(const char *alias);
  *
  * @retval #CKMC_ERROR_NONE               Successful
  * @retval #CKMC_ERROR_INVALID_PARAMETER  Input parameter is invalid
- * @retval #CKMC_ERROR_DB_LOCKED          A user key is not loaded in memory (a user is not logged in)
+ * @retval #CKMC_ERROR_DB_LOCKED          A user key is not loaded in memory (a user is not logged
+ *                                        in)
  * @retval #CKMC_ERROR_DB_ERROR           Failed due to a database error
  * @retval #CKMC_ERROR_DB_ALIAS_UNKNOWN   Alias does not exist
  * @retval #CKMC_ERROR_PERMISSION_DENIED  Failed to access key manager
@@ -417,7 +447,8 @@ int ckmc_get_pkcs12(const char *alias, ckmc_pkcs12_s **pkcs12);
  *
  * @retval #CKMC_ERROR_NONE               Successful
  * @retval #CKMC_ERROR_INVALID_PARAMETER  Input parameter is invalid
- * @retval #CKMC_ERROR_DB_LOCKED          A user key is not loaded in memory (a user is not logged in)
+ * @retval #CKMC_ERROR_DB_LOCKED          A user key is not loaded in memory (a user is not logged
+ *                                        in)
  * @retval #CKMC_ERROR_DB_ALIAS_EXISTS    Alias already exists
  * @retval #CKMC_ERROR_DB_ERROR           Failed due to a database error
  * @retval #CKMC_ERROR_PERMISSION_DENIED  Failed to access key manager
@@ -449,7 +480,8 @@ int ckmc_save_data(const char *alias, ckmc_raw_buffer_s data, const ckmc_policy_
  *
  * @retval #CKMC_ERROR_NONE               Successful
  * @retval #CKMC_ERROR_INVALID_PARAMETER  Input parameter is invalid
- * @retval #CKMC_ERROR_DB_LOCKED          A user key is not loaded in memory (a user is not logged in)
+ * @retval #CKMC_ERROR_DB_LOCKED          A user key is not loaded in memory (a user is not logged
+ *                                        in)
  * @retval #CKMC_ERROR_DB_ERROR           Failed due to the error with unknown reason
  * @retval #CKMC_ERROR_DB_ALIAS_UNKNOWN   Alias does not exist
  * @retval #CKMC_ERROR_PERMISSION_DENIED  Failed to access key manager
@@ -470,11 +502,13 @@ int ckmc_remove_data(const char *alias);
  * @privilege %http://tizen.org/privilege/keymanager
  *
  * @remarks A client can access only data stored by the client.
- * @remarks You must destroy the newly created @a ppdata by calling ckmc_buffer_free() if it is no longer needed.
+ * @remarks You must destroy the newly created @a ppdata by calling ckmc_buffer_free() if it is no
+ *          longer needed.
  *
  * @param[in]  alias     The name of a data to retrieve
  * @param[in]  password  The password used in decrypting a data value \n
- *                       If password of policy is provided in ckmc_save_data(), the same password should be provided.
+ *                       If password of policy is provided in ckmc_save_data(), the same password
+ *                       should be provided.
  * @param[out] ppdata    The pointer to a newly created ckmc_raw_buffer_s handle
  *
  * @return @c 0 on success,
@@ -482,7 +516,8 @@ int ckmc_remove_data(const char *alias);
  *
  * @retval #CKMC_ERROR_NONE               Successful
  * @retval #CKMC_ERROR_INVALID_PARAMETER  Input parameter is invalid
- * @retval #CKMC_ERROR_DB_LOCKED          A user key is not loaded in memory (a user is not logged in)
+ * @retval #CKMC_ERROR_DB_LOCKED          A user key is not loaded in memory (a user is not logged
+ *                                        in)
  * @retval #CKMC_ERROR_DB_ERROR           Failed due to the error with unknown reason
  * @retval #CKMC_ERROR_DB_ALIAS_UNKNOWN   Alias does not exist
  * @retval #CKMC_ERROR_PERMISSION_DENIED  Failed to access key manager
@@ -503,9 +538,11 @@ int ckmc_get_data(const char *alias, const char *password, ckmc_raw_buffer_s **p
  * @privilege %http://tizen.org/privilege/keymanager
  *
  * @remarks A client can access only data stored by the client.
- * @remarks You must destroy the newly created @a ppalias_list by calling ckmc_alias_list_all_free() if it is no longer needed.
+ * @remarks You must destroy the newly created @a ppalias_list by calling ckmc_alias_list_all_free()
+ *          if it is no longer needed.
  *
- * @param[out] ppalias_list The pointer to a newly created ckmc_alias_list_s handle containing all available alias of keys \n
+ * @param[out] ppalias_list The pointer to a newly created ckmc_alias_list_s handle containing all
+ *                          available alias of keys \n
  *                          If there is no available key alias, *ppalias_list will be null.
  *
  * @return @c 0 on success,
@@ -513,7 +550,8 @@ int ckmc_get_data(const char *alias, const char *password, ckmc_raw_buffer_s **p
  *
  * @retval #CKMC_ERROR_NONE               Successful
  * @retval #CKMC_ERROR_INVALID_PARAMETER  Input parameter is invalid
- * @retval #CKMC_ERROR_DB_LOCKED          A user key is not loaded in memory (a user is not logged in)
+ * @retval #CKMC_ERROR_DB_LOCKED          A user key is not loaded in memory (a user is not logged
+ *                                        in)
  * @retval #CKMC_ERROR_DB_ERROR           Failed due to the error with unknown reason
  * @retval #CKMC_ERROR_DB_ALIAS_UNKNOWN   Alias does not exist
  * @retval #CKMC_ERROR_PERMISSION_DENIED  Failed to access key manager
@@ -530,13 +568,15 @@ int ckmc_get_data_alias_list(ckmc_alias_list_s** ppalias_list);
 
 
 /**
- * @brief Creates RSA private/public key pair and stores them inside key manager based on each policy.
+ * @brief Creates RSA private/public key pair and stores them inside key manager based on each
+ *        policy.
  *
  * @since_tizen 2.3
  * @privlevel public
  * @privilege %http://tizen.org/privilege/keymanager
  *
- * @remarks If password in policy is provided, the key is additionally encrypted with the password in policy.
+ * @remarks If password in policy is provided, the key is additionally encrypted with the password
+ *          in policy.
  *
  * @param[in] size                The size of key strength to be created \n
  *                                @c 1024, @c 2048, and @c 4096 are supported.
@@ -550,7 +590,8 @@ int ckmc_get_data_alias_list(ckmc_alias_list_s** ppalias_list);
  *
  * @retval #CKMC_ERROR_NONE               Successful
  * @retval #CKMC_ERROR_INVALID_PARAMETER  Input parameter is invalid
- * @retval #CKMC_ERROR_DB_LOCKED          A user key is not loaded in memory (a user is not logged in)
+ * @retval #CKMC_ERROR_DB_LOCKED          A user key is not loaded in memory (a user is not logged
+ *                                        in)
  * @retval #CKMC_ERROR_DB_ALIAS_EXISTS    Alias already exists
  * @retval #CKMC_ERROR_DB_ERROR           Failed due to other DB transaction unexpectedly
  * @retval #CKMC_ERROR_PERMISSION_DENIED  Failed to access key manager
@@ -562,16 +603,22 @@ int ckmc_get_data_alias_list(ckmc_alias_list_s** ppalias_list);
  * @see ckmc_create_signature()
  * @see ckmc_verify_signature()
  */
-int ckmc_create_key_pair_rsa(const size_t size, const char *private_key_alias, const char *public_key_alias, const ckmc_policy_s policy_private_key, const ckmc_policy_s policy_public_key);
+int ckmc_create_key_pair_rsa(const size_t size,
+                             const char *private_key_alias,
+                             const char *public_key_alias,
+                             const ckmc_policy_s policy_private_key,
+                             const ckmc_policy_s policy_public_key);
 
 /**
- * @brief Creates DSA private/public key pair and stores them inside key manager based on each policy.
+ * @brief Creates DSA private/public key pair and stores them inside key manager based on each
+ *        policy.
  *
  * @since_tizen 2.3
  * @privlevel public
  * @privilege %http://tizen.org/privilege/keymanager
  *
- * @remarks If password in policy is provided, the key is additionally encrypted with the password in policy.
+ * @remarks If password in policy is provided, the key is additionally encrypted with the password
+ *          in policy.
  *
  * @param[in] size                The size of key strength to be created \n
  *                                @c 1024, @c 2048, @c 3072 and @c 4096 are supported.
@@ -585,7 +632,8 @@ int ckmc_create_key_pair_rsa(const size_t size, const char *private_key_alias, c
  *
  * @retval #CKMC_ERROR_NONE               Successful
  * @retval #CKMC_ERROR_INVALID_PARAMETER  Input parameter is invalid
- * @retval #CKMC_ERROR_DB_LOCKED          A user key is not loaded in memory (a user is not logged in)
+ * @retval #CKMC_ERROR_DB_LOCKED          A user key is not loaded in memory (a user is not logged
+ *                                        in)
  * @retval #CKMC_ERROR_DB_ALIAS_EXISTS    Alias already exists
  * @retval #CKMC_ERROR_DB_ERROR           Failed due to other DB transaction unexpectedly
  * @retval #CKMC_ERROR_PERMISSION_DENIED  Failed to access key manager
@@ -597,16 +645,22 @@ int ckmc_create_key_pair_rsa(const size_t size, const char *private_key_alias, c
  * @see ckmc_create_signature()
  * @see ckmc_verify_signature()
  */
-int ckmc_create_key_pair_dsa(const size_t size, const char *private_key_alias, const char *public_key_alias, const ckmc_policy_s policy_private_key, const ckmc_policy_s policy_public_key);
+int ckmc_create_key_pair_dsa(const size_t size,
+                             const char *private_key_alias,
+                             const char *public_key_alias,
+                             const ckmc_policy_s policy_private_key,
+                             const ckmc_policy_s policy_public_key);
 
 /**
- * @brief Creates ECDSA private/public key pair and stores them inside key manager based on each policy.
+ * @brief Creates ECDSA private/public key pair and stores them inside key manager based on each
+ *        policy.
  *
  * @since_tizen 2.3
  * @privlevel public
  * @privilege %http://tizen.org/privilege/keymanager
  *
- * @remarks If password in policy is provided, the key is additionally encrypted with the password in policy.
+ * @remarks If password in policy is provided, the key is additionally encrypted with the password
+ *          in policy.
  *
  * @param[in] type                The type of elliptic curve of ECDSA
  * @param[in] private_key_alias   The name of private key to be stored
@@ -619,7 +673,8 @@ int ckmc_create_key_pair_dsa(const size_t size, const char *private_key_alias, c
  *
  * @retval #CKMC_ERROR_NONE               Successful
  * @retval #CKMC_ERROR_INVALID_PARAMETER  Input parameter is invalid
- * @retval #CKMC_ERROR_DB_LOCKED          A user key is not loaded in memory (a user is not logged in)
+ * @retval #CKMC_ERROR_DB_LOCKED          A user key is not loaded in memory (a user is not logged
+ *                                        in)
  * @retval #CKMC_ERROR_DB_ALIAS_EXISTS    Alias already exists
  * @retval #CKMC_ERROR_DB_ERROR           Failed due to other DB transaction unexpectedly
  * @retval #CKMC_ERROR_PERMISSION_DENIED  Failed to access key manager
@@ -632,7 +687,11 @@ int ckmc_create_key_pair_dsa(const size_t size, const char *private_key_alias, c
  * @see ckmc_verify_signature()
  * @see #ckmc_ec_type_e
  */
-int ckmc_create_key_pair_ecdsa(const ckmc_ec_type_e type, const char *private_key_alias, const char *public_key_alias, const ckmc_policy_s policy_private_key, const ckmc_policy_s policy_public_key);
+int ckmc_create_key_pair_ecdsa(const ckmc_ec_type_e type,
+                               const char *private_key_alias,
+                               const char *public_key_alias,
+                               const ckmc_policy_s policy_private_key,
+                               const ckmc_policy_s policy_public_key);
 
 /**
  * @brief Creates a signature on a given message using a private key and returns the signature.
@@ -641,8 +700,10 @@ int ckmc_create_key_pair_ecdsa(const ckmc_ec_type_e type, const char *private_ke
  * @privlevel public
  * @privilege %http://tizen.org/privilege/keymanager
  *
- * @remarks If password of policy is provided during storing a key, the same password should be provided.
- * @remarks You must destroy the newly created @a ppsignature by calling ckmc_buffer_free() if it is no longer needed.
+ * @remarks If password of policy is provided during storing a key, the same password should be
+ *          provided.
+ * @remarks You must destroy the newly created @a ppsignature by calling ckmc_buffer_free() if it is
+ *          no longer needed.
  *
  * @param[in]  private_key_alias  The name of private key
  * @param[in]  password           The password used in decrypting a private key value
@@ -658,7 +719,8 @@ int ckmc_create_key_pair_ecdsa(const ckmc_ec_type_e type, const char *private_ke
  *
  * @retval #CKMC_ERROR_NONE               Successful
  * @retval #CKMC_ERROR_INVALID_PARAMETER  Input parameter is invalid
- * @retval #CKMC_ERROR_DB_LOCKED          A user key is not loaded in memory (a user is not logged in)
+ * @retval #CKMC_ERROR_DB_LOCKED          A user key is not loaded in memory (a user is not logged
+ *                                        in)
  * @retval #CKMC_ERROR_DB_ERROR           Failed due to the error with unknown reason
  * @retval #CKMC_ERROR_DB_ALIAS_UNKNOWN   Alias does not exist
  * @retval #CKMC_ERROR_PERMISSION_DENIED  Failed to access key manager
@@ -672,16 +734,23 @@ int ckmc_create_key_pair_ecdsa(const ckmc_ec_type_e type, const char *private_ke
  * @see #ckmc_hash_algo_e
  * @see #ckmc_rsa_padding_algo_e
  */
-int ckmc_create_signature(const char *private_key_alias, const char *password, const ckmc_raw_buffer_s message, const ckmc_hash_algo_e hash, const ckmc_rsa_padding_algo_e padding, ckmc_raw_buffer_s **ppsignature);
+int ckmc_create_signature(const char *private_key_alias,
+                          const char *password,
+                          const ckmc_raw_buffer_s message,
+                          const ckmc_hash_algo_e hash,
+                          const ckmc_rsa_padding_algo_e padding,
+                          ckmc_raw_buffer_s **ppsignature);
 
 /**
- * @brief Verifies a given signature on a given message using a public key and returns the signature status.
+ * @brief Verifies a given signature on a given message using a public key and returns the signature
+ *        status.
  *
  * @since_tizen 2.3
  * @privlevel public
  * @privilege %http://tizen.org/privilege/keymanager
  *
- * @remarks If password of policy is provided during storing a key, the same password should be provided.
+ * @remarks If password of policy is provided during storing a key, the same password should be
+ *          provided.
  *
  * @param[in] public_key_alias  The name of public key
  * @param[in] password          The password used in decrypting a public key value
@@ -697,7 +766,8 @@ int ckmc_create_signature(const char *private_key_alias, const char *password, c
  * @retval #CKMC_ERROR_NONE                 Successful
  * @retval #CKMC_ERROR_VERIFICATION_FAILED  The signature is invalid
  * @retval #CKMC_ERROR_INVALID_PARAMETER    Input parameter is invalid
- * @retval #CKMC_ERROR_DB_LOCKED            A user key is not loaded in memory (a user is not logged in)
+ * @retval #CKMC_ERROR_DB_LOCKED            A user key is not loaded in memory (a user is not logged
+ *                                          in)
  * @retval #CKMC_ERROR_DB_ERROR             Failed due to the error with unknown reason
  * @retval #CKMC_ERROR_DB_ALIAS_UNKNOWN     Alias does not exist
  * @retval #CKMC_ERROR_PERMISSION_DENIED    Failed to access key manager
@@ -710,7 +780,12 @@ int ckmc_create_signature(const char *private_key_alias, const char *password, c
  * @see #ckmc_hash_algo_e
  * @see #ckmc_rsa_padding_algo_e
  */
-int ckmc_verify_signature(const char *public_key_alias, const char *password, const ckmc_raw_buffer_s message, const ckmc_raw_buffer_s signature, const ckmc_hash_algo_e hash, const ckmc_rsa_padding_algo_e padding);
+int ckmc_verify_signature(const char *public_key_alias,
+                          const char *password,
+                          const ckmc_raw_buffer_s message,
+                          const ckmc_raw_buffer_s signature,
+                          const ckmc_hash_algo_e hash,
+                          const ckmc_rsa_padding_algo_e padding);
 
 /**
  * @deprecated, see ckmc_get_certificate_chain()
@@ -720,11 +795,14 @@ int ckmc_verify_signature(const char *public_key_alias, const char *password, co
  * @privlevel public
  * @privilege %http://tizen.org/privilege/keymanager
  *
- * @remarks The trusted root certificate of the chain should exist in the system's certificate storage.
- * @remarks You must destroy the newly created @a ppcert_chain_list by calling ckmc_cert_list_all_free() if it is no longer needed.
+ * @remarks The trusted root certificate of the chain should exist in the system's certificate
+ *          storage.
+ * @remarks You must destroy the newly created @a ppcert_chain_list by calling
+ *          ckmc_cert_list_all_free() if it is no longer needed.
  *
  * @param[in] cert               The certificate to be verified
- * @param[in] untrustedcerts     The untrusted CA certificates to be used in verifying a certificate chain
+ * @param[in] untrustedcerts     The untrusted CA certificates to be used in verifying a certificate
+ *                               chain
  * @param[out] ppcert_chain_list The pointer to a newly created certificate chain's handle \n
  *                               If an error occurs, @a *ppcert_chain_list will be null.
  *
@@ -734,7 +812,8 @@ int ckmc_verify_signature(const char *public_key_alias, const char *password, co
  * @retval #CKMC_ERROR_NONE                 Successful
  * @retval #CKMC_ERROR_VERIFICATION_FAILED  The certificate chain is not valid
  * @retval #CKMC_ERROR_INVALID_PARAMETER    Input parameter is invalid
- * @retval #CKMC_ERROR_DB_LOCKED            A user key is not loaded in memory (a user is not logged in)
+ * @retval #CKMC_ERROR_DB_LOCKED            A user key is not loaded in memory (a user is not logged
+ *                                          in)
  * @retval #CKMC_ERROR_DB_ERROR             Failed due to the error with unknown reason
  * @retval #CKMC_ERROR_INVALID_FORMAT       The format of certificate is not valid
  * @retval #CKMC_ERROR_PERMISSION_DENIED    Failed to access key manager
@@ -744,21 +823,27 @@ int ckmc_verify_signature(const char *public_key_alias, const char *password, co
  * @see ckmc_get_cert_chain_with_alias())
  * @see ckmc_cert_list_all_free()
  */
-int ckmc_get_cert_chain(const ckmc_cert_s *cert, const ckmc_cert_list_s *untrustedcerts, ckmc_cert_list_s **ppcert_chain_list);
+int ckmc_get_cert_chain(const ckmc_cert_s *cert,
+                        const ckmc_cert_list_s *untrustedcerts,
+                        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.
+ * @brief Verifies a certificate chain using an alias list of untrusted certificates and return that
+ *        chain.
  *
  * @since_tizen 2.3
  * @privlevel public
  * @privilege %http://tizen.org/privilege/keymanager
  *
- * @remarks The trusted root certificate of the chain should exist in the system's certificate storage.
- * @remarks You must destroy the newly created @a ppcert_chain_list by calling ckmc_cert_list_all_free() if it is no longer needed.
+ * @remarks The trusted root certificate of the chain should exist in the system's certificate
+ *          storage.
+ * @remarks You must destroy the newly created @a ppcert_chain_list by calling
+ *          ckmc_cert_list_all_free() if it is no longer needed.
  *
  * @param[in] cert               The certificate to be verified
- * @param[in] untrustedcerts     The alias list of untrusted CA certificates stored in key manager to be used in verifying a certificate chain
+ * @param[in] untrustedcerts     The alias list of untrusted CA certificates stored in key manager
+ *                               to be used in verifying a certificate chain
  * @param[out] ppcert_chain_list The pointer to a newly created certificate chain's handle \n
  *                               If an error occurs, @a *ppcert_chain_list will be null.
  *
@@ -768,7 +853,8 @@ int ckmc_get_cert_chain(const ckmc_cert_s *cert, const ckmc_cert_list_s *untrust
  * @retval #CKMC_ERROR_NONE                 Successful
  * @retval #CKMC_ERROR_VERIFICATION_FAILED  The certificate chain is not valid
  * @retval #CKMC_ERROR_INVALID_PARAMETER    Input parameter is invalid
- * @retval #CKMC_ERROR_DB_LOCKED            A user key is not loaded in memory (a user is not logged in)
+ * @retval #CKMC_ERROR_DB_LOCKED            A user key is not loaded in memory (a user is not logged
+ *                                          in)
  * @retval #CKMC_ERROR_DB_ERROR             Failed due to the error with unknown reason
  * @retval #CKMC_ERROR_DB_ALIAS_UNKNOWN     Alias does not exist
  * @retval #CKMC_ERROR_INVALID_FORMAT       The format of certificate is not valid
@@ -779,22 +865,30 @@ int ckmc_get_cert_chain(const ckmc_cert_s *cert, const ckmc_cert_list_s *untrust
  * @see ckmc_get_cert_chain())
  * @see ckmc_cert_list_all_free()
  */
-int ckmc_get_cert_chain_with_alias(const ckmc_cert_s *cert, const ckmc_alias_list_s *untrustedcerts, ckmc_cert_list_s **ppcert_chain_list);
+int ckmc_get_cert_chain_with_alias(const ckmc_cert_s *cert,
+                                   const ckmc_alias_list_s *untrustedcerts,
+                                   ckmc_cert_list_s **ppcert_chain_list);
 
 /**
- * @brief Verifies a certificate chain and returns that chain using user entered trusted and untrusted CA certificates
+ * @brief Verifies a certificate chain and returns that chain using user entered trusted and
+ *        untrusted CA certificates
  *
  * @since_tizen 3.0
  * @privlevel public
  * @privilege %http://tizen.org/privilege/keymanager
  *
- * @remarks If the trusted root certificates are provided as a user input, these certificates do not need to exist in the system's certificate storage.
- * @remarks You must destroy the newly created @a ppcert_chain_list by calling ckmc_cert_list_all_free() if it is no longer needed.
+ * @remarks If the trusted root certificates are provided as a user input, these certificates do not
+ *          need to exist in the system's certificate storage.
+ * @remarks You must destroy the newly created @a ppcert_chain_list by calling
+ *          ckmc_cert_list_all_free() if it is no longer needed.
  *  *
  * @param[in] cert                    The certificate to be verified
- * @param[in] untrustedcerts          The untrusted CA certificates to be used in verifying a certificate chain
- * @param[in] trustedcerts            The trusted CA certificates to be used in verifying a certificate chain
- * @param[in] use_trustedsystemcerts  The flag indicating the use of the trusted root certificates in the system's certificate storage.
+ * @param[in] untrustedcerts          The untrusted CA certificates to be used in verifying a
+ *                                    certificate chain
+ * @param[in] trustedcerts            The trusted CA certificates to be used in verifying a
+ *                                    certificate chain
+ * @param[in] use_trustedsystemcerts  The flag indicating the use of the trusted root certificates
+ *                                    in the system's certificate storage.
  * @param[out] ppcert_chain_list The pointer to a newly created certificate chain's handle \n
  *                               If an error occurs, @a *ppcert_chain_list will be null.
  *
@@ -804,7 +898,8 @@ int ckmc_get_cert_chain_with_alias(const ckmc_cert_s *cert, const ckmc_alias_lis
  * @retval #CKMC_ERROR_NONE                 Successful
  * @retval #CKMC_ERROR_VERIFICATION_FAILED  The certificate chain is not valid
  * @retval #CKMC_ERROR_INVALID_PARAMETER    Input parameter is invalid
- * @retval #CKMC_ERROR_DB_LOCKED            A user key is not loaded in memory (a user is not logged in)
+ * @retval #CKMC_ERROR_DB_LOCKED            A user key is not loaded in memory (a user is not logged
+ *                                          in)
  * @retval #CKMC_ERROR_DB_ERROR             Failed due to the error with unknown reason
  * @retval #CKMC_ERROR_INVALID_FORMAT       The format of certificate is not valid
  * @retval #CKMC_ERROR_PERMISSION_DENIED    Failed to access key manager
@@ -814,22 +909,32 @@ int ckmc_get_cert_chain_with_alias(const ckmc_cert_s *cert, const ckmc_alias_lis
  * @see ckmc_get_cert_chain_with_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_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);
 
 /**
- * @brief Verifies a certificate chain and returns that chain using alias lists of untrusted and trusted certificates
+ * @brief Verifies a certificate chain and returns that chain using alias lists of untrusted and
+ *        trusted certificates
  *
  * @since_tizen 3.0
  * @privlevel public
  * @privilege %http://tizen.org/privilege/keymanager
  *
- * @remarks If the alias list of trusted root certificates is provided as a user input, these certificates do not need to exist in the system's certificate storage.
- * @remarks You must destroy the newly created @a ppcert_chain_list by calling ckmc_cert_list_all_free() if it is no longer needed.
+ * @remarks If the alias list of trusted root certificates is provided as a user input, these
+ *          certificates do not need to exist in the system's certificate storage.
+ * @remarks You must destroy the newly created @a ppcert_chain_list by calling
+ *          ckmc_cert_list_all_free() if it is no longer needed.
  *
  * @param[in] cert                    The certificate to be verified
- * @param[in] untrustedcerts          The alias list of untrusted CA certificates stored in key manager to be used in verifying a certificate chain
- * @param[in] trustedcerts            The alias list of trusted CA certificates stored in key manager to be used in verifying a certificate chain
- * @param[in] use_trustedsystemcerts  The flag indicating the use of the trusted root certificates in the system's certificate storage.
+ * @param[in] untrustedcerts          The alias list of untrusted CA certificates stored in key
+ *                                    manager to be used in verifying a certificate chain
+ * @param[in] trustedcerts            The alias list of trusted CA certificates stored in key
+ *                                    manager to be used in verifying a certificate chain
+ * @param[in] use_trustedsystemcerts  The flag indicating the use of the trusted root certificates
+ *                                    in the system's certificate storage.
  * @param[out] ppcert_chain_list The pointer to a newly created certificate chain's handle \n
  *                               If an error occurs, @a *ppcert_chain_list will be null.
  *
@@ -839,7 +944,8 @@ int ckmc_get_certificate_chain(const ckmc_cert_s *cert, const ckmc_cert_list_s *
  * @retval #CKMC_ERROR_NONE                 Successful
  * @retval #CKMC_ERROR_VERIFICATION_FAILED  The certificate chain is not valid
  * @retval #CKMC_ERROR_INVALID_PARAMETER    Input parameter is invalid
- * @retval #CKMC_ERROR_DB_LOCKED            A user key is not loaded in memory (a user is not logged in)
+ * @retval #CKMC_ERROR_DB_LOCKED            A user key is not loaded in memory (a user is not logged
+ *                                          in)
  * @retval #CKMC_ERROR_DB_ERROR             Failed due to the error with unknown reason
  * @retval #CKMC_ERROR_DB_ALIAS_UNKNOWN     Alias does not exist
  * @retval #CKMC_ERROR_INVALID_FORMAT       The format of certificate is not valid
@@ -850,7 +956,11 @@ int ckmc_get_certificate_chain(const ckmc_cert_s *cert, const ckmc_cert_list_s *
  * @see ckmc_get_cert_chain())
  * @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_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);
 
 /**
  * @brief Perform OCSP which checks certificate is whether revoked or not
@@ -893,7 +1003,8 @@ int ckmc_ocsp_check(const ckmc_cert_list_s *pcert_chain_list, ckmc_ocsp_status_e
  *
  * @retval #CKMC_ERROR_NONE                 Successful
  * @retval #CKMC_ERROR_INVALID_PARAMETER    Input parameter is invalid
- * @retval #CKMC_ERROR_DB_LOCKED            A user key is not loaded in memory (a user is not logged in)
+ * @retval #CKMC_ERROR_DB_LOCKED            A user key is not loaded in memory (a user is not logged
+ *                                          in)
  * @retval #CKMC_ERROR_DB_ERROR             Failed due to the error with unknown reason
  * @retval #CKMC_ERROR_DB_ALIAS_UNKNOWN     Alias does not exist
  * @retval #CKMC_ERROR_PERMISSION_DENIED    Failed to access key manager
@@ -915,14 +1026,16 @@ int ckmc_allow_access(const char *alias, const char *accessor, ckmc_access_right
  *
  * @param[in] alias       Data alias for which access will be granted
  * @param[in] accessor    Package id of the application that will gain access rights
- * @param[in] permissions Mask of permissions granted for @a accessor application (@a ckmc_permission_e)
+ * @param[in] permissions Mask of permissions granted for @a accessor application
+ *                        (@a ckmc_permission_e)
  *                        (previous permission mask will be replaced with the new mask value)
  *
  * @return @c 0 on success, otherwise a negative error value
  *
  * @retval #CKMC_ERROR_NONE                 Successful
  * @retval #CKMC_ERROR_INVALID_PARAMETER    Input parameter is invalid
- * @retval #CKMC_ERROR_DB_LOCKED            A user key is not loaded in memory (a user is not logged in)
+ * @retval #CKMC_ERROR_DB_LOCKED            A user key is not loaded in memory (a user is not logged
+ *                                          in)
  * @retval #CKMC_ERROR_DB_ERROR             Failed due to the error with unknown reason
  * @retval #CKMC_ERROR_DB_ALIAS_UNKNOWN     Alias does not exist
  * @retval #CKMC_ERROR_PERMISSION_DENIED    Failed to access key manager
@@ -950,7 +1063,8 @@ int ckmc_set_permission(const char *alias, const char *accessor, int permissions
  * @retval #CKMC_ERROR_NONE                 Successful
  * @retval #CKMC_ERROR_INVALID_PARAMETER    Input parameter is invalid or the @a accessor doesn't
  *                                          have access to @a alias
- * @retval #CKMC_ERROR_DB_LOCKED            A user key is not loaded in memory (a user is not logged in)
+ * @retval #CKMC_ERROR_DB_LOCKED            A user key is not loaded in memory (a user is not logged
+ *                                          in)
  * @retval #CKMC_ERROR_DB_ERROR             Failed due to the error with unknown reason
  * @retval #CKMC_ERROR_DB_ALIAS_UNKNOWN     Alias does not exist
  * @retval #CKMC_ERROR_PERMISSION_DENIED    Failed to access key manager
@@ -979,7 +1093,8 @@ int ckmc_deny_access(const char *alias, const char *accessor);
  *
  * @retval #CKMC_ERROR_NONE              Successful
  * @retval #CKMC_ERROR_INVALID_PARAMETER Input parameter is invalid
- * @retval #CKMC_ERROR_DB_LOCKED         A user key is not loaded in memory (a user is not logged in)
+ * @retval #CKMC_ERROR_DB_LOCKED         A user key is not loaded in memory (a user is not logged
+ *                                       in)
  * @retval #CKMC_ERROR_DB_ERROR          Failed due to a database error
  * @retval #CKMC_ERROR_DB_ALIAS_UNKNOWN  Alias does not exist
  * @retval #CKMC_ERROR_PERMISSION_DENIED Failed to access key manager
index 5cc7b7e..3b8f93a 100644 (file)
@@ -66,7 +66,8 @@ typedef enum __ckmc_key_type {
 typedef enum __ckmc_data_format {
     CKMC_FORM_DER_BASE64 = 0,  /**< DER format base64 encoded data */
     CKMC_FORM_DER,             /**< DER encoded data */
-    CKMC_FORM_PEM              /**< PEM encoded data. It consists of the DER format base64 encoded with additional header and footer lines. */
+    CKMC_FORM_PEM              /**< PEM encoded data. It consists of the DER format base64 encoded
+                                    with additional header and footer lines. */
 } ckmc_data_format_e;
 
 /**
@@ -74,9 +75,11 @@ typedef enum __ckmc_data_format {
  * @since_tizen 2.3
  */
 typedef enum __ckmc_ec_type {
-    CKMC_EC_PRIME192V1 = 0, /**< Elliptic curve domain "secp192r1" listed in "SEC 2" recommended elliptic curve domain  */
+    CKMC_EC_PRIME192V1 = 0, /**< Elliptic curve domain "secp192r1" listed in "SEC 2" recommended
+                                 elliptic curve domain  */
     CKMC_EC_PRIME256V1,     /**< "SEC 2" recommended elliptic curve domain - secp256r1 */
-    CKMC_EC_SECP384R1       /**< NIST curve P-384 (covers "secp384r1", the elliptic curve domain listed in See SEC 2 */
+    CKMC_EC_SECP384R1       /**< NIST curve P-384 (covers "secp384r1", the elliptic curve domain
+                                 listed in See SEC 2 */
 } ckmc_ec_type_e;
 
 /**
@@ -135,7 +138,9 @@ typedef struct __ckmc_raw_buff {
  * @since_tizen 2.3
  */
 typedef struct __ckmc_policy {
-    char* password;   /**< Byte array used to encrypt data inside CKM. If it is not null, the data(or key, or certificate) is stored encrypted with this password inside key manager */
+    char* password;   /**< Byte array used to encrypt data inside CKM. If it is not null, the data
+                           (or key, or certificate) is stored encrypted with this password inside
+                           key manager */
     bool extractable; /**< If true key may be extracted from storage */
 } ckmc_policy_s;
 
@@ -211,7 +216,8 @@ typedef struct __ckmc_pkcs12 {
  *
  * @since_tizen 2.3
  *
- * @remarks You must destroy the newly created @a ckmc_key_s by calling ckmc_key_free() if it is no longer needed.
+ * @remarks You must destroy the newly created @a ckmc_key_s by calling ckmc_key_free() if it is no
+ *          longer needed.
  *
  * @param[in] raw_key  The byte array of key \n
  *                     @a raw_key may be encrypted with password.
@@ -230,8 +236,10 @@ typedef struct __ckmc_pkcs12 {
  * @see ckmc_key_free()
  * @see #ckmc_key_s
  */
-int ckmc_key_new(unsigned char *raw_key, size_t key_size,
-        ckmc_key_type_e key_type, char *password, ckmc_key_s **ppkey);
+int ckmc_key_new(unsigned char *raw_key,
+                 size_t key_size,
+                 ckmc_key_type_e key_type,
+                 char *password, ckmc_key_s **ppkey);
 
 /**
  * @brief Destroys the @a ckmc_key_s handle and releases all its resources.
@@ -249,7 +257,8 @@ void ckmc_key_free(ckmc_key_s *key);
  *
  * @since_tizen 2.3
  *
- * @remarks You must destroy the newly created @a ckmc_raw_buffer_s by calling ckmc_buffer_free() if it is no longer needed.
+ * @remarks You must destroy the newly created @a ckmc_raw_buffer_s by calling ckmc_buffer_free() if
+ *          it is no longer needed.
  *
  * @param[in]  data      The byte array of buffer
  * @param[in]  size      The byte size of buffer
@@ -282,7 +291,8 @@ void ckmc_buffer_free(ckmc_raw_buffer_s *buffer);
  *
  * @since_tizen 2.3
  *
- * @remarks You must destroy the newly created @a ckmc_cert_s by calling ckmc_cert_free() if it is no longer needed.
+ * @remarks You must destroy the newly created @a ckmc_cert_s by calling ckmc_cert_free() if it is
+ *          no longer needed.
  *
  * @param[in]  raw_cert     The byte array of certificate
  * @param[in]  cert_size    The byte size of raw_cert
@@ -299,8 +309,10 @@ void ckmc_buffer_free(ckmc_raw_buffer_s *buffer);
  * @see ckmc_load_cert_from_file()
  * @see #ckmc_cert_s
  */
-int ckmc_cert_new(unsigned char *raw_cert, size_t cert_size,
-        ckmc_data_format_e data_format, ckmc_cert_s **ppcert);
+int ckmc_cert_new(unsigned char *raw_cert,
+                  size_t cert_size,
+                  ckmc_data_format_e data_format,
+                  ckmc_cert_s **ppcert);
 
 /**
  * @brief Destroys the @a ckmc_cert handle and releases all its resources.
@@ -319,7 +331,8 @@ void ckmc_cert_free(ckmc_cert_s *cert);
  *
  * @since_tizen 2.3
  *
- * @remarks You must destroy the newly created @a ckmc_cert_s by calling ckmc_cert_free() if it is no longer needed.
+ * @remarks You must destroy the newly created @a ckmc_cert_s by calling ckmc_cert_free() if it is
+ *          no longer needed.
  *
  * @param[in]  file_path  The path of certificate file to be loaded \n
  *                        The only DER or PEM encoded certificate file is supported.
@@ -343,8 +356,10 @@ int ckmc_load_cert_from_file(const char *file_path, ckmc_cert_s **cert);
  *
  * @since_tizen 2.3
  *
- * @remarks You must destroy the newly created @a ckmc_pkcs12_s by calling ckmc_pkcs12_free() if it is no longer needed.
- * @remarks On success, private_key, cert && ca_cert_list ownership is transferred into newly returned ckmc_pkcs12_s.
+ * @remarks You must destroy the newly created @a ckmc_pkcs12_s by calling ckmc_pkcs12_free() if it
+ *          is no longer needed.
+ * @remarks On success, private_key, cert && ca_cert_list ownership is transferred into newly
+ *          returned ckmc_pkcs12_s.
  *
  * @param[in]  private_key      @a ckmc_key_s handle to the private key (optional)
  * @param[in]  cert             @a ckmc_cert_s handle to the certificate (optional)
@@ -354,7 +369,8 @@ int ckmc_load_cert_from_file(const char *file_path, ckmc_cert_s **cert);
  * @return @c 0 on success,
  *         otherwise a negative error value
  *
- * @retval #CKMC_ERROR_INVALID_PARAMETER  Input parameter is invalid or private_key, cert and ca_cert_list all are null.
+ * @retval #CKMC_ERROR_INVALID_PARAMETER  Input parameter is invalid or private_key, cert and
+ *                                        ca_cert_list all are null.
  * @retval #CKMC_ERROR_OUT_OF_MEMORY      Not enough memory
  *
  * @see ckmc_pkcs12_free()
@@ -365,16 +381,21 @@ int ckmc_load_cert_from_file(const char *file_path, ckmc_cert_s **cert);
  * @see #ckmc_cert_list_s
  * @see #ckmc_pkcs12_s
  */
-int ckmc_pkcs12_new(ckmc_key_s *private_key, ckmc_cert_s *cert,
-        ckmc_cert_list_s *ca_cert_list, ckmc_pkcs12_s **pkcs12_bundle);
+int ckmc_pkcs12_new(ckmc_key_s *private_key,
+                    ckmc_cert_s *cert,
+                    ckmc_cert_list_s *ca_cert_list,
+                    ckmc_pkcs12_s **pkcs12_bundle);
 
 /**
  * @deprecated, use @a ckmc_load_from_pkcs12_file2() 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.
+ * @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.
  *
  * @since_tizen 2.3
  *
- * @remarks You must destroy the newly created @a ckmc_key_s, @a ckmc_cert_s, and @a ckmc_cert_list_s by calling ckmc_key_free(), ckmc_cert_free(), and ckmc_cert_list_all_free() if they are no longer needed.
+ * @remarks You must destroy the newly created @a ckmc_key_s, @a ckmc_cert_s, and
+ *          @a ckmc_cert_list_s by calling ckmc_key_free(), ckmc_cert_free(), and
+ *          ckmc_cert_list_all_free() if they are no longer needed.
  *
  * @param[in]  file_path    The path of PKCS12 file to be loaded
  * @param[in]  passphrase   The passphrase used to decrypt the PCKS12 file \n
@@ -382,7 +403,8 @@ int ckmc_pkcs12_new(ckmc_key_s *private_key, ckmc_cert_s *cert,
  * @param[out] private_key  The pointer of newly created @a ckmc_key_s handle for a private key
  * @param[out] cert         The pointer of newly created @a ckmc_cert_s handle for a certificate \n
  *                          It is null if the PKCS12 file does not contain a certificate.
- * @param[out] ca_cert_list The pointer of newly created @a ckmc_cert_list_s handle for CA certificates \n
+ * @param[out] ca_cert_list The pointer of newly created @a ckmc_cert_list_s handle for CA
+ *                          certificates \n
  *                          It is null if the PKCS12 file does not contain CA certificates.
  *
  * @return #CKMC_ERROR_NONE on success,
@@ -402,21 +424,24 @@ int ckmc_pkcs12_new(ckmc_key_s *private_key, ckmc_cert_s *cert,
  * @see #ckmc_cert_s
  * @see #ckmc_cert_list_s
  */
-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);
+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);
 
 /**
  * @brief Creates a new @a ckmc_pkcs12_s handle from a given PKCS#12 file and returns it.
  *
  * @since_tizen 2.3
  *
- * @remarks You must destroy the newly created @a ckmc_pkcs12_s by calling ckmc_pkcs12_free() if they are no longer needed.
+ * @remarks You must destroy the newly created @a ckmc_pkcs12_s by calling ckmc_pkcs12_free() if
+ *          they are no longer needed.
  *
  * @param[in]  file_path    The path of PKCS12 file to be loaded
  * @param[in]  passphrase   The passphrase used to decrypt the PCKS12 file \n
  *                          If PKCS12 file is not encrypted, passphrase can be null.
- * @param[out] ca_cert_list The pointer of newly created @a ckmc_cert_list_s handle for CA certificates \n
+ * @param[out] ca_cert_list The pointer of newly created @a ckmc_cert_list_s handle for CA
+ *                          certificates \n
  *                          It is null if the PKCS12 file does not contain CA certificates.
  *
  * @return #CKMC_ERROR_NONE on success,
@@ -430,7 +455,9 @@ int ckmc_load_from_pkcs12_file(const char *file_path, const char *passphrase,
  * @see ckmc_pkcs12_free()
  * @see #ckmc_pkcs12_s
  */
-int ckmc_load_from_pkcs12_file2(const char *file_path, const char *passphrase, ckmc_pkcs12_s **pkcs12_bundle);
+int ckmc_load_from_pkcs12_file2(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.
@@ -447,11 +474,14 @@ void ckmc_pkcs12_free(ckmc_pkcs12_s *pkcs12);
 /**
  * @internal
  * @brief Creates a new @a ckmc_alias_list_s handle and returns it.
- *        The alias pointer in the returned @a ckmc_alias_list_s handle points to the provided characters and next is null.
+ *        The alias pointer in the returned @a ckmc_alias_list_s handle points to the provided
+ *        characters and next is null.
  *
  * @since_tizen 2.3
  *
- * @remarks You must destroy the newly created @a ckmc_alias_list_s by calling ckmc_alias_list_free() or ckmc_alias_list_all_free() if it is no longer needed.
+ * @remarks You must destroy the newly created @a ckmc_alias_list_s
+ *          by calling ckmc_alias_list_free() or ckmc_alias_list_all_free() if it is no longer
+ *          needed.
  *
  * @param[in]  alias        The first item to be set in the newly created @a ckmc_alias_list_s
  * @param[out] ppalias_list The pointer to a newly created @a ckmc_alias_list_s handle
@@ -469,12 +499,14 @@ int ckmc_alias_list_new(char *alias, ckmc_alias_list_s **ppalias_list);
 
 /**
  * @internal
- * @brief Creates a new @a ckmc_alias_list_s handle, adds it to a previous @a ckmc_alias_list_s and returns it.
- *        The alias pointer in the returned @a ckmc_alias_list_s handle points to the provided characters and next is null.
+ * @brief Creates a new @a ckmc_alias_list_s handle, adds it to a previous @a ckmc_alias_list_s and
+ *        returns it. The alias pointer in the returned @a ckmc_alias_list_s handle points to the
+ *        provided characters and next is null.
  *
  * @since_tizen 2.3
  *
- * @param[in]  previous  The last @a ckmc_alias_list_s handle to which a newly created @a ckmc_alias_list_s is added
+ * @param[in]  previous  The last @a ckmc_alias_list_s handle to which a newly created
+ *                       @a ckmc_alias_list_s is added
  * @param[in]  alias     The item to be set in the newly created @a ckmc_alias_list_s
  * @param[out] pplast    The pointer to a newly created and added @a ckmc_alias_list_s handle
  *
@@ -488,11 +520,13 @@ int ckmc_alias_list_new(char *alias, ckmc_alias_list_s **ppalias_list);
  * @see #ckmc_alias_list_s
  */
 int ckmc_alias_list_add(ckmc_alias_list_s *previous,
-        char *alias, ckmc_alias_list_s **pplast);
+                        char *alias,
+                        ckmc_alias_list_s **pplast);
 
 /**
  * @internal
- * @brief Destroys the @a ckmc_alias_list_s handle and releases resources of @a ckmc_alias_list_s from the provided first handle cascadingly.
+ * @brief Destroys the @a ckmc_alias_list_s handle and releases resources of @a ckmc_alias_list_s
+ *        from the provided first handle cascadingly.
  *
  * @since_tizen 2.3
  *
@@ -506,7 +540,8 @@ int ckmc_alias_list_add(ckmc_alias_list_s *previous,
 void ckmc_alias_list_free(ckmc_alias_list_s *first);
 
 /**
- * @brief Destroys the @a ckmc_alias_list_s handle and releases all its resources from the provided first handle cascadingly.
+ * @brief Destroys the @a ckmc_alias_list_s handle and releases all its resources from the provided
+ *        first handle cascadingly.
  *
  * @since_tizen 2.3
  *
@@ -521,11 +556,13 @@ void ckmc_alias_list_all_free(ckmc_alias_list_s *first);
 /**
  * @internal
  * @brief Creates a new @a ckmc_cert_list_s handle and returns it.
- *        The cert pointer in the returned @a ckmc_cert_list_s handle points to the provided @a ckmc_cert_s and next is null.
+ *        The cert pointer in the returned @a ckmc_cert_list_s handle points to the provided
+ *        @a ckmc_cert_s and next is null.
  *
  * @since_tizen 2.3
  *
- * @remarks You must destroy the newly created @a ckmc_cert_list_s by calling ckmc_cert_list_free() or ckmc_cert_list_all_free() if it is no longer needed.
+ * @remarks You must destroy the newly created @a ckmc_cert_list_s by calling ckmc_cert_list_free()
+ *          or ckmc_cert_list_all_free() if it is no longer needed.
  *
  * @param[in]  cert          The first item to be set in the newly created @a ckmc_cert_list_s
  * @param[out] ppalias_list  The pointer to a newly created @a ckmc_alias_list_s handle
@@ -543,12 +580,14 @@ int ckmc_cert_list_new(ckmc_cert_s *cert, ckmc_cert_list_s **ppalias_list);
 
 /**
  * @internal
- * @brief Creates a new @a ckmc_cert_list_s handle, adds it to a previous @a ckmc_cert_list_s and returns it.
- *        The cert pointer in the returned @a ckmc_alias_list_s handle points to the provided @a ckmc_cert_s and next is null.
+ * @brief Creates a new @a ckmc_cert_list_s handle, adds it to a previous @a ckmc_cert_list_s and
+ *        returns it. The cert pointer in the returned @a ckmc_alias_list_s handle points to the
+ *        provided @a ckmc_cert_s and next is null.
  *
  * @since_tizen 2.3
  *
- * @param[in]  previous  The last @a ckmc_cert_list_s handle to which a newly created @a ckmc_cert_list_s is added
+ * @param[in]  previous  The last @a ckmc_cert_list_s handle to which a newly created
+ *                       @a ckmc_cert_list_s is added
  * @param[in]  cert      The item to be set in the newly created @a ckmc_cert_list_s
  * @param[out] pplast    The pointer to a newly created and added @a ckmc_alias_list_s handle
  *
@@ -561,12 +600,12 @@ int ckmc_cert_list_new(ckmc_cert_s *cert, ckmc_cert_list_s **ppalias_list);
  * @see ckmc_cert_list_all_free()
  * @see #ckmc_cert_list_s
  */
-int ckmc_cert_list_add(ckmc_cert_list_s *previous,
-        ckmc_cert_s *cert, ckmc_cert_list_s **pplast);
+int ckmc_cert_list_add(ckmc_cert_list_s *previous, ckmc_cert_s *cert, ckmc_cert_list_s **pplast);
 
 /**
  * @internal
- * @brief Destroys the @a ckmc_cert_list_s handle and releases resources of @a ckmc_cert_list_s from the provided first handle cascadingly.
+ * @brief Destroys the @a ckmc_cert_list_s handle and releases resources of @a ckmc_cert_list_s
+ *        from the provided first handle cascadingly.
  *
  * @since_tizen 2.3
  *
@@ -580,7 +619,8 @@ int ckmc_cert_list_add(ckmc_cert_list_s *previous,
 void ckmc_cert_list_free(ckmc_cert_list_s *first);
 
 /**
- * @brief Destroys the @a ckmc_cert_list_s handle and releases all its resources from the provided first handle cascadingly.
+ * @brief Destroys the @a ckmc_cert_list_s handle and releases all its resources from the provided
+ *        first handle cascadingly.
  *
  * @since_tizen 2.3
  *