Mbed TLS v2.28.9
Loading...
Searching...
No Matches
crypto_driver_contexts_composites.h
Go to the documentation of this file.
1/*
2 * Declaration of context structures for use with the PSA driver wrapper
3 * interface. This file contains the context structures for 'composite'
4 * operations, i.e. those operations which need to make use of other operations
5 * from the primitives (crypto_driver_contexts_primitives.h)
6 *
7 * Warning: This file will be auto-generated in the future.
8 *
9 * \note This file may not be included directly. Applications must
10 * include psa/crypto.h.
11 *
12 * \note This header and its content is not part of the Mbed TLS API and
13 * applications must not depend on it. Its main purpose is to define the
14 * multi-part state objects of the PSA drivers included in the cryptographic
15 * library. The definition of these objects are then used by crypto_struct.h
16 * to define the implementation-defined types of PSA multi-part state objects.
17 */
18/* Copyright The Mbed TLS Contributors
19 * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
20 */
21
22#ifndef PSA_CRYPTO_DRIVER_CONTEXTS_COMPOSITES_H
23#define PSA_CRYPTO_DRIVER_CONTEXTS_COMPOSITES_H
24
26
27/* Include the context structure definitions for the Mbed TLS software drivers */
29
30/* Include the context structure definitions for those drivers that were
31 * declared during the autogeneration process. */
32
33#if defined(MBEDTLS_TEST_LIBTESTDRIVER1)
34#include <libtestdriver1/include/psa/crypto.h>
35#endif
36
37#if defined(PSA_CRYPTO_DRIVER_TEST)
38#if defined(MBEDTLS_TEST_LIBTESTDRIVER1) && \
39 defined(LIBTESTDRIVER1_MBEDTLS_PSA_BUILTIN_MAC)
40typedef libtestdriver1_mbedtls_psa_mac_operation_t
41 mbedtls_transparent_test_driver_mac_operation_t;
42typedef libtestdriver1_mbedtls_psa_mac_operation_t
43 mbedtls_opaque_test_driver_mac_operation_t;
44
45#define MBEDTLS_TRANSPARENT_TEST_DRIVER_MAC_OPERATION_INIT \
46 LIBTESTDRIVER1_MBEDTLS_PSA_MAC_OPERATION_INIT
47#define MBEDTLS_OPAQUE_TEST_DRIVER_MAC_OPERATION_INIT \
48 LIBTESTDRIVER1_MBEDTLS_PSA_MAC_OPERATION_INIT
49
50#else
52 mbedtls_transparent_test_driver_mac_operation_t;
54 mbedtls_opaque_test_driver_mac_operation_t;
55
56#define MBEDTLS_TRANSPARENT_TEST_DRIVER_MAC_OPERATION_INIT \
57 MBEDTLS_PSA_MAC_OPERATION_INIT
58#define MBEDTLS_OPAQUE_TEST_DRIVER_MAC_OPERATION_INIT \
59 MBEDTLS_PSA_MAC_OPERATION_INIT
60
61#endif /* MBEDTLS_TEST_LIBTESTDRIVER1 */
62#endif /* PSA_CRYPTO_DRIVER_TEST */
63
64/* Define the context to be used for an operation that is executed through the
65 * PSA Driver wrapper layer as the union of all possible driver's contexts.
66 *
67 * The union members are the driver's context structures, and the member names
68 * are formatted as `'drivername'_ctx`. This allows for procedural generation
69 * of both this file and the content of psa_crypto_driver_wrappers.c */
70
71typedef union {
72 unsigned dummy; /* Make sure this union is always non-empty */
74#if defined(PSA_CRYPTO_DRIVER_TEST)
75 mbedtls_transparent_test_driver_mac_operation_t transparent_test_driver_ctx;
76 mbedtls_opaque_test_driver_mac_operation_t opaque_test_driver_ctx;
77#endif
79
80#endif /* PSA_CRYPTO_DRIVER_CONTEXTS_COMPOSITES_H */
81/* End of automatically generated file. */
Definitions for all PSA crypto drivers.
mbedtls_psa_mac_operation_t mbedtls_ctx