Dependency fixes

This commit is contained in:
Manuel Pégourié-Gonnard 2013-10-15 11:54:47 +02:00
parent 09258b9537
commit bac0e3b7d2
3 changed files with 12 additions and 3 deletions

View File

@ -251,9 +251,12 @@ static void debug_print_pk( const ssl_context *ssl, int level,
if( items[i].type == POLARSSL_PK_DEBUG_MPI ) if( items[i].type == POLARSSL_PK_DEBUG_MPI )
debug_print_mpi( ssl, level, file, line, name, items[i].value ); debug_print_mpi( ssl, level, file, line, name, items[i].value );
else if( items[i].type == POLARSSL_PK_DEBUG_ECP ) else
#if defined(POLARSSL_ECP_C)
if( items[i].type == POLARSSL_PK_DEBUG_ECP )
debug_print_ecp( ssl, level, file, line, name, items[i].value ); debug_print_ecp( ssl, level, file, line, name, items[i].value );
else else
#endif
debug_print_msg( ssl, level, file, line, "should not happen" ); debug_print_msg( ssl, level, file, line, "should not happen" );
} }
} }

View File

@ -1316,12 +1316,16 @@ static int ssl_parse_server_key_exchange( ssl_context *ssl )
SSL_DEBUG_MSG( 2, ( "=> parse server key exchange" ) ); SSL_DEBUG_MSG( 2, ( "=> parse server key exchange" ) );
#if defined(POLARSSL_KEY_EXCHANGE_RSA_ENABLED)
if( ciphersuite_info->key_exchange == POLARSSL_KEY_EXCHANGE_RSA ) if( ciphersuite_info->key_exchange == POLARSSL_KEY_EXCHANGE_RSA )
{ {
SSL_DEBUG_MSG( 2, ( "<= skip parse server key exchange" ) ); SSL_DEBUG_MSG( 2, ( "<= skip parse server key exchange" ) );
ssl->state++; ssl->state++;
return( 0 ); return( 0 );
} }
((void) p);
((void) end);
#endif
if( ( ret = ssl_read_record( ssl ) ) != 0 ) if( ( ret = ssl_read_record( ssl ) ) != 0 )
{ {

View File

@ -2284,7 +2284,8 @@ static int ssl_parse_client_dh_public( ssl_context *ssl, unsigned char **p,
#endif /* POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED || #endif /* POLARSSL_KEY_EXCHANGE_DHE_RSA_ENABLED ||
POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED */ POLARSSL_KEY_EXCHANGE_DHE_PSK_ENABLED */
#if defined(POLARSSL_KEY_EXCHANGE_RSA_ENABLED) #if defined(POLARSSL_KEY_EXCHANGE_RSA_ENABLED) || \
defined(POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED)
static int ssl_parse_encrypted_pms( ssl_context *ssl, static int ssl_parse_encrypted_pms( ssl_context *ssl,
const unsigned char *p, const unsigned char *p,
const unsigned char *end, const unsigned char *end,
@ -2348,7 +2349,8 @@ static int ssl_parse_encrypted_pms( ssl_context *ssl,
return( ret ); return( ret );
} }
#endif /* POLARSSL_KEY_EXCHANGE_RSA_ENABLED */ #endif /* POLARSSL_KEY_EXCHANGE_RSA_ENABLED ||
POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED */
#if defined(POLARSSL_KEY_EXCHANGE__SOME__PSK_ENABLED) #if defined(POLARSSL_KEY_EXCHANGE__SOME__PSK_ENABLED)
static int ssl_parse_client_psk_identity( ssl_context *ssl, unsigned char **p, static int ssl_parse_client_psk_identity( ssl_context *ssl, unsigned char **p,