1ac4d6d58Sopenharmony_ci/*
2ac4d6d58Sopenharmony_ci * Copyright (C) 2022 Huawei Device Co., Ltd.
3ac4d6d58Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
4ac4d6d58Sopenharmony_ci * you may not use this file except in compliance with the License.
5ac4d6d58Sopenharmony_ci * You may obtain a copy of the License at
6ac4d6d58Sopenharmony_ci *
7ac4d6d58Sopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
8ac4d6d58Sopenharmony_ci *
9ac4d6d58Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software
10ac4d6d58Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
11ac4d6d58Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12ac4d6d58Sopenharmony_ci * See the License for the specific language governing permissions and
13ac4d6d58Sopenharmony_ci * limitations under the License.
14ac4d6d58Sopenharmony_ci */
15ac4d6d58Sopenharmony_ci#ifndef ATTEST_RESULT_INFO_H
16ac4d6d58Sopenharmony_ci#define ATTEST_RESULT_INFO_H
17ac4d6d58Sopenharmony_ci
18ac4d6d58Sopenharmony_ci#include <stdint.h>
19ac4d6d58Sopenharmony_ci
20ac4d6d58Sopenharmony_ci#ifdef __cplusplus
21ac4d6d58Sopenharmony_ci#if __cplusplus
22ac4d6d58Sopenharmony_ciextern "C" {
23ac4d6d58Sopenharmony_ci#endif
24ac4d6d58Sopenharmony_ci#endif
25ac4d6d58Sopenharmony_ci
26ac4d6d58Sopenharmony_ci#define SOFTWARE_RESULT_DETAIL_SIZE   5
27ac4d6d58Sopenharmony_ci#define MAX_ATTEST_RESULT_SIZE        (SOFTWARE_RESULT_DETAIL_SIZE + 2)
28ac4d6d58Sopenharmony_ci
29ac4d6d58Sopenharmony_citypedef enum {
30ac4d6d58Sopenharmony_ci    SOFTWARE_RESULT_VERSIONID,
31ac4d6d58Sopenharmony_ci    SOFTWARE_RESULT_PATCHLEVEL,
32ac4d6d58Sopenharmony_ci    SOFTWARE_RESULT_ROOTHASH,
33ac4d6d58Sopenharmony_ci    SOFTWARE_RESULT_PCID,
34ac4d6d58Sopenharmony_ci    SOFTWARE_RESULT_RESERVE,
35ac4d6d58Sopenharmony_ci} SOFTWARE_RESULT_DETAIL_TYPE;
36ac4d6d58Sopenharmony_ci
37ac4d6d58Sopenharmony_citypedef struct {
38ac4d6d58Sopenharmony_ci    int32_t authResult;
39ac4d6d58Sopenharmony_ci    int32_t softwareResult;
40ac4d6d58Sopenharmony_ci    int32_t softwareResultDetail[SOFTWARE_RESULT_DETAIL_SIZE];
41ac4d6d58Sopenharmony_ci    int32_t ticketLength;
42ac4d6d58Sopenharmony_ci    char* ticket;
43ac4d6d58Sopenharmony_ci} AttestResultInfo;
44ac4d6d58Sopenharmony_ci
45ac4d6d58Sopenharmony_ci#ifdef __cplusplus
46ac4d6d58Sopenharmony_ci#if __cplusplus
47ac4d6d58Sopenharmony_ci}
48ac4d6d58Sopenharmony_ci#endif
49ac4d6d58Sopenharmony_ci#endif
50ac4d6d58Sopenharmony_ci
51ac4d6d58Sopenharmony_ci#endif // ATTEST_RESULT_INFO_H