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