Gilles Peskine | e59236f | 2018-01-27 23:32:46 +0100 | [diff] [blame] | 1 | /** |
| 2 | * \file psa/crypto_platform.h |
| 3 | * |
| 4 | * \brief PSA cryptography module: Mbed TLS platfom definitions |
Gilles Peskine | 07c91f5 | 2018-06-28 18:02:53 +0200 | [diff] [blame] | 5 | * |
| 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 Peskine | e59236f | 2018-01-27 23:32:46 +0100 | [diff] [blame] | 15 | */ |
| 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 Peskine | 2f9c4dc | 2018-01-28 13:16:24 +0100 | [diff] [blame] | 49 | /* Integral type representing a key slot number. */ |
| 50 | typedef uint16_t psa_key_slot_t; |
| 51 | |
Gilles Peskine | f535eb2 | 2018-11-30 14:08:36 +0100 | [diff] [blame^] | 52 | /* Integral type representing a key handle. */ |
| 53 | typedef uint16_t psa_key_handle_t; |
| 54 | |
Gilles Peskine | e59236f | 2018-01-27 23:32:46 +0100 | [diff] [blame] | 55 | #endif /* PSA_CRYPTO_PLATFORM_H */ |