mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-25 19:45:44 +01:00
Fix unused parameters and ifdefs
Signed-off-by: Andrzej Kurek <andrzej.kurek@arm.com>
This commit is contained in:
parent
777d4217f1
commit
52e08cbcb2
@ -3654,14 +3654,14 @@ static int ssl_out_client_key_exchange_write( mbedtls_ssl_context *ssl,
|
||||
|
||||
{
|
||||
((void) n);
|
||||
|
||||
((void) ret);
|
||||
if( (size_t)( end - p ) < 2 * NUM_ECC_BYTES + 2 )
|
||||
return( MBEDTLS_ERR_SSL_BUFFER_TOO_SMALL );
|
||||
|
||||
*p++ = 2 * NUM_ECC_BYTES + 1;
|
||||
*p++ = 0x04; /* uncompressed point presentation */
|
||||
|
||||
#if defined(MBEDTLS_EARLY_KEY_COMPUTATION) && defined(MBEDTLS_USE_TINYCRYPT)
|
||||
#if defined(MBEDTLS_EARLY_KEY_COMPUTATION)
|
||||
memcpy( p, ssl->handshake->ecdh_publickey, 2 * NUM_ECC_BYTES );
|
||||
#else
|
||||
ret = uECC_make_key( p, ssl->handshake->ecdh_privkey );
|
||||
|
@ -12056,7 +12056,9 @@ void mbedtls_ssl_handshake_free( mbedtls_ssl_context *ssl )
|
||||
#endif
|
||||
#endif /* MBEDTLS_SSL_PROTO_TLS1_2 */
|
||||
|
||||
#if defined(MBEDTLS_SSL_FREE_SERVER_CERTIFICATE)
|
||||
#if defined(MBEDTLS_SSL_FREE_SERVER_CERTIFICATE) && \
|
||||
defined(MBEDTLS_X509_CRT_PARSE_C) && \
|
||||
defined(MBEDTLS_SSL_KEEP_PEER_CERTIFICATE)
|
||||
mbedtls_x509_crt_free( ssl->session_negotiate->peer_cert );
|
||||
mbedtls_free( ssl->session->peer_cert );
|
||||
ssl->session->peer_cert = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user