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 #include "auth_meta_manager.h"
17 #include "auth_common.h"
18
AuthMetaStartVerify(uint32_t connectionId,const uint8_t * key,uint32_t keyLen,uint32_t requestId,int32_t callingPid,const AuthVerifyCallback * callBack)19 int32_t AuthMetaStartVerify(uint32_t connectionId, const uint8_t *key, uint32_t keyLen,
20 uint32_t requestId, int32_t callingPid, const AuthVerifyCallback *callBack)
21 {
22 (void)connectionId;
23 (void)key;
24 (void)keyLen;
25 (void)requestId;
26 (void)callingPid;
27 (void)callBack;
28 SoftBusLog(SOFTBUS_LOG_AUTH, SOFTBUS_LOG_INFO, "auth meta start verify");
29 return SOFTBUS_NOT_IMPLEMENT;
30 }
31
AuthMetaReleaseVerify(int64_t authId)32 void AuthMetaReleaseVerify(int64_t authId)
33 {
34 (void)authId;
35 SoftBusLog(SOFTBUS_LOG_AUTH, SOFTBUS_LOG_INFO, "auth meta release verify");
36 }
37
AuthMetaEncrypt(int64_t authId,const uint8_t * inData,uint32_t inLen,uint8_t * outData,uint32_t * outLen)38 int32_t AuthMetaEncrypt(int64_t authId, const uint8_t *inData, uint32_t inLen, uint8_t *outData, uint32_t *outLen)
39 {
40 (void)authId;
41 (void)inData;
42 (void)inLen;
43 (void)outData;
44 (void)outLen;
45 SoftBusLog(SOFTBUS_LOG_AUTH, SOFTBUS_LOG_INFO, "auth meta encrypt data");
46 return SOFTBUS_NOT_IMPLEMENT;
47 }
48
AuthMetaDecrypt(int64_t authId,const uint8_t * inData,uint32_t inLen,uint8_t * outData,uint32_t * outLen)49 int32_t AuthMetaDecrypt(int64_t authId, const uint8_t *inData, uint32_t inLen, uint8_t *outData, uint32_t *outLen)
50 {
51 (void)authId;
52 (void)inData;
53 (void)inLen;
54 (void)outData;
55 (void)outLen;
56 SoftBusLog(SOFTBUS_LOG_AUTH, SOFTBUS_LOG_INFO, "auth meta decrypt data");
57 return SOFTBUS_NOT_IMPLEMENT;
58 }
59
AuthMetaGetPreferConnInfo(const char * uuid,AuthConnInfo * connInfo)60 int32_t AuthMetaGetPreferConnInfo(const char *uuid, AuthConnInfo *connInfo)
61 {
62 (void)uuid;
63 (void)connInfo;
64 SoftBusLog(SOFTBUS_LOG_AUTH, SOFTBUS_LOG_INFO, "auth meta get prefer conninfo");
65 return SOFTBUS_NOT_IMPLEMENT;
66 }
67
AuthMetaOpenConn(const AuthConnInfo * info,uint32_t requestId,const AuthConnCallback * callback)68 int32_t AuthMetaOpenConn(const AuthConnInfo *info, uint32_t requestId, const AuthConnCallback *callback)
69 {
70 (void)info;
71 (void)requestId;
72 (void)callback;
73 SoftBusLog(SOFTBUS_LOG_AUTH, SOFTBUS_LOG_INFO, "auth meta open connection");
74 return SOFTBUS_NOT_IMPLEMENT;
75 }
76
AuthMetaCloseConn(int64_t authId)77 void AuthMetaCloseConn(int64_t authId)
78 {
79 (void)authId;
80 SoftBusLog(SOFTBUS_LOG_AUTH, SOFTBUS_LOG_INFO, "auth meta close connection");
81 }
82
AuthMetaPostTransData(int64_t authId,const AuthTransData * dataInfo)83 int32_t AuthMetaPostTransData(int64_t authId, const AuthTransData *dataInfo)
84 {
85 (void)authId;
86 (void)dataInfo;
87 SoftBusLog(SOFTBUS_LOG_AUTH, SOFTBUS_LOG_INFO, "auth meta start post transdata");
88 return SOFTBUS_NOT_IMPLEMENT;
89 }
90
AuthMetaGetIdByConnInfo(const AuthConnInfo * connInfo,bool isServer)91 int64_t AuthMetaGetIdByConnInfo(const AuthConnInfo *connInfo, bool isServer)
92 {
93 (void)connInfo;
94 (void)isServer;
95 SoftBusLog(SOFTBUS_LOG_AUTH, SOFTBUS_LOG_INFO, "auth meta get auth id by connection info");
96 return SOFTBUS_NOT_IMPLEMENT;
97 }
98
AuthMetaGetIdByUuid(const char * uuid,AuthLinkType type,bool isServer)99 int64_t AuthMetaGetIdByUuid(const char *uuid, AuthLinkType type, bool isServer)
100 {
101 (void)uuid;
102 (void)type;
103 (void)isServer;
104 SoftBusLog(SOFTBUS_LOG_AUTH, SOFTBUS_LOG_INFO, "auth meta get auth id by uuid");
105 return SOFTBUS_NOT_IMPLEMENT;
106 }
107
AuthMetaSetP2pMac(int64_t authId,const char * p2pMac)108 int32_t AuthMetaSetP2pMac(int64_t authId, const char *p2pMac)
109 {
110 (void)authId;
111 (void)p2pMac;
112 SoftBusLog(SOFTBUS_LOG_AUTH, SOFTBUS_LOG_INFO, "auth meta set p2p mac info by auth id");
113 return SOFTBUS_NOT_IMPLEMENT;
114 }
115
AuthMetaGetConnInfo(int64_t authId,AuthConnInfo * connInfo)116 int32_t AuthMetaGetConnInfo(int64_t authId, AuthConnInfo *connInfo)
117 {
118 (void)authId;
119 (void)connInfo;
120 SoftBusLog(SOFTBUS_LOG_AUTH, SOFTBUS_LOG_INFO, "auth meta get connection info by auth id");
121 return SOFTBUS_NOT_IMPLEMENT;
122 }
123
AuthMetaGetServerSide(int64_t authId,bool * isServer)124 int32_t AuthMetaGetServerSide(int64_t authId, bool *isServer)
125 {
126 (void)authId;
127 (void)isServer;
128 SoftBusLog(SOFTBUS_LOG_AUTH, SOFTBUS_LOG_INFO, "auth meta get server side");
129 return SOFTBUS_NOT_IMPLEMENT;
130 }
131
AuthMetaGetDeviceUuid(int64_t authId,char * uuid,uint16_t size)132 int32_t AuthMetaGetDeviceUuid(int64_t authId, char *uuid, uint16_t size)
133 {
134 (void)authId;
135 (void)uuid;
136 (void)size;
137 SoftBusLog(SOFTBUS_LOG_AUTH, SOFTBUS_LOG_INFO, "auth meta get device uuid by auth id");
138 return SOFTBUS_NOT_IMPLEMENT;
139 }
140
AuthMetaGetVersion(int64_t authId,SoftBusVersion * version)141 int32_t AuthMetaGetVersion(int64_t authId, SoftBusVersion *version)
142 {
143 (void)authId;
144 (void)version;
145 SoftBusLog(SOFTBUS_LOG_AUTH, SOFTBUS_LOG_INFO, "auth meta get version by auth id");
146 return SOFTBUS_NOT_IMPLEMENT;
147 }
148
AuthMetaInit(const AuthTransCallback * callback)149 int32_t AuthMetaInit(const AuthTransCallback *callback)
150 {
151 (void)callback;
152 SoftBusLog(SOFTBUS_LOG_AUTH, SOFTBUS_LOG_INFO, "auth meta init");
153 return SOFTBUS_OK;
154 }
155
AuthMetaDeinit(void)156 void AuthMetaDeinit(void)
157 {
158 SoftBusLog(SOFTBUS_LOG_AUTH, SOFTBUS_LOG_INFO, "auth meta deinit");
159 return;
160 }
161
DelAuthMetaManagerByPid(const char * pkgName,int32_t pid)162 void DelAuthMetaManagerByPid(const char *pkgName, int32_t pid)
163 {
164 (void)pkgName;
165 (void)pid;
166 return;
167 }
168