Bence Szépkúti | 8697465 | 2020-06-15 11:59:37 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2019, ARM Limited, All Rights Reserved |
itayzafrir | 7723ab1 | 2019-02-14 10:28:02 +0200 | [diff] [blame] | 3 | * SPDX-License-Identifier: Apache-2.0 |
| 4 | * |
| 5 | * Licensed under the Apache License, Version 2.0 (the "License"); you may |
| 6 | * not use this file except in compliance with the License. |
| 7 | * You may obtain a copy of the License at |
| 8 | * |
| 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | * |
| 11 | * Unless required by applicable law or agreed to in writing, software |
| 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | * See the License for the specific language governing permissions and |
| 15 | * limitations under the License. |
| 16 | * |
| 17 | * This file is part of mbed TLS (https://tls.mbed.org) |
| 18 | */ |
| 19 | |
| 20 | #ifndef PSA_CRYPTO_SERVICE_INTEGRATION_H |
| 21 | #define PSA_CRYPTO_SERVICE_INTEGRATION_H |
| 22 | |
| 23 | /* |
| 24 | * When MBEDTLS_PSA_CRYPTO_SPM is defined, the code is being built for SPM |
| 25 | * (Secure Partition Manager) integration which separates the code into two |
| 26 | * parts: NSPE (Non-Secure Processing Environment) and SPE (Secure Processing |
| 27 | * Environment). When building for the SPE, an additional header file should be |
| 28 | * included. |
| 29 | */ |
| 30 | #if defined(MBEDTLS_PSA_CRYPTO_SPM) |
| 31 | /* |
| 32 | * PSA_CRYPTO_SECURE means that the file which included this file is being |
| 33 | * compiled for SPE. The files crypto_structs.h and crypto_types.h have |
| 34 | * different implementations for NSPE and SPE and are compiled according to this |
| 35 | * flag. |
| 36 | */ |
| 37 | #define PSA_CRYPTO_SECURE 1 |
| 38 | #include "crypto_spe.h" |
| 39 | #endif // MBEDTLS_PSA_CRYPTO_SPM |
| 40 | |
| 41 | #endif // PSA_CRYPTO_SERVICE_INTEGRATION_H |