2 * Copyright (c) 2000 - 2014 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License
17 * @file ckmc-manager.h
19 * @brief provides management functions(storing, retrieving, and removing) for keys, certificates and data of a user and additional crypto functions.
23 #ifndef __TIZEN_CORE_CKMC_MANAGER_H
24 #define __TIZEN_CORE_CKMC_MANAGER_H
27 #include <sys/types.h>
28 #include <ckmc/ckmc-type.h>
29 #include <ckmc/ckmc-error.h>
36 * @addtogroup CAPI_KEY_MANAGER_CLIENT_MODULE
42 * @brief Stores a key inside key manager based on the provided policy.
46 * @privilege %http://tizen.org/privilege/keymanager
48 * @remarks Currently only four types of keys are supported for this API. These are RSA public/private key and ECDSA /private key.
49 * @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.
50 * @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 structure.
51 * @remarks if password in policy is provided, the key is additionally encrypted with the password in policy.
53 * @param[in] alias is the name of a key to be stored
54 * @param[in] key has a key's binary value to be stored.
55 * @param[in] policy is about how to store a key securely.
57 * @return 0 on success, otherwise a negative error value
58 * @exception #CKMC_API_SUCCESS Successful
59 * @exception #CKMC_API_ERROR_INPUT_PARAM input parameter is invalid
60 * @exception #CKMC_API_ERROR_DB_LOCKED a user key is not loaded in memory(a user is not logged in)
61 * @exception #CKMC_API_ERROR_DB_ALIAS_EXISTS alias already exists.
62 * @exception #CKMC_API_ERROR_INVALID_FORMAT the format of raw_key is not valid.
63 * @exception #CKMC_API_ERROR_DB_ERROR failed due to other DB transaction unexpectedly.
65 * @pre User must be already logged in and his user key is already loaded into memory in plain text form.
67 * @see ckmc_remove_key()
69 * @see ckmc_get_key_alias_list()
73 int ckmc_save_key(const char *alias, const ckmc_key key, const ckmc_policy policy);
76 * @brief Removes a key from key manager
80 * @privilege %http://tizen.org/privilege/keymanager
82 * @remarks a client can remove only keys stored by the client.
84 * @param[in] alias is the name of a key to be removed
86 * @return 0 on success, otherwise a negative error value
87 * @exception #CKMC_API_SUCCESS Successful
88 * @exception #CKMC_API_ERROR_INPUT_PARAM input parameter is invalid
89 * @exception #CKMC_API_ERROR_DB_LOCKED a user key is not loaded in memory(a user is not logged in)
90 * @exception #CKMC_API_ERROR_DB_ERROR failed due to the error with unknown reason
91 * @exception #CKMC_API_ERROR_DB_ALIAS_UNKNOWN alias doesn't exists.
93 * @pre User must be already logged in and his user key is already loaded into memory in plain text form.
95 * @see ckmc_save_key()
97 * @see ckmc_get_key_alias_list()
99 int ckmc_remove_key(const char *alias);
102 * @brief Get a key from key manager
106 * @privilege %http://tizen.org/privilege/keymanager
108 * @remarks a client can access only data stored by the client and non-restricted data stored by other clients.
109 * @remarks A newly created ppkey should be destroyed by calling ckmc_key_free() if it is no longer needed.
111 * @param[in] alias is the name of a key to retrieve
112 * @param[in] password is used in decrypting a key value. If password of policy is provided in ckmc_save_key(), the same password should be provided.
113 * @param[out] ppkey is a pointer to a newly created ckmc_key handle
115 * @return 0 on success, otherwise a negative error value
116 * @exception #CKMC_API_SUCCESS Successful
117 * @exception #CKMC_API_ERROR_INPUT_PARAM input parameter is invalid
118 * @exception #CKMC_API_ERROR_DB_LOCKED a user key is not loaded in memory(a user is not logged in)
119 * @exception #CKMC_API_ERROR_DB_ERROR failed due to the error with unknown reason
120 * @exception #CKMC_API_ERROR_DB_ALIAS_UNKNOWN alias doesn't exists.
122 * @pre User must be already logged in and his user key is already loaded into memory in plain text form.
124 * @see ckmc_save_key()
125 * @see ckmc_remove_key()
126 * @see ckmc_get_key_alias_list()
128 int ckmc_get_key(const char *alias, const char *password, ckmc_key **ppkey);
131 * @brief Get a all alias of keys to which the client can access
135 * @privilege %http://tizen.org/privilege/keymanager
137 * @remarks a client can access only data stored by the client and non-restricted data stored by other clients.
138 * @remarks A newly created ppalias_list should be destroyed by calling ckmc_alias_list_all_free() if it is no longer needed.
140 * @param[out] ppalias_list is a pointer to a newly created ckmc_alias_list handle containing all available alias of keys. If there is no available key alias, *ppalias_list will be null.
142 * @return 0 on success, otherwise a negative error value
143 * @exception #CKMC_API_SUCCESS Successful
144 * @exception #CKMC_API_ERROR_INPUT_PARAM input parameter is invalid
145 * @exception #CKMC_API_ERROR_DB_LOCKED a user key is not loaded in memory(a user is not logged in)
146 * @exception #CKMC_API_ERROR_DB_ERROR failed due to the error with unknown reason
147 * @exception #CKMC_API_ERROR_DB_ALIAS_UNKNOWN alias doesn't exists.
149 * @pre User must be already logged in and his user key is already loaded into memory in plain text form.
151 * @see ckmc_save_key()
152 * @see ckmc_remove_key()
153 * @see ckmc_get_key()
155 int ckmc_get_key_alias_list(ckmc_alias_list** ppalias_list);
161 * @brief Stores a certificate inside key manager based on the provided policy.
165 * @privilege %http://tizen.org/privilege/keymanager
167 * @param[in] alias is the name of a certificate to be stored
168 * @param[in] cert has a certificate's binary value to be stored.
169 * @param[in] policy is about how to store a certificate securely.
171 * @return 0 on success, otherwise a negative error value
172 * @exception #CKMC_API_SUCCESS Successful
173 * @exception #CKMC_API_ERROR_INPUT_PARAM input parameter is invalid
174 * @exception #CKMC_API_ERROR_DB_LOCKED a user key is not loaded in memory(a user is not logged in)
175 * @exception #CKMC_API_ERROR_DB_ALIAS_EXISTS alias already exists.
176 * @exception #CKMC_API_ERROR_INVALID_FORMAT the format of raw_cert is not valid.
177 * @exception #CKMC_API_ERROR_DB_ERROR failed due to other DB transaction unexpectedly.
179 * @pre User must be already logged in and his user key is already loaded into memory in plain text form.
181 * @see ckmc_remove_cert()
182 * @see ckmc_get_cert()
183 * @see ckmc_get_cert_alias_list()
187 int ckmc_save_cert(const char *alias, const ckmc_cert cert, const ckmc_policy policy);
190 * @brief Removes a certificate from key manager
194 * @privilege %http://tizen.org/privilege/keymanager
196 * @remarks a client can remove only certificates stored by the client.
198 * @param[in] alias is the name of a certificate to be removed
200 * @return 0 on success, otherwise a negative error value
201 * @exception #CKMC_API_SUCCESS Successful
202 * @exception #CKMC_API_ERROR_INPUT_PARAM input parameter is invalid
203 * @exception #CKMC_API_ERROR_DB_LOCKED a user key is not loaded in memory(a user is not logged in)
204 * @exception #CKMC_API_ERROR_DB_ERROR failed due to the error with unknown reason
205 * @exception #CKMC_API_ERROR_DB_ALIAS_UNKNOWN alias doesn't exists.
207 * @pre User must be already logged in and his user key is already loaded into memory in plain text form.
209 * @see ckmc_save_cert()
210 * @see ckmc_get_cert()
211 * @see ckmc_get_cert_alias_list()
213 int ckmc_remove_cert(const char *alias);
216 * @brief Get a certificate from key manager
220 * @privilege %http://tizen.org/privilege/keymanager
222 * @remarks a client can access only certificate stored by the client and non-restricted certificate stored by other clients.
223 * @remarks A newly created ppcert should be destroyed by calling ckmc_cert_free() if it is no longer needed.
225 * @param[in] alias is the name of a certificate to retrieve
226 * @param[in] password is used in decrypting a certificate value. If password of policy is provided in ckmc_save_cert(), the same password should be provided.
227 * @param[out] ppcert is a pointer to a newly created ckmc_cert handle
229 * @return 0 on success, otherwise a negative error value
230 * @exception #CKMC_API_SUCCESS Successful
231 * @exception #CKMC_API_ERROR_INPUT_PARAM input parameter is invalid
232 * @exception #CKMC_API_ERROR_DB_LOCKED a user key is not loaded in memory(a user is not logged in)
233 * @exception #CKMC_API_ERROR_DB_ERROR failed due to the error with unknown reason
234 * @exception #CKMC_API_ERROR_DB_ALIAS_UNKNOWN alias doesn't exists.
236 * @pre User must be already logged in and his user key is already loaded into memory in plain text form.
238 * @see ckmc_save_cert()
239 * @see ckmc_remove_cert()
240 * @see ckmc_get_cert_alias_list()
242 int ckmc_get_cert(const char *alias, const char *password, ckmc_cert **ppcert);
245 * @brief Get a all alias of certificates to which the client can access
249 * @privilege %http://tizen.org/privilege/keymanager
251 * @remarks a client can access only data stored by the client and non-restricted data stored by other clients.
252 * @remarks A newly created ppalias_list should be destroyed by calling ckmc_alias_list_all_free() if it is no longer needed.
254 * @param[out] ppalias_list is a pointer to a newly created ckmc_alias_list handle containing all available alias of keys. If there is no available key alias, *ppalias_list will be null.
256 * @return 0 on success, otherwise a negative error value
257 * @exception #CKMC_API_SUCCESS Successful
258 * @exception #CKMC_API_ERROR_INPUT_PARAM input parameter is invalid
259 * @exception #CKMC_API_ERROR_DB_LOCKED a user key is not loaded in memory(a user is not logged in)
260 * @exception #CKMC_API_ERROR_DB_ERROR failed due to the error with unknown reason
261 * @exception #CKMC_API_ERROR_DB_ALIAS_UNKNOWN alias doesn't exists.
263 * @pre User must be already logged in and his user key is already loaded into memory in plain text form.
265 * @see ckmc_save_cert()
266 * @see ckmc_remove_cert()
267 * @see ckmc_get_cert()
269 int ckmc_get_cert_alias_list(ckmc_alias_list** ppalias_list);
275 * @brief Stores a data inside key manager based on the provided policy.
279 * @privilege %http://tizen.org/privilege/keymanager
281 * @param[in] alias is the name of a data to be stored
282 * @param[in] data has a binary value to be stored.
283 * @param[in] policy is about how to store a data securely.
285 * @return 0 on success, otherwise a negative error value
286 * @exception #CKMC_API_SUCCESS Successful
287 * @exception #CKMC_API_ERROR_INPUT_PARAM input parameter is invalid
288 * @exception #CKMC_API_ERROR_DB_LOCKED a user key is not loaded in memory(a user is not logged in)
289 * @exception #CKMC_API_ERROR_DB_ALIAS_EXISTS alias already exists.
290 * @exception #CKMC_API_ERROR_DB_ERROR failed due to other DB transaction unexpectedly.
292 * @pre User must be already logged in and his user key is already loaded into memory in plain text form.
294 * @see ckmc_remove_data()
295 * @see ckmc_get_data()
296 * @see ckmc_get_data_alias_list()
297 * @see #ckmc_raw_buffer
300 int ckmc_save_data(const char *alias, ckmc_raw_buffer data, const ckmc_policy policy);
303 * @brief Removes a data from key manager
307 * @privilege %http://tizen.org/privilege/keymanager
309 * @remarks a client can remove only data stored by the client.
311 * @param[in] alias is the name of a data to be removed
313 * @return 0 on success, otherwise a negative error value
314 * @exception #CKMC_API_SUCCESS Successful
315 * @exception #CKMC_API_ERROR_INPUT_PARAM input parameter is invalid
316 * @exception #CKMC_API_ERROR_DB_LOCKED a user key is not loaded in memory(a user is not logged in)
317 * @exception #CKMC_API_ERROR_DB_ERROR failed due to the error with unknown reason
318 * @exception #CKMC_API_ERROR_DB_ALIAS_UNKNOWN alias doesn't exists.
320 * @pre User must be already logged in and his user key is already loaded into memory in plain text form.
322 * @see ckmc_save_data()
323 * @see ckmc_get_data()
324 * @see ckmc_get_data_alias_list()
326 int ckmc_remove_data(const char *alias);
329 * @brief Get a data from key manager
333 * @privilege %http://tizen.org/privilege/keymanager
335 * @remarks a client can access only data stored by the client and non-restricted data stored by other clients.
336 * @remarks A newly created ppdata should be destroyed by calling ckmc_buffer_free() if it is no longer needed.
338 * @param[in] alias is the name of a data to retrieve
339 * @param[in] password is used in decrypting a data value. If password of policy is provided in ckmc_save_data(), the same password should be provided.
340 * @param[out] ppdata is a pointer to a newly created ckmc_raw_buffer handle
342 * @return 0 on success, otherwise a negative error value
343 * @exception #CKMC_API_SUCCESS Successful
344 * @exception #CKMC_API_ERROR_INPUT_PARAM input parameter is invalid
345 * @exception #CKMC_API_ERROR_DB_LOCKED a user key is not loaded in memory(a user is not logged in)
346 * @exception #CKMC_API_ERROR_DB_ERROR failed due to the error with unknown reason
347 * @exception #CKMC_API_ERROR_DB_ALIAS_UNKNOWN alias doesn't exists.
349 * @pre User must be already logged in and his user key is already loaded into memory in plain text form.
351 * @see ckmc_save_data()
352 * @see ckmc_remove_data()
353 * @see ckmc_get_data_alias_list()
355 int ckmc_get_data(const char *alias, const char *password, ckmc_raw_buffer **ppdata);
358 * @brief Get a all alias of data to which the client can access
362 * @privilege %http://tizen.org/privilege/keymanager
364 * @remarks a client can access only data stored by the client and non-restricted data stored by other clients.
365 * @remarks A newly created ppalias_list should be destroyed by calling ckmc_alias_list_all_free() if it is no longer needed.
367 * @param[out] ppalias_list is a pointer to a newly created ckmc_alias_list handle containing all available alias of keys. If there is no available key alias, *ppalias_list will be null.
369 * @return 0 on success, otherwise a negative error value
370 * @exception #CKMC_API_SUCCESS Successful
371 * @exception #CKMC_API_ERROR_INPUT_PARAM input parameter is invalid
372 * @exception #CKMC_API_ERROR_DB_LOCKED a user key is not loaded in memory(a user is not logged in)
373 * @exception #CKMC_API_ERROR_DB_ERROR failed due to the error with unknown reason
374 * @exception #CKMC_API_ERROR_DB_ALIAS_UNKNOWN alias doesn't exists.
376 * @pre User must be already logged in and his user key is already loaded into memory in plain text form.
378 * @see ckmc_save_data()
379 * @see ckmc_remove_data()
380 * @see ckmc_get_data()
382 int ckmc_get_data_alias_list(ckmc_alias_list** ppalias_list);
388 * @brief Creates RSA private/public key pair and stores them inside key manager based on each policy.
392 * @privilege %http://tizen.org/privilege/keymanager
394 * @remarks if password in policy is provided, the key is additionally encrypted with the password in policy.
396 * @param[in] size is the size of key strength to be created. 1024, 2048, and 4096 are supported.
397 * @param[in] private_key_alias is the name of private key to be stored.
398 * @param[in] public_key_alias is the name of public key to be stored.
399 * @param[in] policy_private_key is about how to store a private key securely.
400 * @param[in] policy_public_key is about how to store a public key securely.
402 * @return 0 on success, otherwise a negative error value
403 * @exception #CKMC_API_SUCCESS Successful
404 * @exception #CKMC_API_ERROR_INPUT_PARAM input parameter is invalid
405 * @exception #CKMC_API_ERROR_DB_LOCKED a user key is not loaded in memory(a user is not logged in)
406 * @exception #CKMC_API_ERROR_DB_ALIAS_EXISTS alias already exists.
407 * @exception #CKMC_API_ERROR_DB_ERROR failed due to other DB transaction unexpectedly.
409 * @pre User must be already logged in and his user key is already loaded into memory in plain text form.
411 * @see ckmc_create_key_pair_ecdsa()
412 * @see ckmc_create_signature()
413 * @see ckmc_verify_signature()
415 int ckmc_create_key_pair_rsa(const size_t size, const char *private_key_alias, const char *public_key_alias, const ckmc_policy policy_private_key, const ckmc_policy policy_public_key);
418 * @brief Creates ECDSA private/public key pair and stores them inside key manager based on each policy.
422 * @privilege %http://tizen.org/privilege/keymanager
424 * @remarks if password in policy is provided, the key is additionally encrypted with the password in policy.
426 * @param[in] type is the type of eliptic curve of ECDSA.
427 * @param[in] private_key_alias is the name of private key to be stored.
428 * @param[in] public_key_alias is the name of public key to be stored.
429 * @param[in] policy_private_key is about how to store a private key securely.
430 * @param[in] policy_public_key is about how to store a public key securely.
432 * @return 0 on success, otherwise a negative error value
433 * @exception #CKMC_API_SUCCESS Successful
434 * @exception #CKMC_API_ERROR_INPUT_PARAM input parameter is invalid
435 * @exception #CKMC_API_ERROR_DB_LOCKED a user key is not loaded in memory(a user is not logged in)
436 * @exception #CKMC_API_ERROR_DB_ALIAS_EXISTS alias already exists.
437 * @exception #CKMC_API_ERROR_DB_ERROR failed due to other DB transaction unexpectedly.
439 * @pre User must be already logged in and his user key is already loaded into memory in plain text form.
441 * @see ckmc_create_key_pair_rsa()
442 * @see ckmc_create_signature()
443 * @see ckmc_verify_signature()
446 int ckmc_create_key_pair_ecdsa(const ckmc_ec_type type, const char *private_key_alias, const char *public_key_alias, const ckmc_policy policy_private_key, const ckmc_policy policy_public_key);
449 * @brief Creates a signature on a given message using a private key and returns the signature
453 * @privilege %http://tizen.org/privilege/keymanager
455 * @remarks If password of policy is provided during storing a key, the same password should be provided.
456 * @remarks A newly created ppsignature should be destroyed by calling ckmc_buffer_free() if it is no longer needed.
459 * @param[in] private_key_alias is the name of private key.
460 * @param[in] password is used in decrypting a private key value.
461 * @param[in] message is signed with a private key .
462 * @param[in] hash is the hash algorithm used in creating signature.
463 * @param[in] padding is the RSA padding algorithm used in creating signature. It is used only when the signature algorithm is RSA.
464 * @param[out] ppsignature is a pointer to a newly created signature's. If an error occurs, *ppsignature will be null.
466 * @return 0 on success, otherwise a negative error value
467 * @exception #CKMC_API_SUCCESS Successful
468 * @exception #CKMC_API_ERROR_INPUT_PARAM input parameter is invalid
469 * @exception #CKMC_API_ERROR_DB_LOCKED a user key is not loaded in memory(a user is not logged in)
470 * @exception #CKMC_API_ERROR_DB_ALIAS_UNKNOWN alias doesn't exists.
472 * @pre User must be already logged in and his user key is already loaded into memory in plain text form.
474 * @see ckmc_create_key_pair_rsa()
475 * @see ckmc_create_key_pair_ecdsa()
476 * @see ckmc_verify_signature()
477 * @see ckmc_buffer_free()
478 * @see #ckmc_hash_algo
479 * @see #ckmc_rsa_padding_algo
481 int ckmc_create_signature(const char *private_key_alias, const char *password, const ckmc_raw_buffer message, const ckmc_hash_algo hash, const ckmc_rsa_padding_algo padding, ckmc_raw_buffer **ppsignature);
484 * @brief Verify a given signature on a given message using a public key and returns the signature status.
488 * @privilege %http://tizen.org/privilege/keymanager
490 * @remarks If password of policy is provided during storing a key, the same password should be provided.
492 * @param[in] public_key_alias is the name of public key.
493 * @param[in] password is used in decrypting a public key value.
494 * @param[in] message is a input on which the signature is created.
495 * @param[in] signature is verified with public key.
496 * @param[in] hash is the hash algorithm used in verifying signature.
497 * @param[in] padding is the RSA padding algorithm used in verifying signature. It is used only when the signature algorithm is RSA.
499 * @return 0 on success and the signature is valid, otherwise a negative error value
500 * @exception #CKMC_API_SUCCESS Successful
501 * @exception #CKMC_API_ERROR_VERIFICATION_FAILED the signature is invalid
502 * @exception #CKMC_API_ERROR_INPUT_PARAM input parameter is invalid
503 * @exception #CKMC_API_ERROR_DB_LOCKED a user key is not loaded in memory(a user is not logged in)
504 * @exception #CKMC_API_ERROR_DB_ALIAS_UNKNOWN alias doesn't exists.
506 * @pre User must be already logged in and his user key is already loaded into memory in plain text form.
508 * @see ckmc_create_key_pair_rsa()
509 * @see ckmc_create_key_pair_ecdsa()
510 * @see ckmc_verify_signature()
511 * @see #ckmc_hash_algo
512 * @see #ckmc_rsa_padding_algo
514 int ckmc_verify_signature(const char *public_key_alias, const char *password, const ckmc_raw_buffer message, const ckmc_raw_buffer signature, const ckmc_hash_algo hash, const ckmc_rsa_padding_algo padding);
517 * @brief Verify a certificate chain and return that chain.
521 * @privilege %http://tizen.org/privilege/keymanager
523 * @remarks The trusted root certificate of the chain should exist in the system's certificate storage.
524 * @remarks A newly created ppcert_chain_list should be destroyed by calling ckmc_cert_list_all_free() if it is no longer needed.
526 * @param[in] cert is the certificate to be verified
527 * @param[in] untrustedcerts is the untrusted CA certificates to be used in verifying a certificate chain.
528 * @param[out] ppcert_chain_list is a pointer to a newly created certificate chain's handle. If an error occurs, *ppcert_chain_list will be null.
530 * @return 0 on success and the signature is valid, otherwise a negative error value
531 * @exception #CKMC_API_SUCCESS Successful
532 * @exception #CKMC_API_ERROR_VERIFICATION_FAILED the certificate chain is not valid
533 * @exception #CKMC_API_ERROR_INPUT_PARAM input parameter is invalid
534 * @exception #CKMC_API_ERROR_DB_LOCKED a user key is not loaded in memory(a user is not logged in)
535 * @exception #CKMC_API_ERROR_INVALID_FORMAT the format of certificate is not valid.
537 * @pre User must be already logged in and his user key is already loaded into memory in plain text form.
539 * @see ckmc_get_cert_chain_with_alias())
540 * @see ckmc_cert_list_all_free()
542 int ckmc_get_cert_chain(const ckmc_cert *cert, const ckmc_cert_list *untrustedcerts, ckmc_cert_list **ppcert_chain_list);
545 * @brief Verify a certificate chain using a alias list of untrusted certificates and return that chain.
549 * @privilege %http://tizen.org/privilege/keymanager
551 * @remarks The trusted root certificate of the chain should exist in the system's certificate storage.
552 * @remarks A newly created ppcert_chain_list should be destroyed by calling ckmc_cert_list_all_free() if it is no longer needed.
554 * @param[in] cert is the certificate to be verified
555 * @param[in] untrustedcerts is an alias list of untrusted CA certificates stored in key manager to be used in verifying a certificate chain.
556 * @param[out] ppcert_chain_list is a pointer to a newly created certificate chain's handle. If an error occurs, *ppcert_chain_list will be null.
558 * @return 0 on success and the signature is valid, otherwise a negative error value
559 * @exception #CKMC_API_SUCCESS Successful
560 * @exception #CKMC_API_ERROR_VERIFICATION_FAILED the certificate chain is not valid
561 * @exception #CKMC_API_ERROR_INPUT_PARAM input parameter is invalid
562 * @exception #CKMC_API_ERROR_DB_LOCKED a user key is not loaded in memory(a user is not logged in)
563 * @exception #CKMC_API_ERROR_DB_ALIAS_UNKNOWN alias doesn't exists.
564 * @exception #CKMC_API_ERROR_INVALID_FORMAT the format of certificate is not valid.
566 * @pre User must be already logged in and his user key is already loaded into memory in plain text form.
568 * @see ckmc_get_cert_chain())
569 * @see ckmc_cert_list_all_free()
571 int ckmc_get_cert_chain_with_alias(const ckmc_cert *cert, const ckmc_alias_list *untrustedcerts, ckmc_cert_list **ppcert_chain_list);
583 #endif /* __TIZEN_CORE_CKMC_MANAGER_H */