Correct compile-time guard around unhexify() in ssl_server2

This commit is contained in:
Hanno Becker 2019-04-30 14:18:06 +01:00
parent 31f1668d3c
commit 2e0bedcc35

View file

@ -759,7 +759,8 @@ int sni_callback( void *p_info, mbedtls_ssl_context *ssl,
#endif /* SNI_OPTION */
#if defined(MBEDTLS_KEY_EXCHANGE__SOME__PSK_ENABLED)
#if defined(MBEDTLS_KEY_EXCHANGE__SOME__PSK_ENABLED) || \
defined(MBEDTLS_SSL_CID)
#define HEX2NUM( c ) \
if( c >= '0' && c <= '9' ) \
@ -799,6 +800,10 @@ int unhexify( unsigned char *output, const char *input, size_t *olen )
return( 0 );
}
#endif
#if defined(MBEDTLS_KEY_EXCHANGE__SOME__PSK_ENABLED)
typedef struct _psk_entry psk_entry;
struct _psk_entry