Mbed TLS v4.0.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
crypto_driver_contexts_composites.h
Go to the documentation of this file.
1 
20 /* Copyright The Mbed TLS Contributors
21  * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
22  */
23 
24 #ifndef PSA_CRYPTO_DRIVER_CONTEXTS_COMPOSITES_H
25 #define PSA_CRYPTO_DRIVER_CONTEXTS_COMPOSITES_H
26 
28 
29 /* Include the context structure definitions for the Mbed TLS software drivers */
31 
32 /* Include the context structure definitions for those drivers that were
33  * declared during the autogeneration process. */
34 
35 #if defined(MBEDTLS_TEST_LIBTESTDRIVER1)
36 #include <libtestdriver1/tf-psa-crypto/include/psa/crypto.h>
37 #endif
38 
39 #if defined(PSA_CRYPTO_DRIVER_TEST)
40 #if defined(MBEDTLS_TEST_LIBTESTDRIVER1) && \
41  defined(LIBTESTDRIVER1_MBEDTLS_PSA_BUILTIN_MAC)
42 typedef libtestdriver1_mbedtls_psa_mac_operation_t
43  mbedtls_transparent_test_driver_mac_operation_t;
44 typedef libtestdriver1_mbedtls_psa_mac_operation_t
45  mbedtls_opaque_test_driver_mac_operation_t;
46 
47 #define MBEDTLS_TRANSPARENT_TEST_DRIVER_MAC_OPERATION_INIT \
48  LIBTESTDRIVER1_MBEDTLS_PSA_MAC_OPERATION_INIT
49 #define MBEDTLS_OPAQUE_TEST_DRIVER_MAC_OPERATION_INIT \
50  LIBTESTDRIVER1_MBEDTLS_PSA_MAC_OPERATION_INIT
51 
52 #else
54  mbedtls_transparent_test_driver_mac_operation_t;
56  mbedtls_opaque_test_driver_mac_operation_t;
57 
58 #define MBEDTLS_TRANSPARENT_TEST_DRIVER_MAC_OPERATION_INIT \
59  MBEDTLS_PSA_MAC_OPERATION_INIT
60 #define MBEDTLS_OPAQUE_TEST_DRIVER_MAC_OPERATION_INIT \
61  MBEDTLS_PSA_MAC_OPERATION_INIT
62 
63 #endif /* MBEDTLS_TEST_LIBTESTDRIVER1 && LIBTESTDRIVER1_MBEDTLS_PSA_BUILTIN_MAC */
64 
65 #if defined(MBEDTLS_TEST_LIBTESTDRIVER1) && \
66  defined(LIBTESTDRIVER1_MBEDTLS_PSA_BUILTIN_AEAD)
67 typedef libtestdriver1_mbedtls_psa_aead_operation_t
68  mbedtls_transparent_test_driver_aead_operation_t;
69 
70 #define MBEDTLS_TRANSPARENT_TEST_DRIVER_AEAD_OPERATION_INIT \
71  LIBTESTDRIVER1_MBEDTLS_PSA_AEAD_OPERATION_INIT
72 #else
74  mbedtls_transparent_test_driver_aead_operation_t;
75 
76 #define MBEDTLS_TRANSPARENT_TEST_DRIVER_AEAD_OPERATION_INIT \
77  MBEDTLS_PSA_AEAD_OPERATION_INIT
78 
79 #endif /* MBEDTLS_TEST_LIBTESTDRIVER1 && LIBTESTDRIVER1_MBEDTLS_PSA_BUILTIN_AEAD */
80 
81 #if defined(MBEDTLS_TEST_LIBTESTDRIVER1) && \
82  defined(LIBTESTDRIVER1_MBEDTLS_PSA_BUILTIN_PAKE)
83 
84 typedef libtestdriver1_mbedtls_psa_pake_operation_t
85  mbedtls_transparent_test_driver_pake_operation_t;
86 typedef libtestdriver1_mbedtls_psa_pake_operation_t
87  mbedtls_opaque_test_driver_pake_operation_t;
88 
89 #define MBEDTLS_TRANSPARENT_TEST_DRIVER_PAKE_OPERATION_INIT \
90  LIBTESTDRIVER1_MBEDTLS_PSA_PAKE_OPERATION_INIT
91 #define MBEDTLS_OPAQUE_TEST_DRIVER_PAKE_OPERATION_INIT \
92  LIBTESTDRIVER1_MBEDTLS_PSA_PAKE_OPERATION_INIT
93 
94 #else
96  mbedtls_transparent_test_driver_pake_operation_t;
98  mbedtls_opaque_test_driver_pake_operation_t;
99 
100 #define MBEDTLS_TRANSPARENT_TEST_DRIVER_PAKE_OPERATION_INIT \
101  MBEDTLS_PSA_PAKE_OPERATION_INIT
102 #define MBEDTLS_OPAQUE_TEST_DRIVER_PAKE_OPERATION_INIT \
103  MBEDTLS_PSA_PAKE_OPERATION_INIT
104 
105 #endif /* MBEDTLS_TEST_LIBTESTDRIVER1 && LIBTESTDRIVER1_MBEDTLS_PSA_BUILTIN_PAKE */
106 
107 #endif /* PSA_CRYPTO_DRIVER_TEST */
108 
109 /* Define the context to be used for an operation that is executed through the
110  * PSA Driver wrapper layer as the union of all possible driver's contexts.
111  *
112  * The union members are the driver's context structures, and the member names
113  * are formatted as `'drivername'_ctx`. This allows for procedural generation
114  * of both this file and the content of psa_crypto_driver_wrappers.h */
115 
116 typedef union {
117  unsigned dummy; /* Make sure this union is always non-empty */
119 #if defined(PSA_CRYPTO_DRIVER_TEST)
120  mbedtls_transparent_test_driver_mac_operation_t transparent_test_driver_ctx;
121  mbedtls_opaque_test_driver_mac_operation_t opaque_test_driver_ctx;
122 #endif
124 
125 typedef union {
126  unsigned dummy; /* Make sure this union is always non-empty */
128 #if defined(PSA_CRYPTO_DRIVER_TEST)
129  mbedtls_transparent_test_driver_aead_operation_t transparent_test_driver_ctx;
130 #endif
132 
133 typedef union {
134  unsigned dummy; /* Make sure this union is always non-empty */
137 
138 typedef union {
139  unsigned dummy; /* Make sure this union is always non-empty */
142 
143 typedef union {
144  unsigned dummy; /* Make sure this union is always non-empty */
146 #if defined(PSA_CRYPTO_DRIVER_TEST)
147  mbedtls_transparent_test_driver_pake_operation_t transparent_test_driver_ctx;
148  mbedtls_opaque_test_driver_pake_operation_t opaque_test_driver_ctx;
149 #endif
151 
152 #endif /* PSA_CRYPTO_DRIVER_CONTEXTS_COMPOSITES_H */
153 /* End of automatically generated file. */
mbedtls_psa_sign_hash_interruptible_operation_t mbedtls_ctx
mbedtls_psa_verify_hash_interruptible_operation_t mbedtls_ctx
mbedtls_psa_mac_operation_t mbedtls_ctx
mbedtls_psa_pake_operation_t mbedtls_ctx
Definitions for all PSA crypto drivers.
mbedtls_psa_aead_operation_t mbedtls_ctx
Context structure declaration of the Mbed TLS software-based PSA drivers called through the PSA Crypt...