From 3ff60bcf1ae96ea40ab98ffd51d6b0c82e7aa5ba Mon Sep 17 00:00:00 2001 From: "Christoph M. Wintersteiger" Date: Fri, 15 Feb 2019 12:59:59 +0000 Subject: [PATCH] ECDH/ECDSA: Fix indentation --- library/ecdh.c | 22 +++++++++++----------- library/ecdsa.c | 4 ++-- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/library/ecdh.c b/library/ecdh.c index 648becbe4..d795ec4da 100644 --- a/library/ecdh.c +++ b/library/ecdh.c @@ -227,18 +227,18 @@ int mbedtls_ecdh_setup( mbedtls_ecdh_context *ctx, mbedtls_ecp_group_id grp_id ) switch( grp_id ) { #if defined(MBEDTLS_ECDH_VARIANT_EVEREST_ENABLED) - case MBEDTLS_ECP_DP_CURVE25519: - ctx->point_format = MBEDTLS_ECP_PF_COMPRESSED; - ctx->var = MBEDTLS_ECDH_VARIANT_EVEREST; - ctx->grp_id = grp_id; - return( mbedtls_everest_setup( &ctx->ctx.everest_ecdh, grp_id ) ); + case MBEDTLS_ECP_DP_CURVE25519: + ctx->point_format = MBEDTLS_ECP_PF_COMPRESSED; + ctx->var = MBEDTLS_ECDH_VARIANT_EVEREST; + ctx->grp_id = grp_id; + return( mbedtls_everest_setup( &ctx->ctx.everest_ecdh, grp_id ) ); #endif - default: - ctx->point_format = MBEDTLS_ECP_PF_UNCOMPRESSED; - ctx->var = MBEDTLS_ECDH_VARIANT_MBEDTLS_2_0; - ctx->grp_id = grp_id; - ecdh_init_internal( &ctx->ctx.mbed_ecdh ); - return( ecdh_setup_internal( &ctx->ctx.mbed_ecdh, grp_id ) ); + default: + ctx->point_format = MBEDTLS_ECP_PF_UNCOMPRESSED; + ctx->var = MBEDTLS_ECDH_VARIANT_MBEDTLS_2_0; + ctx->grp_id = grp_id; + ecdh_init_internal( &ctx->ctx.mbed_ecdh ); + return( ecdh_setup_internal( &ctx->ctx.mbed_ecdh, grp_id ) ); } #endif } diff --git a/library/ecdsa.c b/library/ecdsa.c index f34652650..162e62f02 100644 --- a/library/ecdsa.c +++ b/library/ecdsa.c @@ -383,10 +383,10 @@ int mbedtls_ecdsa_can_do( mbedtls_ecp_group_id gid ) switch( gid ) { #ifdef MBEDTLS_ECP_DP_CURVE25519_ENABLED - case MBEDTLS_ECP_DP_CURVE25519: return 0; + case MBEDTLS_ECP_DP_CURVE25519: return 0; #endif #ifdef MBEDTLS_ECP_DP_CURVE448_ENABLED - case MBEDTLS_ECP_DP_CURVE448: return 0; + case MBEDTLS_ECP_DP_CURVE448: return 0; #endif default: return 1; }