mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-04-18 05:42:35 +00:00
ECDH: Fix whitespace and permission problems
This commit is contained in:
parent
0082f9df6f
commit
ea24394c03
12
3rdparty/CMakeLists.txt
vendored
Executable file → Normal file
12
3rdparty/CMakeLists.txt
vendored
Executable file → Normal file
@ -1,6 +1,6 @@
|
|||||||
add_subdirectory(everest)
|
add_subdirectory(everest)
|
||||||
|
|
||||||
set(src_thirdparty
|
set(src_thirdparty
|
||||||
${src_everest}
|
${src_everest}
|
||||||
PARENT_SCOPE
|
PARENT_SCOPE
|
||||||
)
|
)
|
||||||
|
19
3rdparty/everest/CMakeLists.txt
vendored
Executable file → Normal file
19
3rdparty/everest/CMakeLists.txt
vendored
Executable file → Normal file
@ -1,9 +1,10 @@
|
|||||||
include_directories(include include/everest include/everest/kremlib)
|
include_directories(include include/everest include/everest/kremlib)
|
||||||
|
|
||||||
set(src_everest
|
set(src_everest
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/library/everest.c
|
${CMAKE_CURRENT_SOURCE_DIR}/library/everest.c
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/library/Hacl_Curve25519.c
|
${CMAKE_CURRENT_SOURCE_DIR}/library/Hacl_Curve25519.c
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/library/x25519.c
|
${CMAKE_CURRENT_SOURCE_DIR}/library/x25519.c
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/library/kremlib/FStar_UInt64_FStar_UInt32_FStar_UInt16_FStar_UInt8.c
|
${CMAKE_CURRENT_SOURCE_DIR}/library/kremlib/FStar_UInt64_FStar_UInt32_FStar_UInt16_FStar_UInt8.c
|
||||||
PARENT_SCOPE
|
PARENT_SCOPE
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -24,7 +24,9 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* TODO: review these two definitions and understand why they're needed. */
|
/* Since KreMLin emits the inline keyword unconditionally, we follow the
|
||||||
|
* guidelines at https://gcc.gnu.org/onlinedocs/gcc/Inline.html and make this
|
||||||
|
* __inline__ to ensure the code compiles with -std=c90 and earlier. */
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
# define inline __inline__
|
# define inline __inline__
|
||||||
#endif
|
#endif
|
||||||
|
0
3rdparty/everest/include/everest/x25519.h
vendored
Executable file → Normal file
0
3rdparty/everest/include/everest/x25519.h
vendored
Executable file → Normal file
0
include/mbedtls/ecdsa.h
Executable file → Normal file
0
include/mbedtls/ecdsa.h
Executable file → Normal file
24
library/ecdh.c
Executable file → Normal file
24
library/ecdh.c
Executable file → Normal file
@ -220,20 +220,18 @@ int mbedtls_ecdh_setup( mbedtls_ecdh_context *ctx, mbedtls_ecp_group_id grp_id )
|
|||||||
switch( grp_id )
|
switch( grp_id )
|
||||||
{
|
{
|
||||||
#if defined(MBEDTLS_ECDH_VARIANT_EVEREST_ENABLED)
|
#if defined(MBEDTLS_ECDH_VARIANT_EVEREST_ENABLED)
|
||||||
case MBEDTLS_ECP_DP_CURVE25519:
|
case MBEDTLS_ECP_DP_CURVE25519:
|
||||||
{
|
ctx->point_format = MBEDTLS_ECP_PF_COMPRESSED;
|
||||||
ctx->point_format = MBEDTLS_ECP_PF_COMPRESSED;
|
ctx->var = MBEDTLS_ECDH_VARIANT_EVEREST;
|
||||||
ctx->var = MBEDTLS_ECDH_VARIANT_EVEREST;
|
ctx->grp_id = grp_id;
|
||||||
ctx->grp_id = grp_id;
|
return( mbedtls_everest_setup( &ctx->ctx.everest_ecdh, grp_id ) );
|
||||||
return( mbedtls_everest_setup( &ctx->ctx.everest_ecdh, grp_id ) );
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
default:
|
default:
|
||||||
ctx->point_format = MBEDTLS_ECP_PF_UNCOMPRESSED;
|
ctx->point_format = MBEDTLS_ECP_PF_UNCOMPRESSED;
|
||||||
ctx->var = MBEDTLS_ECDH_VARIANT_MBEDTLS_2_0;
|
ctx->var = MBEDTLS_ECDH_VARIANT_MBEDTLS_2_0;
|
||||||
ctx->grp_id = grp_id;
|
ctx->grp_id = grp_id;
|
||||||
ecdh_init_internal( &ctx->ctx.mbed_ecdh );
|
ecdh_init_internal( &ctx->ctx.mbed_ecdh );
|
||||||
return( ecdh_setup_internal( &ctx->ctx.mbed_ecdh, grp_id ) );
|
return( ecdh_setup_internal( &ctx->ctx.mbed_ecdh, grp_id ) );
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
0
library/ecdsa.c
Executable file → Normal file
0
library/ecdsa.c
Executable file → Normal file
0
programs/test/benchmark.c
Executable file → Normal file
0
programs/test/benchmark.c
Executable file → Normal file
Loading…
x
Reference in New Issue
Block a user