1 /*
2  * Copyright (C) 2023 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 "key_manager.h"
17 #include "device_auth_defines.h"
18 
GenerateDeviceKeyPair(int32_t osAccountId)19 int32_t GenerateDeviceKeyPair(int32_t osAccountId)
20 {
21     (void)osAccountId;
22     return HC_ERR_NOT_SUPPORT;
23 }
24 
GenerateMk(int32_t osAccountId,const char * peerDeviceId,const Uint8Buff * peerPubKey)25 int32_t GenerateMk(int32_t osAccountId, const char *peerDeviceId, const Uint8Buff *peerPubKey)
26 {
27     (void)osAccountId;
28     (void)peerDeviceId;
29     (void)peerPubKey;
30     return HC_ERR_NOT_SUPPORT;
31 }
32 
DeleteMk(int32_t osAccountId,const char * peerDeviceId)33 int32_t DeleteMk(int32_t osAccountId, const char *peerDeviceId)
34 {
35     (void)osAccountId;
36     (void)peerDeviceId;
37     return HC_ERR_NOT_SUPPORT;
38 }
39 
GeneratePseudonymPsk(int32_t osAccountId,const char * peerDeviceId,const Uint8Buff * salt)40 int32_t GeneratePseudonymPsk(int32_t osAccountId, const char *peerDeviceId, const Uint8Buff *salt)
41 {
42     (void)osAccountId;
43     (void)peerDeviceId;
44     (void)salt;
45     return HC_ERR_NOT_SUPPORT;
46 }
47 
DeletePseudonymPsk(int32_t osAccountId,const char * peerDeviceId)48 int32_t DeletePseudonymPsk(int32_t osAccountId, const char *peerDeviceId)
49 {
50     (void)osAccountId;
51     (void)peerDeviceId;
52     return HC_ERR_NOT_SUPPORT;
53 }
54 
GenerateAndSavePseudonymId(int32_t osAccountId,const char * peerDeviceId,const PseudonymKeyInfo * info,const Uint8Buff * saltBuff,Uint8Buff * returnHmac)55 int32_t GenerateAndSavePseudonymId(int32_t osAccountId, const char *peerDeviceId, const PseudonymKeyInfo *info,
56     const Uint8Buff *saltBuff, Uint8Buff *returnHmac)
57 {
58     (void)osAccountId;
59     (void)peerDeviceId;
60     (void)info;
61     (void)saltBuff;
62     (void)returnHmac;
63     return HC_ERR_NOT_SUPPORT;
64 }
65 
GetDevicePubKey(int32_t osAccountId,Uint8Buff * devicePk)66 int32_t GetDevicePubKey(int32_t osAccountId, Uint8Buff *devicePk)
67 {
68     (void)osAccountId;
69     (void)devicePk;
70     return HC_ERR_NOT_SUPPORT;
71 }