Steven Cooreman | dbf8ced | 2021-03-04 13:01:18 +0100 | [diff] [blame] | 1 | /* |
| 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 | |
Steven Cooreman | 830aff2 | 2021-03-09 09:50:44 +0100 | [diff] [blame] | 23 | #ifndef PSA_CRYPTO_DRIVER_CONTEXTS_H |
| 24 | #define PSA_CRYPTO_DRIVER_CONTEXTS_H |
Steven Cooreman | dbf8ced | 2021-03-04 13:01:18 +0100 | [diff] [blame] | 25 | |
| 26 | #include "psa/crypto.h" |
| 27 | #include "psa/crypto_driver_common.h" |
| 28 | |
Steven Cooreman | 830aff2 | 2021-03-09 09:50:44 +0100 | [diff] [blame] | 29 | /* Include the context structure definitions for those drivers that were |
| 30 | * declared during the autogeneration process. */ |
Steven Cooreman | dbf8ced | 2021-03-04 13:01:18 +0100 | [diff] [blame] | 31 | |
Steven Cooreman | 830aff2 | 2021-03-09 09:50:44 +0100 | [diff] [blame] | 32 | /* Include the context structure definitions for the Mbed TLS software drivers */ |
| 33 | #include "psa/crypto_builtin_hash.h" |
Steven Cooreman | dbf8ced | 2021-03-04 13:01:18 +0100 | [diff] [blame] | 34 | |
| 35 | /* Define the context to be used for an operation that is executed through the |
| 36 | * PSA Driver wrapper layer as the union of all possible driver's contexts. |
| 37 | * |
| 38 | * The union members are the driver's context structures, and the member names |
| 39 | * are formatted as `'drivername'_ctx`. This allows for procedural generation |
| 40 | * of both this file and the content of psa_crypto_driver_wrappers.c */ |
| 41 | |
Steven Cooreman | b177731 | 2021-03-04 15:22:38 +0100 | [diff] [blame] | 42 | typedef union { |
Steven Cooreman | dbf8ced | 2021-03-04 13:01:18 +0100 | [diff] [blame] | 43 | unsigned dummy; /* Make sure this structure is always non-empty */ |
| 44 | mbedtls_psa_hash_operation_t mbedtls_ctx; |
Steven Cooreman | f763810 | 2021-03-04 15:14:36 +0100 | [diff] [blame] | 45 | #if defined(PSA_CRYPTO_DRIVER_TEST) |
Steven Cooreman | 0f8ffa8 | 2021-03-15 11:56:33 +0100 | [diff] [blame^] | 46 | mbedtls_transparent_test_driver_hash_operation_t test_driver_ctx; |
Steven Cooreman | f763810 | 2021-03-04 15:14:36 +0100 | [diff] [blame] | 47 | #endif |
Steven Cooreman | b177731 | 2021-03-04 15:22:38 +0100 | [diff] [blame] | 48 | } psa_driver_hash_context_t; |
Steven Cooreman | dbf8ced | 2021-03-04 13:01:18 +0100 | [diff] [blame] | 49 | |
Steven Cooreman | 830aff2 | 2021-03-09 09:50:44 +0100 | [diff] [blame] | 50 | #endif /* PSA_CRYPTO_DRIVER_CONTEXTS_H */ |
Steven Cooreman | dbf8ced | 2021-03-04 13:01:18 +0100 | [diff] [blame] | 51 | /* End of automatically generated file. */ |