blob: c20396619a2b5be22c4068bfcf506013488e1f6c [file] [log] [blame]
Gilles Peskinee59236f2018-01-27 23:32:46 +01001/**
2 * \file psa/crypto_platform.h
3 *
4 * \brief PSA cryptography module: Mbed TLS platfom definitions
Gilles Peskine07c91f52018-06-28 18:02:53 +02005 *
6 * \note This file may not be included directly. Applications must
7 * include psa/crypto.h.
8 *
9 * This file contains platform-dependent type definitions.
10 *
11 * In implementations with isolation between the application and the
12 * cryptography module, implementers should take care to ensure that
13 * the definitions that are exposed to applications match what the
14 * module implements.
Gilles Peskinee59236f2018-01-27 23:32:46 +010015 */
16/*
17 * Copyright (C) 2018, ARM Limited, All Rights Reserved
18 * SPDX-License-Identifier: Apache-2.0
19 *
20 * Licensed under the Apache License, Version 2.0 (the "License"); you may
21 * not use this file except in compliance with the License.
22 * You may obtain a copy of the License at
23 *
24 * http://www.apache.org/licenses/LICENSE-2.0
25 *
26 * Unless required by applicable law or agreed to in writing, software
27 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
28 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
29 * See the License for the specific language governing permissions and
30 * limitations under the License.
31 *
32 * This file is part of mbed TLS (https://tls.mbed.org)
33 */
34
35#ifndef PSA_CRYPTO_PLATFORM_H
36#define PSA_CRYPTO_PLATFORM_H
37
38/* Include the Mbed TLS configuration file, the way Mbed TLS does it
39 * in each of its header files. */
40#if !defined(MBEDTLS_CONFIG_FILE)
41#include "../mbedtls/config.h"
42#else
43#include MBEDTLS_CONFIG_FILE
44#endif
45
46/* PSA requires several types which C99 provides in stdint.h. */
47#include <stdint.h>
48
Gilles Peskine2f9c4dc2018-01-28 13:16:24 +010049/* Integral type representing a key slot number. */
50typedef uint16_t psa_key_slot_t;
51
Gilles Peskinef535eb22018-11-30 14:08:36 +010052/* Integral type representing a key handle. */
53typedef uint16_t psa_key_handle_t;
54
Gilles Peskinee59236f2018-01-27 23:32:46 +010055#endif /* PSA_CRYPTO_PLATFORM_H */