1 /*
2  * Copyright (c) 2022-2024 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 #ifndef OHOS_DM_AUTH_MANAGER_H
17 #define OHOS_DM_AUTH_MANAGER_H
18 
19 #include <map>
20 #include <string>
21 
22 #include "auth_request_state.h"
23 #include "auth_response_state.h"
24 #include "auth_ui_state_manager.h"
25 #include "authentication.h"
26 #include "idevice_manager_service_listener.h"
27 #include "deviceprofile_connector.h"
28 #include "dm_ability_manager.h"
29 #include "dm_adapter_manager.h"
30 #include "dm_constants.h"
31 #include "dm_device_info.h"
32 #include "dm_timer.h"
33 #include "hichain_auth_connector.h"
34 #include "hichain_connector.h"
35 #include "softbus_connector.h"
36 #include "softbus_session.h"
37 
38 namespace OHOS {
39 namespace DistributedHardware {
40 typedef enum AuthState {
41     AUTH_REQUEST_INIT = 1,
42     AUTH_REQUEST_NEGOTIATE,
43     AUTH_REQUEST_NEGOTIATE_DONE,
44     AUTH_REQUEST_REPLY,
45     AUTH_REQUEST_JOIN,
46     AUTH_REQUEST_NETWORK,
47     AUTH_REQUEST_FINISH,
48     AUTH_REQUEST_CREDENTIAL,
49     AUTH_REQUEST_CREDENTIAL_DONE,
50     AUTH_REQUEST_DELETE_INIT,
51     AUTH_REQUEST_SYNCDELETE,
52     AUTH_REQUEST_SYNCDELETE_DONE,
53 
54     AUTH_RESPONSE_INIT = 20,
55     AUTH_RESPONSE_NEGOTIATE,
56     AUTH_RESPONSE_CONFIRM,
57     AUTH_RESPONSE_GROUP,
58     AUTH_RESPONSE_SHOW,
59     AUTH_RESPONSE_FINISH,
60     AUTH_RESPONSE_CREDENTIAL,
61     AUTH_RESPONSE_SYNCDELETE,
62     AUTH_RESPONSE_SYNCDELETE_DONE,
63 } AuthState;
64 
65 enum DmMsgType : int32_t {
66     MSG_TYPE_UNKNOWN = 0,
67     MSG_TYPE_NEGOTIATE = 80,
68     MSG_TYPE_RESP_NEGOTIATE = 90,
69     MSG_TYPE_REQ_AUTH = 100,
70     MSG_TYPE_INVITE_AUTH_INFO = 102,
71     MSG_TYPE_REQ_AUTH_TERMINATE = 104,
72     MSG_TYPE_RESP_AUTH = 200,
73     MSG_TYPE_JOIN_AUTH_INFO = 201,
74     MSG_TYPE_RESP_AUTH_TERMINATE = 205,
75     MSG_TYPE_CHANNEL_CLOSED = 300,
76     MSG_TYPE_SYNC_GROUP = 400,
77     MSG_TYPE_AUTH_BY_PIN = 500,
78 
79     MSG_TYPE_RESP_AUTH_EXT,
80     MSG_TYPE_REQ_PUBLICKEY,
81     MSG_TYPE_RESP_PUBLICKEY,
82     MSG_TYPE_REQ_SYNC_DELETE,
83     MSG_TYPE_REQ_SYNC_DELETE_DONE,
84     MSG_TYPE_REQ_AUTH_DEVICE_NEGOTIATE = 600,
85     MSG_TYPE_RESP_AUTH_DEVICE_NEGOTIATE = 700,
86 };
87 
88 enum DmAuthType : int32_t {
89     AUTH_TYPE_CRE = 0,
90     AUTH_TYPE_PIN,
91     AUTH_TYPE_QR_CODE,
92     AUTH_TYPE_NFC,
93     AUTH_TYPE_NO_INTER_ACTION,
94     AUTH_TYPE_IMPORT_AUTH_CODE,
95     AUTH_TYPE_UNKNOW,
96 };
97 
98 typedef struct DmAuthRequestContext {
99     int32_t authType;
100     std::string localDeviceId;
101     std::string localDeviceName;
102     int32_t localDeviceTypeId;
103     std::string deviceId;
104     std::string deviceName;
105     std::string deviceTypeId;
106     int32_t sessionId;
107     int32_t groupVisibility;
108     bool cryptoSupport;
109     std::string cryptoName;
110     std::string cryptoVer;
111     std::string hostPkgName;
112     std::string targetPkgName;
113     std::string appOperation;
114     std::string appDesc;
115     std::string appName;
116     std::string customDesc;
117     std::string appThumbnail;
118     std::string token;
119     int32_t reason;
120     std::vector<std::string> syncGroupList;
121     std::string dmVersion;
122     int32_t localUserId;
123     std::string localAccountId;
124     std::vector<int32_t> bindType;
125     bool isOnline;
126     bool authed;
127     int32_t bindLevel;
128     int64_t tokenId;
129     std::string remoteAccountId;
130     int32_t remoteUserId;
131     std::string ip;
132     std::string hostPkgLabel;
133 } DmAuthRequestContext;
134 
135 typedef struct DmAuthResponseContext {
136     int32_t authType;
137     std::string deviceId;
138     std::string localDeviceId;
139     std::string deviceName;
140     int32_t deviceTypeId;
141     int32_t msgType;
142     int32_t sessionId;
143     bool cryptoSupport;
144     bool isIdenticalAccount;
145     bool isAuthCodeReady;
146     bool isShowDialog;
147     std::string cryptoName;
148     std::string cryptoVer;
149     int32_t reply;
150     std::string networkId;
151     std::string groupId;
152     std::string groupName;
153     std::string hostPkgName;
154     std::string targetPkgName;
155     std::string appOperation;
156     std::string appDesc;
157     std::string customDesc;
158     std::string appIcon;
159     std::string appThumbnail;
160     std::string token;
161     std::string authToken;
162     int32_t pageId;
163     int64_t requestId;
164     int32_t code;
165     int32_t state;
166     std::vector<std::string> syncGroupList;
167     std::string accountGroupIdHash;
168     std::string publicKey;
169     bool isOnline;
170     int32_t bindLevel;
171     bool haveCredential;
172     int32_t confirmOperation;
173     std::string localAccountId;
174     int32_t localUserId;
175     int64_t tokenId;
176     bool authed;
177     std::string dmVersion;
178     std::vector<int32_t> bindType;
179     std::string remoteAccountId;
180     int32_t remoteUserId;
181     std::string targetDeviceName;
182     std::string importAuthCode;
183     std::string hostPkgLabel;
184     bool isFinish = false;
185     std::string edition;
186 } DmAuthResponseContext;
187 
188 class AuthMessageProcessor;
189 
190 class DmAuthManager final : public ISoftbusSessionCallback,
191                             public IHiChainConnectorCallback,
192                             public IDmDeviceAuthCallback,
193                             public std::enable_shared_from_this<DmAuthManager> {
194 public:
195     DmAuthManager(std::shared_ptr<SoftbusConnector> softbusConnector,
196                   std::shared_ptr<HiChainConnector> hiChainConnector,
197                   std::shared_ptr<IDeviceManagerServiceListener> listener,
198                   std::shared_ptr<HiChainAuthConnector> hiChainAuthConnector);
199     ~DmAuthManager();
200 
201     /**
202      * @tc.name: DmAuthManager::AuthenticateDevice
203      * @tc.desc: Authenticate Device of the DeviceManager Authenticate Manager
204      * @tc.type: FUNC
205      */
206     int32_t AuthenticateDevice(const std::string &pkgName, int32_t authType, const std::string &deviceId,
207                                const std::string &extra);
208 
209     /**
210      * @tc.name: DmAuthManager::UnAuthenticateDevice
211      * @tc.desc: UnAuthenticate Device of the DeviceManager Authenticate Manager
212      * @tc.type: FUNC
213      */
214     int32_t UnAuthenticateDevice(const std::string &pkgName, const std::string &networkId);
215 
216     /**
217      * @brief UnBind device.
218      * @param pkgName package name.
219      * @param deviceId device id.
220      * @return Return 0 if success.
221      */
222     int32_t UnBindDevice(const std::string &pkgName, const std::string &udidHash);
223 
224     /**
225      * @tc.name: DmAuthManager::OnSessionOpened
226      * @tc.desc: Opened Session of the DeviceManager Authenticate Manager
227      * @tc.type: FUNC
228      */
229     void OnSessionOpened(int32_t sessionId, int32_t sessionSide, int32_t result);
230 
231     /**
232      * @tc.name: DmAuthManager::OnSessionClosed
233      * @tc.desc: Closed Session of the DeviceManager Authenticate Manager
234      * @tc.type: FUNC
235      */
236     void OnSessionClosed(const int32_t sessionId);
237 
238     /**
239      * @tc.name: DmAuthManager::OnDataReceived
240      * @tc.desc: Received Data of the DeviceManager Authenticate Manager
241      * @tc.type: FUNC
242      */
243     void OnDataReceived(const int32_t sessionId, const std::string message);
244 
245     /**
246      * @tc.name: DmAuthManager::OnGroupCreated
247      * @tc.desc: Created Group of the DeviceManager Authenticate Manager
248      * @tc.type: FUNC
249      */
250     void OnGroupCreated(int64_t requestId, const std::string &groupId);
251 
252     /**
253      * @tc.name: DmAuthManager::OnMemberJoin
254      * @tc.desc: Join Member of the DeviceManager Authenticate Manager
255      * @tc.type: FUNC
256      */
257     void OnMemberJoin(int64_t requestId, int32_t status);
258 
259     /**
260      * @tc.name: DmAuthManager::EstablishAuthChannel
261      * @tc.desc: Establish Auth Channel of the DeviceManager Authenticate Manager, auth state machine
262      * @tc.type: FUNC
263      */
264     int32_t EstablishAuthChannel(const std::string &deviceId);
265 
266     /**
267      * @tc.name: DmAuthManager::StartNegotiate
268      * @tc.desc: Start Negotiate of the DeviceManager Authenticate Manager
269      * @tc.type: FUNC
270      */
271     void StartNegotiate(const int32_t &sessionId);
272 
273     /**
274      * @tc.name: DmAuthManager::RespNegotiate
275      * @tc.desc: Resp Negotiate of the DeviceManager Authenticate Manager
276      * @tc.type: FUNC
277      */
278     void RespNegotiate(const int32_t &sessionId);
279 
280     /**
281      * @tc.name: DmAuthManager::SendAuthRequest
282      * @tc.desc: Send Auth Request of the DeviceManager Authenticate Manager
283      * @tc.type: FUNC
284      */
285     void SendAuthRequest(const int32_t &sessionId);
286 
287     /**
288      * @tc.name: DmAuthManager::StartAuthProcess
289      * @tc.desc: Start Auth Process of the DeviceManager Authenticate Manager
290      * @tc.type: FUNC
291      */
292     int32_t StartAuthProcess(const int32_t &action);
293 
294     /**
295      * @tc.name: DmAuthManager::StartRespAuthProcess
296      * @tc.desc: Start Resp Auth Process of the DeviceManager Authenticate Manager
297      * @tc.type: FUNC
298      */
299     void StartRespAuthProcess();
300 
301     /**
302      * @tc.name: DmAuthManager::CreateGroup
303      * @tc.desc: Create Group of the DeviceManager Authenticate Manager
304      * @tc.type: FUNC
305      */
306     int32_t CreateGroup();
307 
308     /**
309      * @tc.name: DmAuthManager::ProcessPincode
310      * @tc.desc: Process pin code of the DeviceManager Authenticate Manager
311      * @tc.type: FUNC
312      */
313     int32_t ProcessPincode(int32_t pinCode);
314 
315     /**
316      * @tc.name: DmAuthManager::GetConnectAddr
317      * @tc.desc: Get Connect Addr of the DeviceManager Authenticate Manager
318      * @tc.type: FUNC
319      */
320     std::string GetConnectAddr(std::string deviceId);
321 
322     /**
323      * @tc.name: DmAuthManager::JoinNetwork
324      * @tc.desc: Join Net work of the DeviceManager Authenticate Manager
325      * @tc.type: FUNC
326      */
327     int32_t JoinNetwork();
328 
329     /**
330      * @tc.name: DmAuthManager::AuthenticateFinish
331      * @tc.desc: Finish Authenticate of the DeviceManager Authenticate Manager
332      * @tc.type: FUNC
333      */
334     void AuthenticateFinish();
335 
336     /**
337      * @tc.name: DmAuthManager::GetIsCryptoSupport
338      * @tc.desc: Get Cryp to Support of the DeviceManager Authenticate Manager
339      * @tc.type: FUNC
340      */
341     bool GetIsCryptoSupport();
342 
343     /**
344      * @tc.name: DmAuthManager::SetAuthRequestState
345      * @tc.desc: Set Auth Request State of the DeviceManager Authenticate Manager
346      * @tc.type: FUNC
347      */
348     int32_t SetAuthRequestState(std::shared_ptr<AuthRequestState> authRequestState);
349 
350     /**
351      * @tc.name: DmAuthManager::SetAuthResponseState
352      * @tc.desc: Set Auth Response State of the DeviceManager Authenticate Manager
353      * @tc.type: FUNC
354      */
355     int32_t SetAuthResponseState(std::shared_ptr<AuthResponseState> authResponseState);
356 
357     /**
358      * @tc.name: DmAuthManager::GetPinCode
359      * @tc.desc: Get Pin Code of the DeviceManager Authenticate Manager
360      * @tc.type: FUNC
361      */
362     int32_t GetPinCode(int32_t &code);
363 
364     /**
365      * @tc.name: DmAuthManager::GenerateGroupName
366      * @tc.desc: Generate Group Name of the DeviceManager Authenticate Manager
367      * @tc.type: FUNC
368      */
369     std::string GenerateGroupName();
370 
371     /**
372      * @tc.name: DmAuthManager::HandleAuthenticateTimeout
373      * @tc.desc: Handle Authenticate Timeout of the DeviceManager Authenticate Manager
374      * @tc.type: FUNC
375      */
376     void HandleAuthenticateTimeout(std::string name);
377 
378     /**
379      * @tc.name: DmAuthManager::CancelDisplay
380      * @tc.desc: Cancel Display of the DeviceManager Authenticate Manager
381      * @tc.type: FUNC
382      */
383     void CancelDisplay();
384 
385     /**
386      * @tc.name: DmAuthManager::GeneratePincode
387      * @tc.desc: Generate Pincode of the DeviceManager Authenticate Manager
388      * @tc.type: FUNC
389      */
390     int32_t GeneratePincode();
391 
392     /**
393      * @tc.name: DmAuthManager::ShowConfigDialog
394      * @tc.desc: Show Config Dialog of the DeviceManager Authenticate Manager
395      * @tc.type: FUNC
396      */
397     void ShowConfigDialog();
398 
399     /**
400      * @tc.name: DmAuthManager::ShowAuthInfoDialog
401      * @tc.desc: Show AuthInfo Dialog of the DeviceManager Authenticate Manager
402      * @tc.type: FUNC
403      */
404     void ShowAuthInfoDialog();
405 
406     /**
407      * @tc.name: DmAuthManager::ShowStartAuthDialog
408      * @tc.desc: Show Start Auth Dialog of the DeviceManager Authenticate Manager
409      * @tc.type: FUNC
410      */
411     void ShowStartAuthDialog();
412 
413     /**
414      * @tc.name: DmAuthManager::OnUserOperation
415      * @tc.desc: User Operation of the DeviceManager Authenticate Manager
416      * @tc.type: FUNC
417      */
418     int32_t OnUserOperation(int32_t action, const std::string &params);
419 
420     /**
421      * @tc.name: DmAuthManager::UserSwitchEventCallback
422      * @tc.desc: User Switch Event Callback of the DeviceManager Authenticate Manager
423      * @tc.type: FUNC
424      */
425     void UserSwitchEventCallback(int32_t userId);
426 
427     /**
428      * @tc.name: DmAuthManager::SetPageId
429      * @tc.desc: Set PageId of the DeviceManager Authenticate Manager
430      * @tc.type: FUNC
431      */
432     int32_t SetPageId(int32_t pageId);
433 
434     /**
435      * @tc.name: DmAuthManager::SetReasonAndFinish
436      * @tc.desc: Set Reason of the DeviceManager Authenticate Manager
437      * @tc.type: FUNC
438      */
439     int32_t SetReasonAndFinish(int32_t reason, int32_t state);
440 
441     /**
442      * @tc.name: DmAuthManager::IsIdenticalAccount
443      * @tc.desc: judge IdenticalAccount or not
444      * @tc.type: FUNC
445      */
446     bool IsIdenticalAccount();
447 
448     /**
449      * @tc.name: DmAuthManager::RegisterUiStateCallback
450      * @tc.desc: Register ui state callback
451      * @tc.type: FUNC
452      */
453     int32_t RegisterUiStateCallback(const std::string pkgName);
454 
455     /**
456      * @tc.name: DmAuthManager::UnRegisterUiStateCallback
457      * @tc.desc: Unregister ui state callback
458      * @tc.type: FUNC
459      */
460     int32_t UnRegisterUiStateCallback(const std::string pkgName);
461 
462     /**
463      * @tc.name: DmAuthManager::ImportAuthCode
464      * @tc.desc: Import auth code
465      * @tc.type: FUNC
466      */
467     int32_t ImportAuthCode(const std::string &pkgName, const std::string &authCode);
468 
469     /**
470      * @tc.name: DmAuthManager::BindTarget
471      * @tc.desc: Bind Target
472      * @tc.type: FUNC
473      */
474     int32_t BindTarget(const std::string &pkgName, const PeerTargetId &targetId,
475         const std::map<std::string, std::string> &bindParam);
476 
477     void HandleSessionHeartbeat(std::string name);
478 private:
479     int32_t CheckAuthParamVaild(const std::string &pkgName, int32_t authType, const std::string &deviceId,
480         const std::string &extra);
481     void ProcessSourceMsg();
482     void ProcessSinkMsg();
483     std::string GetAccountGroupIdHash();
484     void AbilityNegotiate();
485     void HandleMemberJoinImportAuthCode(const int64_t requestId, const int32_t status);
486     int32_t DeleteAuthCode();
487     int32_t GetAuthCode(const std::string &pkgName, int32_t &pinCode);
488     bool IsAuthTypeSupported(const int32_t &authType);
489     bool IsAuthCodeReady(const std::string &pkgName);
490     int32_t ParseConnectAddr(const PeerTargetId &targetId, std::string &deviceId, std::string &addrType);
491     int32_t ParseAuthType(const std::map<std::string, std::string> &bindParam, int32_t &authType);
492     std::string ParseExtraFromMap(const std::map<std::string, std::string> &bindParam);
493     std::string GenerateBindResultContent();
494     void InitAuthState(const std::string &pkgName, int32_t authType, const std::string &deviceId,
495         const std::string &extra);
496     void CompatiblePutAcl();
497     void ProcRespNegotiateExt(const int32_t &sessionId);
498     void ProcRespNegotiate(const int32_t &sessionId);
499     void AccountIdLogoutEventCallback(int32_t userId);
500     void UserChangeEventCallback(int32_t userId);
501     void GetAuthRequestContext();
502     void SinkAuthDeviceFinish();
503     void SrcAuthDeviceFinish();
504     void SrcSyncDeleteAclDone();
505     void SinkSyncDeleteAclDone();
506     int32_t CheckTrustState();
507     void ProcIncompatible(const int32_t &sessionId);
508     bool CompareVersion(const std::string &remoteVersion, const std::string &oldVersion);
509 
510 public:
511     void RequestCredential();
512     void GenerateCredential(std::string &publicKey);
513     void RequestCredentialDone();
514     void RequestSyncDeleteAcl();
515     void ResponseCredential();
516     void ResponseSyncDeleteAcl();
517     bool AuthDeviceTransmit(int64_t requestId, const uint8_t *data, uint32_t dataLen);
518     void AuthDeviceFinish(int64_t requestId);
519     void AuthDeviceError(int64_t requestId, int32_t errorCode);
520     void GetRemoteDeviceId(std::string &deviceId);
521     int32_t EstablishUnbindChannel(const std::string &deviceIdHash);
522     void SyncDeleteAclDone();
523     void AuthDeviceSessionKey(int64_t requestId, const uint8_t *sessionKey, uint32_t sessionKeyLen);
524     void CommonEventCallback(int32_t userId, std::string commonEventType);
525     void OnAuthDeviceDataReceived(const int32_t sessionId, const std::string message);
526     void OnUnbindSessionOpened(int32_t socket, PeerSocketInfo info);
527     void BindSocketSuccess(int32_t socket);
528     void BindSocketFail();
529     void OnScreenLocked();
530     void HandleDeviceNotTrust(const std::string &udid);
531     int32_t DeleteGroup(const std::string &pkgName, const std::string &deviceId);
532     int32_t StopAuthenticateDevice(const std::string &pkgName);
533 private:
534     int32_t ImportCredential(std::string &deviceId, std::string &publicKey);
535     void GetAuthParam(const std::string &pkgName, int32_t authType, const std::string &deviceId,
536         const std::string &extra);
537     void HandleSyncDeleteTimeout(std::string name);
538     int32_t DeleteAcl(const std::string &pkgName, const std::string &deviceId);
539     void ProcessAuthRequestExt(const int32_t &sessionId);
540     bool IsAuthFinish();
541     void ProcessAuthRequest(const int32_t &sessionId);
542     int32_t ConfirmProcess(const int32_t &action);
543     int32_t ConfirmProcessExt(const int32_t &action);
544     int32_t AddMember(int32_t pinCode);
545     int32_t AuthDevice(int32_t pinCode);
546     void SyncDeleteAcl(const std::string &pkgName, const std::string &deviceId);
547     void PutAccessControlList();
548     void SinkAuthenticateFinish();
549     void SrcAuthenticateFinish();
550     std::string GetBundleLable(const std::string &bundleName);
551     bool IsScreenLocked();
552     std::string ConvertSrcVersion(const std::string &version, const std::string &edition);
553     std::string ConvertSinkVersion(const std::string &version);
554     void NegotiateRespMsg(const std::string &version);
555     void SetAuthType(int32_t authType);
556     int32_t GetTaskTimeout(const char* taskName, int32_t taskTimeOut);
557     void GetPeerUdidHash(int32_t sessionId, std::string &peerUdidHash);
558     void DeleteOffLineTimer(int32_t sessionId);
559 
560 private:
561     std::shared_ptr<SoftbusConnector> softbusConnector_;
562     std::shared_ptr<HiChainConnector> hiChainConnector_;
563     std::shared_ptr<AuthUiStateManager> authUiStateMgr_;
564     std::shared_ptr<IDeviceManagerServiceListener> listener_;
565     std::shared_ptr<DmAdapterManager> adapterMgr_;
566     std::map<int32_t, std::shared_ptr<IAuthentication>> authenticationMap_;
567     std::shared_ptr<AuthRequestState> authRequestState_ = nullptr;
568     std::shared_ptr<AuthResponseState> authResponseState_ = nullptr;
569     std::shared_ptr<DmAuthRequestContext> authRequestContext_;
570     std::shared_ptr<DmAuthResponseContext> authResponseContext_;
571     std::shared_ptr<AuthMessageProcessor> authMessageProcessor_;
572     std::shared_ptr<DmTimer> timer_;
573     std::shared_ptr<DmAbilityManager> dmAbilityMgr_;
574     std::shared_ptr<HiChainAuthConnector> hiChainAuthConnector_;
575     bool isCryptoSupport_ = false;
576     bool isFinishOfLocal_ = true;
577     int32_t authTimes_ = 0;
578     int32_t action_ = USER_OPERATION_TYPE_CANCEL_AUTH;
579     std::shared_ptr<IAuthentication> authPtr_;
580     bool isAddingMember_ = false;
581     std::string importPkgName_ = "";
582     std::string importAuthCode_ = "";
583     PeerTargetId peerTargetId_;
584     const uint8_t *sessionKey_ = nullptr;
585     uint32_t sessionKeyLen_ = 0;
586     std::string remoteDeviceId_ = "";
587     std::string dmVersion_ = "";
588     bool isAuthDevice_ = false;
589     bool isAuthenticateDevice_ = false;
590     int32_t authForm_ = DmAuthForm::ACROSS_ACCOUNT;
591     std::string remoteVersion_ = "";
592     std::atomic<int32_t> authType_ = AUTH_TYPE_UNKNOW;
593     std::string remoteUdidHash_ = "";
594 };
595 } // namespace DistributedHardware
596 } // namespace OHOS
597 #endif // OHOS_DM_AUTH_MANAGER_H
598