crypto_platform.h
mbedtls/config.h
mbedtls/config_psa.h
stdint.h
crypto.h
crypto_types.h
mbedtls/check_config.h
mbedtls/config.h
mbedtls/config_psa.h
crypto_platform.h
limits.h
stdint.h
crypto.h
crypto_builtin_composites.h
crypto_builtin_primitives.h
crypto_driver_common.h
crypto_driver_contexts_composites.h
crypto_driver_contexts_primitives.h
crypto_extra.h
crypto_platform.h
crypto_se_driver.h
crypto_struct.h
crypto_types.h

PSA cryptography module: Mbed TLS platform definitions.

This file may not be included directly. Applications must include psa/crypto.h.

This file contains platform-dependent type definitions.

In implementations with isolation between the application and the cryptography module, implementers should take care to ensure that the definitions that are exposed to applications match what the module implements.

    /*
    *CopyrightTheMbedTLSContributors
    *SPDX-License-Identifier:Apache-2.0ORGPL-2.0-or-later
    */

    #ifndefPSA_CRYPTO_PLATFORM_H
    #definePSA_CRYPTO_PLATFORM_H

    /*IncludetheMbedTLSconfigurationfile,thewayMbedTLSdoesit
    *ineachofitsheaderfiles.*/
    #if!defined(MBEDTLS_CONFIG_FILE)
    #include"mbedtls/config.h"
    #else
    #includeMBEDTLS_CONFIG_FILE
    #endif

    /*TranslatebetweenclassicMBEDTLS_xxxfeaturesymbolsandPSA_xxx
    *featuresymbols.*/
    #include"mbedtls/config_psa.h"

    /*PSArequiresseveraltypeswhichC99providesinstdint.h.*/
    #include<stdint.h>

    #if(defined(__ARMCC_VERSION)||defined(_MSC_VER))&&\
    !defined(inline)&&!defined(__cplusplus)
    #defineinline__inline
    #endif

    #ifdefined(MBEDTLS_PSA_CRYPTO_KEY_ID_ENCODES_OWNER)

    /*BuildingforthePSACryptoserviceonaPSAplatform,akeyownerisaPSA
    *partitionidentifier.
    *
    *Thefunctionpsa_its_identifier_of_slot()inpsa_crypto_storage.cthat
    *translatesakeyidentifiertoakeystoragefilenameassumesthat
    *mbedtls_key_owner_id_tisa32-bitinteger.Thisfunctionthusneeds
    *reworkingifmbedtls_key_owner_id_tisnotdefinedasa32-bitinteger
    *hereanymore.
    */
    typedefint32_tmbedtls_key_owner_id_t;

    staticinlineintmbedtls_key_owner_id_equal(mbedtls_key_owner_id_tid1,
    mbedtls_key_owner_id_tid2)
    {
    returnid1==id2;
    }

    #endif/*MBEDTLS_PSA_CRYPTO_KEY_ID_ENCODES_OWNER*/

    /*
    *WhenMBEDTLS_PSA_CRYPTO_SPMisdefined,thecodeisbeingbuiltforSPM
    *(SecurePartitionManager)integrationwhichseparatesthecodeintotwo
    *parts:NSPE(Non-SecureProcessingEnvironment)andSPE(SecureProcessing
    *Environment).WhenbuildingfortheSPE,anadditionalheaderfileshouldbe
    *included.
    */
    #ifdefined(MBEDTLS_PSA_CRYPTO_SPM)
    #definePSA_CRYPTO_SECURE1
    #include"crypto_spe.h"
    #endif//MBEDTLS_PSA_CRYPTO_SPM

    #ifdefined(MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG)
    typedefstruct{
    uintptr_topaque[2];
    }mbedtls_psa_external_random_context_t;
    #endif/*MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG*/

    #endif/*PSA_CRYPTO_PLATFORM_H*/