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 "identity_manager.h"
17
18 /* in order to expand to uint16_t */
19 static const uint8_t KEY_TYPE_PAIRS[KEY_ALIAS_TYPE_END][KEY_TYPE_PAIR_LEN] = {
20 { 0x00, 0x00 }, /* ACCESSOR_PK */
21 { 0x00, 0x01 }, /* CONTROLLER_PK */
22 { 0x00, 0x02 }, /* ed25519 KEYPAIR */
23 { 0x00, 0x03 }, /* KEK, key encryption key, used only by DeviceAuthService */
24 { 0x00, 0x04 }, /* DEK, data encryption key, used only by upper apps */
25 { 0x00, 0x05 }, /* key tmp */
26 { 0x00, 0x06 }, /* PSK, preshared key index */
27 { 0x00, 0x07 }, /* AUTHTOKEN */
28 { 0x00, 0x08 } /* P2P_AUTH */
29 };
30
GetKeyTypePair(KeyAliasType keyAliasType)31 uint8_t *GetKeyTypePair(KeyAliasType keyAliasType)
32 {
33 return (uint8_t *)KEY_TYPE_PAIRS[keyAliasType];
34 }
35
GetAuthIdentityByType(AuthIdentityType type)36 const AuthIdentity *GetAuthIdentityByType(AuthIdentityType type)
37 {
38 (void)type;
39 return NULL;
40 }
41
GetAuthIdentityManager(void)42 const AuthIdentityManager *GetAuthIdentityManager(void)
43 {
44 return NULL;
45 }
46
GetGroupAuthIdentity(void)47 const AuthIdentity *GetGroupAuthIdentity(void)
48 {
49 return NULL;
50 }
51
GetPinAuthIdentity(void)52 const AuthIdentity *GetPinAuthIdentity(void)
53 {
54 return NULL;
55 }
56
GetP2pAuthIdentity(void)57 const AuthIdentity *GetP2pAuthIdentity(void)
58 {
59 return NULL;
60 }
61
GetCredentialOperator(void)62 const CredentialOperator *GetCredentialOperator(void)
63 {
64 return NULL;
65 }
66