diff options
author | Christoph M. Wintersteiger <cwinter@microsoft.com> | 2019-04-15 12:00:16 +0100 |
---|---|---|
committer | Janos Follath <janos.follath@arm.com> | 2019-08-19 13:37:46 +0100 |
commit | 0969eeecbc85f2df7561b1598efa1f611d26479f (patch) | |
tree | 2f5aa3e649501768413a43dabb366c7095d2f756 /3rdparty | |
parent | 19d5c80c338b6e71ec0d4ff7b27c578bf2b97c75 (diff) | |
download | mbedtls-0969eeecbc85f2df7561b1598efa1f611d26479f.zip mbedtls-0969eeecbc85f2df7561b1598efa1f611d26479f.tar.gz mbedtls-0969eeecbc85f2df7561b1598efa1f611d26479f.tar.bz2 |
3rdparty: Fix Everest's mbedtls_x25519_get_params
Diffstat (limited to '3rdparty')
-rw-r--r-- | 3rdparty/everest/library/x25519.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/3rdparty/everest/library/x25519.c b/3rdparty/everest/library/x25519.c index c3bc862..990bb4d 100644 --- a/3rdparty/everest/library/x25519.c +++ b/3rdparty/everest/library/x25519.c @@ -112,14 +112,9 @@ int mbedtls_x25519_get_params( mbedtls_x25519_context *ctx, const mbedtls_ecp_ke switch( side ) { case MBEDTLS_X25519_ECDH_THEIRS: - mbedtls_ecp_point_write_binary( &key->grp, &key->Q, MBEDTLS_ECP_PF_COMPRESSED, &olen, ctx->peer_point, MBEDTLS_X25519_KEY_SIZE_BYTES ); - /* untested; defensively throw an error for now. */ - return(MBEDTLS_ERR_ECP_FEATURE_UNAVAILABLE); + return mbedtls_ecp_point_write_binary( &key->grp, &key->Q, MBEDTLS_ECP_PF_COMPRESSED, &olen, ctx->peer_point, MBEDTLS_X25519_KEY_SIZE_BYTES ); case MBEDTLS_X25519_ECDH_OURS: - mbedtls_mpi_write_binary( &key->d, ctx->our_secret, MBEDTLS_X25519_KEY_SIZE_BYTES ); - /* CMW: key->Q = key->d * base; do we need to set up ctx.peer_point here? */ - /* untested; defensively throw an error for now. */ - return( MBEDTLS_ERR_ECP_FEATURE_UNAVAILABLE ); + return mbedtls_mpi_write_binary_le( &key->d, ctx->our_secret, MBEDTLS_X25519_KEY_SIZE_BYTES ); default: return( MBEDTLS_ERR_ECP_BAD_INPUT_DATA ); } |