Mistake on this page? Email us
est_defs.h
1 // ----------------------------------------------------------------------------
2 // Copyright 2018 ARM Ltd.
3 //
4 // SPDX-License-Identifier: Apache-2.0
5 //
6 // Licensed under the Apache License, Version 2.0 (the "License");
7 // you may not use this file except in compliance with the License.
8 // You may obtain a copy of the License at
9 //
10 // http://www.apache.org/licenses/LICENSE-2.0
11 //
12 // Unless required by applicable law or agreed to in writing, software
13 // distributed under the License is distributed on an "AS IS" BASIS,
14 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 // See the License for the specific language governing permissions and
16 // limitations under the License.
17 // ----------------------------------------------------------------------------
18 
19 #ifndef __EST_DEFS_H__
20 #define __EST_DEFS_H__
21 
22 #include <stdint.h>
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
35  uint16_t cert_length;
36  uint8_t *cert;
37  struct cert_context_s *next;
38 };
39 
47  uint8_t chain_length;
48  void *cert_data_context;
49  struct cert_context_s *certs;
50 };
51 
52 typedef enum {
53  EST_ENROLLMENT_SUCCESS,
54  EST_ENROLLMENT_FAILURE
55 } est_enrollment_result_e;
56 
57 typedef enum {
58  EST_STATUS_SUCCESS,
59  EST_STATUS_INVALID_PARAMETERS,
60  EST_STATUS_MEMORY_ALLOCATION_FAILURE
61 } est_status_e;
62 
71 typedef void(*est_enrollment_result_cb)(est_enrollment_result_e result,
72  struct cert_chain_context_s *cert_chain,
73  void *context);
74 
75 #ifdef __cplusplus
76 }
77 #endif
78 
79 #endif // __EST_DEFS_H__
Definition: est_defs.h:34
Definition: est_defs.h:46