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