• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2025 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 #include "credential_data_manager.h"
17 
18 #include "common_defs.h"
19 #include "device_auth_defines.h"
20 #include "hc_dev_info.h"
21 #include "hc_types.h"
22 #include "securec.h"
23 
24 static const uint8_t DEFAULT_CRED_PARAM_VAL = 0;
25 
InitQueryCredentialParams(void)26 QueryCredentialParams InitQueryCredentialParams(void)
27 {
28     QueryCredentialParams params = {
29         .deviceId = NULL,
30         .credOwner = NULL,
31         .credId = NULL,
32         .userId = NULL,
33         .credType = DEFAULT_CRED_PARAM_VAL,
34         .ownerUid = DEFAULT_CRED_PARAM_VAL,
35         .subject = DEFAULT_CRED_PARAM_VAL,
36         .issuer = DEFAULT_CRED_PARAM_VAL,
37     };
38     return params;
39 }
40 
CreateCredential(void)41 Credential *CreateCredential(void)
42 {
43     return NULL;
44 }
45 
DestroyCredential(Credential * credential)46 void DestroyCredential(Credential *credential)
47 {
48     (void)credential;
49     return;
50 }
51 
DeepCopyCredential(const Credential * entry)52 Credential *DeepCopyCredential(const Credential *entry)
53 {
54     (void)entry;
55     return NULL;
56 }
57 
ClearCredentialVec(CredentialVec * vec)58 void ClearCredentialVec(CredentialVec *vec)
59 {
60     (void)vec;
61     return;
62 }
63 
GenerateReturnCredInfo(const Credential * credential,CJson * returnJson)64 int32_t GenerateReturnCredInfo(const Credential *credential, CJson *returnJson)
65 {
66     (void)credential;
67     (void)returnJson;
68     return IS_ERR_NOT_SUPPORT;
69 }
70 
AddCredToDb(int32_t osAccountId,const Credential * entry)71 int32_t AddCredToDb(int32_t osAccountId, const Credential *entry)
72 {
73     (void)osAccountId;
74     (void)entry;
75     return IS_ERR_NOT_SUPPORT;
76 }
77 
DelCredential(int32_t osAccountId,const QueryCredentialParams * params)78 int32_t DelCredential(int32_t osAccountId, const QueryCredentialParams *params)
79 {
80     (void)osAccountId;
81     (void)params;
82     return IS_ERR_NOT_SUPPORT;
83 }
84 
QueryCredentials(int32_t osAccountId,const QueryCredentialParams * params,CredentialVec * vec)85 int32_t QueryCredentials(int32_t osAccountId, const QueryCredentialParams *params, CredentialVec *vec)
86 {
87     (void)osAccountId;
88     (void)params;
89     (void)vec;
90     return IS_ERR_NOT_SUPPORT;
91 }
92 
SaveOsAccountCredDb(int32_t osAccountId)93 int32_t SaveOsAccountCredDb(int32_t osAccountId)
94 {
95     (void)osAccountId;
96     return IS_ERR_NOT_SUPPORT;
97 }
98 
InitCredDatabase(void)99 int32_t InitCredDatabase(void)
100 {
101     return IS_ERR_NOT_SUPPORT;
102 }
103 
DestroyCredDatabase(void)104 void DestroyCredDatabase(void)
105 {
106     return;
107 }