blob: 87889af49c337db7350f4c2bd10645cb5301b544 [file] [log] [blame]
Bence Szépkúti86974652020-06-15 11:59:37 +02001/*
Bence Szépkúti1e148272020-08-07 13:07:28 +02002 * Copyright The Mbed TLS Contributors
itayzafrir7723ab12019-02-14 10:28:02 +02003 * 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.
itayzafrir7723ab12019-02-14 10:28:02 +020016 */
17
18#ifndef PSA_CRYPTO_SERVICE_INTEGRATION_H
19#define PSA_CRYPTO_SERVICE_INTEGRATION_H
20
21/*
22 * When MBEDTLS_PSA_CRYPTO_SPM is defined, the code is being built for SPM
23 * (Secure Partition Manager) integration which separates the code into two
24 * parts: NSPE (Non-Secure Processing Environment) and SPE (Secure Processing
25 * Environment). When building for the SPE, an additional header file should be
26 * included.
27 */
28#if defined(MBEDTLS_PSA_CRYPTO_SPM)
29/*
30 * PSA_CRYPTO_SECURE means that the file which included this file is being
31 * compiled for SPE. The files crypto_structs.h and crypto_types.h have
32 * different implementations for NSPE and SPE and are compiled according to this
33 * flag.
34 */
35#define PSA_CRYPTO_SECURE 1
36#include "crypto_spe.h"
37#endif // MBEDTLS_PSA_CRYPTO_SPM
38
39#endif // PSA_CRYPTO_SERVICE_INTEGRATION_H