1 /*
2  * Copyright (c) 2022 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *    http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef CM_CRYPTO_CHECK_H
17 #define CM_CRYPTO_CHECK_H
18 
19 #include "cm_type_inner.h"
20 
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24 
25 int32_t CheckUri(const struct CmBlob *keyUri);
26 
27 int32_t CmServiceGetSystemCertListCheck(const uint32_t store);
28 
29 int32_t CmServiceGetSystemCertCheck(const uint32_t store, const struct CmBlob *certUri);
30 
31 int32_t CmServiceSetCertStatusCheck(const uint32_t store, const struct CmBlob *certUri, const uint32_t status);
32 
33 int32_t CmServiceInstallAppCertCheck(const struct CmAppCertParam *certParam, struct CmContext *cmContext);
34 
35 int32_t CmServiceUninstallAppCertCheck(struct CmContext *cmContext, const uint32_t store,
36     const struct CmBlob *keyUri);
37 
38 int32_t CmServiceGetAppCertListCheck(const struct CmContext *cmContext, const uint32_t store);
39 
40 int32_t CmServiceGetCallingAppCertListCheck(const struct CmContext *cmContext, const uint32_t store);
41 
42 int32_t CmServiceGetAppCertCheck(struct CmContext *cmContext, const uint32_t store, const struct CmBlob *keyUri);
43 
44 int32_t CmServiceInstallUserCertCheck(struct CmContext *cmContext, const struct CmBlob *userCert,
45     const struct CmBlob *certAlias, const uint32_t userId);
46 
47 int32_t CmServiceUninstallUserCertCheck(struct CmContext *cmContext, const struct CmBlob *certUri);
48 
49 #ifdef __cplusplus
50 }
51 #endif
52 
53 #endif