blob: 8cc21a287d8b903a90485314d4391fd6ec02264f [file] [log] [blame]
Steven Cooremandbf8ced2021-03-04 13:01:18 +01001/*
2 * Declaration of context structures for use with the PSA driver wrapper
3 * interface.
4 *
5 * Warning: This file will be auto-generated in the future.
6 */
7/* Copyright The Mbed TLS Contributors
8 * SPDX-License-Identifier: Apache-2.0
9 *
10 * Licensed under the Apache License, Version 2.0 (the "License"); you may
11 * not use this file except in compliance with the License.
12 * You may obtain a copy of the License at
13 *
14 * http://www.apache.org/licenses/LICENSE-2.0
15 *
16 * Unless required by applicable law or agreed to in writing, software
17 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
18 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19 * See the License for the specific language governing permissions and
20 * limitations under the License.
21 */
22
23#ifndef PSA_CRYPTO_DRIVER_WRAPPERS_CONTEXTS_H
24#define PSA_CRYPTO_DRIVER_WRAPPERS_CONTEXTS_H
25
26#include "psa/crypto.h"
27#include "psa/crypto_driver_common.h"
28
29/* Include all structure definitions for the drivers that have been included
30 * during the auto-generation of this file (autogeneration not yet in place) */
Steven Cooremanf7638102021-03-04 15:14:36 +010031#if defined(PSA_CRYPTO_DRIVER_TEST)
32#include "test/drivers/test_driver.h"
33#endif
Steven Cooremandbf8ced2021-03-04 13:01:18 +010034
35/* Include the structure definitions for the mbed TLS software drivers */
36#include "psa_crypto_hash.h"
37
38/* Define the context to be used for an operation that is executed through the
39 * PSA Driver wrapper layer as the union of all possible driver's contexts.
40 *
41 * The union members are the driver's context structures, and the member names
42 * are formatted as `'drivername'_ctx`. This allows for procedural generation
43 * of both this file and the content of psa_crypto_driver_wrappers.c */
44
Steven Cooremanb1777312021-03-04 15:22:38 +010045typedef union {
Steven Cooremandbf8ced2021-03-04 13:01:18 +010046 unsigned dummy; /* Make sure this structure is always non-empty */
47 mbedtls_psa_hash_operation_t mbedtls_ctx;
Steven Cooremanf7638102021-03-04 15:14:36 +010048#if defined(PSA_CRYPTO_DRIVER_TEST)
49 test_transparent_hash_operation_t test_ctx;
50#endif
Steven Cooremanb1777312021-03-04 15:22:38 +010051} psa_driver_hash_context_t;
Steven Cooremandbf8ced2021-03-04 13:01:18 +010052
53#endif /* PSA_CRYPTO_DRIVER_WRAPPERS_CONTEXTS_H */
54/* End of automatically generated file. */