2 * Copyright (c) 2015 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 cert-server-logic.h
18 * @author Madhan A K (madhan.ak@samsung.com)
20 * @brief cert-server routines.
23 #ifndef CERT_SERVER_LOGIC_H_
24 #define CERT_SERVER_LOGIC_H_
26 int getCertificateDetailFromStore(CertStoreType storeType, CertType certType, const char* gname, char* cert);
28 int getCertificateDetailFromSystemStore(const char* gname, char* cert);
30 int deleteCertificateFromStore(CertStoreType storeType, const char* gname);
32 int getCertificateStatusFromStore(CertStoreType storeType, const char* gname, CertStatus *status);
34 int setCertificateStatusToStore(CertStoreType storeType, int is_root_app, const char* gname, CertStatus status);
36 int checkAliasExistsInStore(CertStoreType storeType, const char* alias, int *punique);
38 int installCertificateToStore(CertStoreType storeType, const char* gname, const char *common_name, const char *private_key_gname, const char *associated_gname, const char *pCertBuffer, CertType certType);
40 int getCertificateListFromStore(int reqType, CertStoreType storeType, int is_root_app, char **ppCertListBuffer, size_t *bufferLen, size_t *certCount);
42 int getCertificateAliasFromStore(CertStoreType storeType, const char* gname, char* alias);
44 int loadCertificatesFromStore(CertStoreType storeType, const char* gname, char **ppCertBlockBuffer, size_t *bufferLen, size_t *certBlockCount);
46 int update_ca_certificate_file(char *cert);