mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-26 20:05:38 +01:00
TinyCrypt PK wrap: Simplify guards in pk_wrap.c
With TinyCrypt and legacy ECC mutually exclusive, we don't have to use #if TINYCRYPT #else #if LEGACY #endif #endif anymore, but can add the TC and legacy based ECC implementations independently.
This commit is contained in:
parent
b1074979b8
commit
11cb2637e7
@ -38,7 +38,8 @@
|
|||||||
#include "tinycrypt/ecc_dsa.h"
|
#include "tinycrypt/ecc_dsa.h"
|
||||||
#include "mbedtls/asn1.h"
|
#include "mbedtls/asn1.h"
|
||||||
#include "mbedtls/asn1write.h"
|
#include "mbedtls/asn1write.h"
|
||||||
#else
|
#endif /* MBEDTLS_USE_TINYCRYPT */
|
||||||
|
|
||||||
#if defined(MBEDTLS_ECP_C)
|
#if defined(MBEDTLS_ECP_C)
|
||||||
#include "mbedtls/ecp.h"
|
#include "mbedtls/ecp.h"
|
||||||
#endif
|
#endif
|
||||||
@ -46,7 +47,6 @@
|
|||||||
#if defined(MBEDTLS_ECDSA_C)
|
#if defined(MBEDTLS_ECDSA_C)
|
||||||
#include "mbedtls/ecdsa.h"
|
#include "mbedtls/ecdsa.h"
|
||||||
#endif
|
#endif
|
||||||
#endif /* MBEDTLS_USE_TINYCRYPT */
|
|
||||||
|
|
||||||
#if defined(MBEDTLS_PK_RSA_ALT_SUPPORT)
|
#if defined(MBEDTLS_PK_RSA_ALT_SUPPORT)
|
||||||
#include "mbedtls/platform_util.h"
|
#include "mbedtls/platform_util.h"
|
||||||
@ -714,7 +714,8 @@ const mbedtls_pk_info_t mbedtls_uecc_eckey_info = {
|
|||||||
uecc_eckey_free_wrap,
|
uecc_eckey_free_wrap,
|
||||||
NULL,
|
NULL,
|
||||||
};
|
};
|
||||||
#else
|
#endif /* MBEDTLS_USE_TINYCRYPT */
|
||||||
|
|
||||||
#if defined(MBEDTLS_ECDSA_C)
|
#if defined(MBEDTLS_ECDSA_C)
|
||||||
static int ecdsa_can_do( mbedtls_pk_type_t type )
|
static int ecdsa_can_do( mbedtls_pk_type_t type )
|
||||||
{
|
{
|
||||||
@ -837,7 +838,6 @@ const mbedtls_pk_info_t mbedtls_ecdsa_info = {
|
|||||||
eckey_debug, /* Compatible key structures */
|
eckey_debug, /* Compatible key structures */
|
||||||
};
|
};
|
||||||
#endif /* MBEDTLS_ECDSA_C */
|
#endif /* MBEDTLS_ECDSA_C */
|
||||||
#endif /* MBEDTLS_USE_TINYCRYPT */
|
|
||||||
|
|
||||||
#if defined(MBEDTLS_PK_RSA_ALT_SUPPORT)
|
#if defined(MBEDTLS_PK_RSA_ALT_SUPPORT)
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user