2 * Copyright (c) 2011 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.
18 * @author Bartlomiej Grzelewski (b.grzelewski@samsung.com)
20 * @brief This is part of C api for ValidationCore.
22 #ifndef _CERTSVC_CINSTANCE_H_
23 #define _CERTSVC_CINSTANCE_H_
25 #include <cert-svc/cerror.h>
31 typedef struct CertSvcInstance_t {
36 * Allocate internal data of CertSvc library and put it in the CertSvcInstance structure.
37 * Initialize Openssl interanal structures.
39 * @param[out] instance Pointer to CertSvcInstance.
40 * @return CERTSVC_SUCCESS or CERTSVC_FAIL.
42 int certsvc_instance_new(CertSvcInstance *instance);
45 * This function will free all allocated data. All certificate identificator will
46 * be released and all strings allocated by certsvc_certificate_get_string field will be
49 * This fucntion does not release CertSvcInstnace!
51 * Plese note: It is safe to use this function after use certsvc_string_free.
53 * @param[in] instance CertSvcInstance object.
55 void certsvc_instance_reset(CertSvcInstance instance);
58 * This function will free all allocated data. All certificate identificator will
59 * be released and all strings allocated by certsvc_certificate_get_string field will be
62 * This fucntion also release CertSvcInstnace!
64 * Please note: It is safe use this function after use certsvc_string_free.
66 * @param[in] instance CertSvcInstance object
68 void certsvc_instance_free(CertSvcInstance instance);
74 #endif // _CERTSVC_CINSTANCE_H_