1 /*
2 * Copyright (C) 2022 Huawei Technologies Co., Ltd.
3 * Licensed under the Mulan PSL v2.
4 * You can use this software according to the terms and conditions of the Mulan PSL v2.
5 * You may obtain a copy of Mulan PSL v2 at:
6 * http://license.coscl.org.cn/MulanPSL2
7 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
8 * IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
9 * PURPOSE.
10 * See the Mulan PSL v2 for more details.
11 */
12 #include "perm_srv_ta_cert.h"
13 #include <tee_log.h>
14
perm_srv_export_cert_from_storage(uint8_t * dst,uint32_t * dst_len,uint32_t limit)15 TEE_Result perm_srv_export_cert_from_storage(uint8_t *dst, uint32_t *dst_len, uint32_t limit)
16 {
17 (void)dst;
18 (void)dst_len;
19 (void)limit;
20 return TEE_SUCCESS;
21 }
22
perm_srv_import_cert_to_storage(const uint8_t * src,size_t len)23 TEE_Result perm_srv_import_cert_to_storage(const uint8_t *src, size_t len)
24 {
25 (void)src;
26 (void)len;
27 return TEE_SUCCESS;
28 }
29
perm_srv_remove_cert_from_storage(void)30 TEE_Result perm_srv_remove_cert_from_storage(void)
31 {
32 return TEE_SUCCESS;
33 }
34
perm_srv_cert_expiration_alarm(const TEE_Date_Time * time1,const TEE_Date_Time * time2)35 void perm_srv_cert_expiration_alarm(const TEE_Date_Time *time1, const TEE_Date_Time *time2)
36 {
37 (void)time1;
38 (void)time2;
39 return;
40 }
41
perm_srv_get_imported_cert_pubkey(uint8_t * dst,uint32_t * len)42 TEE_Result perm_srv_get_imported_cert_pubkey(uint8_t *dst, uint32_t *len)
43 {
44 (void)dst;
45 *len = 0;
46 return TEE_ERROR_NOT_SUPPORTED;
47 }
48
perm_srv_check_cert_import_enable(const struct config_info * config,uint32_t cmd,bool * is_cert_import_enable)49 TEE_Result perm_srv_check_cert_import_enable(const struct config_info *config, uint32_t cmd,
50 bool *is_cert_import_enable)
51 {
52 if (config == NULL || is_cert_import_enable == NULL) {
53 tloge("invalid params\n");
54 return TEE_ERROR_BAD_PARAMETERS;
55 }
56
57 (void)cmd;
58 *is_cert_import_enable = false;
59
60 return TEE_SUCCESS;
61 }
62