• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2025 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 
17 #ifndef OHOS_DM_CERT_H
18 #define OHOS_DM_CERT_H
19 
20 #define DM_CERTS_COUNT 4
21 #define UDID_BUF_LEN 65
22 #define DM_CERTIFICATE_SIZE 8192
23 #define ATTEST_CERTS_INDEX 0
24 #define DEVICE_CERTS_INDEX 1
25 #define MANUFACTURE_CERTS_INDEX 2
26 #define ROOT_CERTS_INDEX 3
27 
28 #include <stdint.h>
29 #include <string>
30 
31 #include "dm_random.h"
32 
33 namespace OHOS {
34 namespace DistributedHardware {
35 typedef struct DmBlob {
36     uint32_t size;
37     uint8_t *data;
38 } DmBlob;
39 
40 typedef struct DmCertChain {
41     DmBlob *cert;
42     uint32_t certCount;
43 } DmCertChain;
44 } // namespace DistributedHardware
45 } // namespace OHOS
46 #endif //OHOS_DM_CERT_H