Mbed TLS v4.1.1
Loading...
Searching...
No Matches
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 */
30#include "mbedtls/private/crypto_builtin_composites.h"
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#if defined(TF_PSA_CRYPTO_TEST_LIBTESTDRIVER1)
37#include "mbedtls/private/libtestdriver1-crypto_builtin_composites.h"
38#else
39#include <libtestdriver1/tf-psa-crypto/include/psa/crypto.h>
40#endif
41#endif
42
43#if defined(PSA_CRYPTO_DRIVER_TEST)
44#if defined(MBEDTLS_TEST_LIBTESTDRIVER1) && \
45 defined(LIBTESTDRIVER1_MBEDTLS_PSA_BUILTIN_MAC)
46typedef libtestdriver1_mbedtls_psa_mac_operation_t
47 mbedtls_transparent_test_driver_mac_operation_t;
48typedef libtestdriver1_mbedtls_psa_mac_operation_t
49 mbedtls_opaque_test_driver_mac_operation_t;
50
51#define MBEDTLS_TRANSPARENT_TEST_DRIVER_MAC_OPERATION_INIT \
52 LIBTESTDRIVER1_MBEDTLS_PSA_MAC_OPERATION_INIT
53#define MBEDTLS_OPAQUE_TEST_DRIVER_MAC_OPERATION_INIT \
54 LIBTESTDRIVER1_MBEDTLS_PSA_MAC_OPERATION_INIT
55
56#else
57typedef mbedtls_psa_mac_operation_t
58 mbedtls_transparent_test_driver_mac_operation_t;
59typedef mbedtls_psa_mac_operation_t
60 mbedtls_opaque_test_driver_mac_operation_t;
61
62#define MBEDTLS_TRANSPARENT_TEST_DRIVER_MAC_OPERATION_INIT \
63 MBEDTLS_PSA_MAC_OPERATION_INIT
64#define MBEDTLS_OPAQUE_TEST_DRIVER_MAC_OPERATION_INIT \
65 MBEDTLS_PSA_MAC_OPERATION_INIT
66
67#endif /* MBEDTLS_TEST_LIBTESTDRIVER1 && LIBTESTDRIVER1_MBEDTLS_PSA_BUILTIN_MAC */
68
69#if defined(MBEDTLS_TEST_LIBTESTDRIVER1) && \
70 defined(LIBTESTDRIVER1_MBEDTLS_PSA_BUILTIN_AEAD)
71typedef libtestdriver1_mbedtls_psa_aead_operation_t
72 mbedtls_transparent_test_driver_aead_operation_t;
73
74#define MBEDTLS_TRANSPARENT_TEST_DRIVER_AEAD_OPERATION_INIT \
75 LIBTESTDRIVER1_MBEDTLS_PSA_AEAD_OPERATION_INIT
76#else
77typedef mbedtls_psa_aead_operation_t
78 mbedtls_transparent_test_driver_aead_operation_t;
79
80#define MBEDTLS_TRANSPARENT_TEST_DRIVER_AEAD_OPERATION_INIT \
81 MBEDTLS_PSA_AEAD_OPERATION_INIT
82
83#endif /* MBEDTLS_TEST_LIBTESTDRIVER1 && LIBTESTDRIVER1_MBEDTLS_PSA_BUILTIN_AEAD */
84
85#if defined(MBEDTLS_TEST_LIBTESTDRIVER1) && \
86 defined(LIBTESTDRIVER1_MBEDTLS_PSA_BUILTIN_PAKE)
87
88typedef libtestdriver1_mbedtls_psa_pake_operation_t
89 mbedtls_transparent_test_driver_pake_operation_t;
90typedef libtestdriver1_mbedtls_psa_pake_operation_t
91 mbedtls_opaque_test_driver_pake_operation_t;
92
93#define MBEDTLS_TRANSPARENT_TEST_DRIVER_PAKE_OPERATION_INIT \
94 LIBTESTDRIVER1_MBEDTLS_PSA_PAKE_OPERATION_INIT
95#define MBEDTLS_OPAQUE_TEST_DRIVER_PAKE_OPERATION_INIT \
96 LIBTESTDRIVER1_MBEDTLS_PSA_PAKE_OPERATION_INIT
97
98#else
99typedef mbedtls_psa_pake_operation_t
100 mbedtls_transparent_test_driver_pake_operation_t;
101typedef mbedtls_psa_pake_operation_t
102 mbedtls_opaque_test_driver_pake_operation_t;
103
104#define MBEDTLS_TRANSPARENT_TEST_DRIVER_PAKE_OPERATION_INIT \
105 MBEDTLS_PSA_PAKE_OPERATION_INIT
106#define MBEDTLS_OPAQUE_TEST_DRIVER_PAKE_OPERATION_INIT \
107 MBEDTLS_PSA_PAKE_OPERATION_INIT
108
109#endif /* MBEDTLS_TEST_LIBTESTDRIVER1 && LIBTESTDRIVER1_MBEDTLS_PSA_BUILTIN_PAKE */
110
111#endif /* PSA_CRYPTO_DRIVER_TEST */
112
113/* Define the context to be used for an operation that is executed through the
114 * PSA Driver wrapper layer as the union of all possible driver's contexts.
115 *
116 * The union members are the driver's context structures, and the member names
117 * are formatted as `'drivername'_ctx`. This allows for procedural generation
118 * of both this file and the content of psa_crypto_driver_wrappers.h */
119
120typedef union {
121 unsigned dummy; /* Make sure this union is always non-empty */
122 mbedtls_psa_mac_operation_t mbedtls_ctx;
123#if defined(PSA_CRYPTO_DRIVER_TEST)
124 mbedtls_transparent_test_driver_mac_operation_t transparent_test_driver_ctx;
125 mbedtls_opaque_test_driver_mac_operation_t opaque_test_driver_ctx;
126#endif
128
129typedef union {
130 unsigned dummy; /* Make sure this union is always non-empty */
131 mbedtls_psa_aead_operation_t mbedtls_ctx;
132#if defined(PSA_CRYPTO_DRIVER_TEST)
133 mbedtls_transparent_test_driver_aead_operation_t transparent_test_driver_ctx;
134#endif
136
137typedef union {
138 unsigned dummy; /* Make sure this union is always non-empty */
139 mbedtls_psa_sign_hash_interruptible_operation_t mbedtls_ctx;
141
142typedef union {
143 unsigned dummy; /* Make sure this union is always non-empty */
144 mbedtls_psa_verify_hash_interruptible_operation_t mbedtls_ctx;
146
147typedef union {
148 unsigned dummy; /* Make sure this union is always non-empty */
149 mbedtls_psa_pake_operation_t mbedtls_ctx;
150#if defined(PSA_CRYPTO_DRIVER_TEST)
151 mbedtls_transparent_test_driver_pake_operation_t transparent_test_driver_ctx;
152 mbedtls_opaque_test_driver_pake_operation_t opaque_test_driver_ctx;
153#endif
155
156#endif /* PSA_CRYPTO_DRIVER_CONTEXTS_COMPOSITES_H */
157/* End of automatically generated file. */
Definitions for all PSA crypto drivers.
mbedtls_psa_sign_hash_interruptible_operation_t mbedtls_ctx
mbedtls_psa_verify_hash_interruptible_operation_t mbedtls_ctx