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