Tizen 2.0 Release
[platform/core/messaging/email-service.git] / email-core / include / email-core-cert.h
1 /*
2 *  email-service
3 *
4 * Copyright (c) 2012 - 2013 Samsung Electronics Co., Ltd. All rights reserved.
5 *
6 * Contact: Kyuho Jo <kyuho.jo@samsung.com>, Sunghyun Kwon <sh0701.kwon@samsung.com>
7
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
11 *
12 * http://www.apache.org/licenses/LICENSE-2.0
13 *
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
19 *
20 */
21
22
23 /******************************************************************************
24  * File :  email-core-cert.h
25  * Desc :  Certificate operation Header
26  *
27  * Auth : 
28  *
29  * History : 
30  *    2011.04.14  :  created
31  *****************************************************************************/
32
33 #ifndef EM_CORE_CERT_H_
34 #define EM_CORE_CERT_H_
35
36 #include <openssl/x509.h>
37 #include <openssl/evp.h>
38
39 #include "email-utilities.h"
40 #include "email-types.h"
41
42 INTERNAL_FUNC int emcore_add_public_certificate(char *public_cert_path, char *save_name, int *err_code);
43
44 INTERNAL_FUNC int emcore_delete_public_certificate(char *email_address, int *err_code);
45
46 INTERNAL_FUNC int emcore_verify_signature(char *p7s_file_path, char *mime_entity, int *validity, int *err_code);
47
48 INTERNAL_FUNC int emcore_verify_certificate(char *certificate, int *validity, int *err_code);
49
50 INTERNAL_FUNC int emcore_free_certificate(email_certificate_t **certificate, int count, int *err_code);
51 /*
52 INTERNAL_FUNC int emcore_load_PFX_file(char *certificate, char *password, EVP_PKEY **pri_key, X509 **cert, STACK_OF(X509) **ca, int *err_code);
53 */
54 INTERNAL_FUNC int emcore_load_PFX_file(char *certificate, EVP_PKEY **pri_key, X509 **cert, STACK_OF(X509) **ca, int *err_code);
55
56 #endif