• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2023-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 permission and
13  * limitations under the License.
14  */
15 
16 #include "auth_deviceprofile.h"
17 
IsPotentialTrustedDeviceDp(const char * deviceIdHash,bool isOnlyPointToPoint)18 bool IsPotentialTrustedDeviceDp(const char *deviceIdHash, bool isOnlyPointToPoint)
19 {
20     (void)deviceIdHash;
21     (void)isOnlyPointToPoint;
22     return true;
23 }
24 
DpHasAccessControlProfile(const char * udid,bool isNeedUserId,int32_t localUserId)25 bool DpHasAccessControlProfile(const char *udid, bool isNeedUserId, int32_t localUserId)
26 {
27     (void)udid;
28     (void)isNeedUserId;
29     (void)localUserId;
30     return false;
31 }
32 
UpdateDpSameAccount(UpdateDpAclParams * aclParams,SessionKey sessionKey,bool isNeedUpdateDk,AclWriteState aclState)33 void UpdateDpSameAccount(UpdateDpAclParams *aclParams, SessionKey sessionKey, bool isNeedUpdateDk,
34     AclWriteState aclState)
35 {
36     (void)aclParams;
37     (void)sessionKey;
38     (void)isNeedUpdateDk;
39     (void)aclState;
40 }
41 
DelNotTrustDevice(const char * udid)42 void DelNotTrustDevice(const char *udid)
43 {
44     (void)udid;
45 }
46 
DelSessionKeyProfile(int32_t sessionKeyId)47 void DelSessionKeyProfile(int32_t sessionKeyId)
48 {
49     (void)sessionKeyId;
50 }
51 
GetSessionKeyProfile(int32_t sessionKeyId,uint8_t * sessionKey,uint32_t * length)52 bool GetSessionKeyProfile(int32_t sessionKeyId, uint8_t *sessionKey, uint32_t *length)
53 {
54     (void)sessionKeyId;
55     (void)sessionKey;
56     (void)length;
57     return false;
58 }
59 
GetAccessUkIdSameAccount(const AuthACLInfo * acl,int32_t * ukId,uint64_t * time)60 int32_t GetAccessUkIdSameAccount(const AuthACLInfo *acl, int32_t *ukId, uint64_t *time)
61 {
62     (void)acl;
63     (void)ukId;
64     (void)time;
65     return SOFTBUS_NOT_IMPLEMENT;
66 }
67 
GetAccessUkIdDiffAccountWithUserLevel(const AuthACLInfo * acl,int32_t * ukId,uint64_t * time)68 int32_t GetAccessUkIdDiffAccountWithUserLevel(const AuthACLInfo *acl, int32_t *ukId, uint64_t *time)
69 {
70     (void)acl;
71     (void)ukId;
72     (void)time;
73     return SOFTBUS_AUTH_ACL_NOT_FOUND;
74 }
75 
GetAccessUkIdDiffAccount(const AuthACLInfo * acl,int32_t * ukId,uint64_t * time)76 int32_t GetAccessUkIdDiffAccount(const AuthACLInfo *acl, int32_t *ukId, uint64_t *time)
77 {
78     (void)acl;
79     (void)ukId;
80     (void)time;
81     return SOFTBUS_NOT_IMPLEMENT;
82 }
83 
GetAccessUkByUkId(int32_t sessionKeyId,uint8_t * uk,uint32_t ukLen)84 int32_t GetAccessUkByUkId(int32_t sessionKeyId, uint8_t *uk, uint32_t ukLen)
85 {
86     (void)sessionKeyId;
87     (void)uk;
88     (void)ukLen;
89     return SOFTBUS_NOT_IMPLEMENT;
90 }
91 
UpdateAssetSessionKeyByAcl(AuthACLInfo * info,const uint8_t * sessionKey,uint32_t sessionKeyLen,int32_t * sessionKeyId,bool isSameAccount)92 void UpdateAssetSessionKeyByAcl(
93     AuthACLInfo *info, const uint8_t *sessionKey, uint32_t sessionKeyLen, int32_t *sessionKeyId, bool isSameAccount)
94 {
95     (void)info;
96     (void)sessionKey;
97     (void)sessionKeyLen;
98     (void)sessionKeyId;
99     (void)isSameAccount;
100 }
101 
IsSKIdInvalid(int32_t sessionKeyId,const char * accountHash,const char * udidShortHash,int32_t userId)102 bool IsSKIdInvalid(int32_t sessionKeyId, const char *accountHash, const char *udidShortHash, int32_t userId)
103 {
104     (void)sessionKeyId;
105     (void)accountHash;
106     (void)udidShortHash;
107     (void)userId;
108     return false;
109 }
110 
SelectAllAcl(TrustedInfo ** trustedInfoArray,uint32_t * num)111 int32_t SelectAllAcl(TrustedInfo **trustedInfoArray, uint32_t *num)
112 {
113     (void)trustedInfoArray;
114     (void)num;
115     return SOFTBUS_NOT_IMPLEMENT;
116 }
117 
IsTrustedDeviceFromAccess(const char * peerAccountHash,const char * peerUdid,int32_t peerUserId)118 bool IsTrustedDeviceFromAccess(const char *peerAccountHash, const char *peerUdid, int32_t peerUserId)
119 {
120     (void)peerAccountHash;
121     (void)peerUdid;
122     (void)peerUserId;
123     return false;
124 }