mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-04-21 05:42:43 +00:00
Fix warning in reduced configs
This commit is contained in:
parent
86b2908236
commit
eaecbd3ba8
@ -674,6 +674,9 @@ static int ssl_write_client_hello( ssl_context *ssl )
|
|||||||
ext_len += olen;
|
ext_len += olen;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* olen unused if all extensions are disabled */
|
||||||
|
((void) olen);
|
||||||
|
|
||||||
SSL_DEBUG_MSG( 3, ( "client hello, total extension length: %d",
|
SSL_DEBUG_MSG( 3, ( "client hello, total extension length: %d",
|
||||||
ext_len ) );
|
ext_len ) );
|
||||||
|
|
||||||
@ -892,7 +895,9 @@ static int ssl_parse_server_hello( ssl_context *ssl )
|
|||||||
size_t n;
|
size_t n;
|
||||||
size_t ext_len;
|
size_t ext_len;
|
||||||
unsigned char *buf, *ext;
|
unsigned char *buf, *ext;
|
||||||
|
#if defined(POLARSSL_SSL_RENEGOTIATION)
|
||||||
int renegotiation_info_seen = 0;
|
int renegotiation_info_seen = 0;
|
||||||
|
#endif
|
||||||
int handshake_failure = 0;
|
int handshake_failure = 0;
|
||||||
#if defined(POLARSSL_DEBUG_C)
|
#if defined(POLARSSL_DEBUG_C)
|
||||||
uint32_t t;
|
uint32_t t;
|
||||||
@ -1126,7 +1131,9 @@ static int ssl_parse_server_hello( ssl_context *ssl )
|
|||||||
{
|
{
|
||||||
case TLS_EXT_RENEGOTIATION_INFO:
|
case TLS_EXT_RENEGOTIATION_INFO:
|
||||||
SSL_DEBUG_MSG( 3, ( "found renegotiation extension" ) );
|
SSL_DEBUG_MSG( 3, ( "found renegotiation extension" ) );
|
||||||
|
#if defined(POLARSSL_SSL_RENEGOTIATION)
|
||||||
renegotiation_info_seen = 1;
|
renegotiation_info_seen = 1;
|
||||||
|
#endif
|
||||||
|
|
||||||
if( ( ret = ssl_parse_renegotiation_info( ssl, ext + 4,
|
if( ( ret = ssl_parse_renegotiation_info( ssl, ext + 4,
|
||||||
ext_size ) ) != 0 )
|
ext_size ) ) != 0 )
|
||||||
|
@ -1128,7 +1128,9 @@ static int ssl_parse_client_hello( ssl_context *ssl )
|
|||||||
unsigned int comp_len;
|
unsigned int comp_len;
|
||||||
unsigned int ext_len = 0;
|
unsigned int ext_len = 0;
|
||||||
unsigned char *buf, *p, *ext;
|
unsigned char *buf, *p, *ext;
|
||||||
|
#if defined(POLARSSL_SSL_RENEGOTIATION)
|
||||||
int renegotiation_info_seen = 0;
|
int renegotiation_info_seen = 0;
|
||||||
|
#endif
|
||||||
int handshake_failure = 0;
|
int handshake_failure = 0;
|
||||||
const int *ciphersuites;
|
const int *ciphersuites;
|
||||||
const ssl_ciphersuite_t *ciphersuite_info;
|
const ssl_ciphersuite_t *ciphersuite_info;
|
||||||
@ -1376,9 +1378,9 @@ static int ssl_parse_client_hello( ssl_context *ssl )
|
|||||||
|
|
||||||
return( POLARSSL_ERR_SSL_BAD_HS_CLIENT_HELLO );
|
return( POLARSSL_ERR_SSL_BAD_HS_CLIENT_HELLO );
|
||||||
}
|
}
|
||||||
|
renegotiation_info_seen = 1;
|
||||||
#endif /* POLARSSL_SSL_RENEGOTIATION */
|
#endif /* POLARSSL_SSL_RENEGOTIATION */
|
||||||
ssl->secure_renegotiation = SSL_SECURE_RENEGOTIATION;
|
ssl->secure_renegotiation = SSL_SECURE_RENEGOTIATION;
|
||||||
renegotiation_info_seen = 1;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1413,7 +1415,9 @@ static int ssl_parse_client_hello( ssl_context *ssl )
|
|||||||
|
|
||||||
case TLS_EXT_RENEGOTIATION_INFO:
|
case TLS_EXT_RENEGOTIATION_INFO:
|
||||||
SSL_DEBUG_MSG( 3, ( "found renegotiation extension" ) );
|
SSL_DEBUG_MSG( 3, ( "found renegotiation extension" ) );
|
||||||
|
#if defined(POLARSSL_SSL_RENEGOTIATION)
|
||||||
renegotiation_info_seen = 1;
|
renegotiation_info_seen = 1;
|
||||||
|
#endif
|
||||||
|
|
||||||
ret = ssl_parse_renegotiation_info( ssl, ext + 4, ext_size );
|
ret = ssl_parse_renegotiation_info( ssl, ext + 4, ext_size );
|
||||||
if( ret != 0 )
|
if( ret != 0 )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user