Skip to content

Commit e43805e

Browse files
committed
fix warnings without psk
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
1 parent 542616a commit e43805e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

library/ssl_tls13_server.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2262,13 +2262,15 @@ static int ssl_client_hello_parse( mbedtls_ssl_context* ssl,
22622262
int ret;
22632263
size_t i, j;
22642264
size_t comp_len, sess_len;
2265-
size_t ciph_len, ext_len, ext_len_psk_ext = 0;
2265+
size_t ciph_len, ext_len;
22662266
unsigned char *orig_buf, *end = buf + buflen;
22672267
unsigned char *ciph_offset;
22682268
unsigned char *p = NULL;
22692269
unsigned char *ext = NULL;
22702270
unsigned char *ext_psk_ptr = NULL;
2271-
2271+
#if defined(MBEDTLS_KEY_EXCHANGE_SOME_PSK_ENABLED)
2272+
size_t ext_len_psk_ext = 0;
2273+
#endif
22722274
const int* ciphersuites;
22732275
const mbedtls_ssl_ciphersuite_t* ciphersuite_info;
22742276

0 commit comments

Comments
 (0)