fix comments and wrong initial value issues
Signed-off-by: Jerry Yu <jerry.h.yu@arm.com>
This commit is contained in:
parent
5d01c05d93
commit
24b8c813c4
2 changed files with 6 additions and 10 deletions
|
@ -1694,7 +1694,7 @@ int mbedtls_ssl_set_hs_psk( mbedtls_ssl_context *ssl,
|
|||
#if defined(MBEDTLS_USE_PSA_CRYPTO)
|
||||
psa_key_attributes_t key_attributes = psa_key_attributes_init();
|
||||
psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED;
|
||||
psa_algorithm_t alg = PSA_ALG_ANY_HASH;
|
||||
psa_algorithm_t alg = PSA_ALG_NONE;
|
||||
mbedtls_svc_key_id_t key = MBEDTLS_SVC_KEY_ID_INIT;
|
||||
#endif /* MBEDTLS_USE_PSA_CRYPTO */
|
||||
|
||||
|
|
|
@ -1031,14 +1031,11 @@ static int ssl_tls13_parse_client_hello( mbedtls_ssl_context *ssl,
|
|||
*/
|
||||
MBEDTLS_SSL_CHK_BUF_READ_PTR( p, end, cipher_suites_len + 2 + 2 );
|
||||
|
||||
/*
|
||||
* uint8 CipherSuite[2]; // Cryptographic suite selector
|
||||
*
|
||||
* struct {
|
||||
* ...
|
||||
* CipherSuite cipher_suites<2..2^16-2>;
|
||||
* ...
|
||||
* } ClientHello;
|
||||
/* ...
|
||||
* CipherSuite cipher_suites<2..2^16-2>;
|
||||
* ...
|
||||
* with CipherSuite defined as:
|
||||
* uint8 CipherSuite[2];
|
||||
*/
|
||||
cipher_suites = p;
|
||||
cipher_suites_end = p + cipher_suites_len;
|
||||
|
@ -1293,7 +1290,6 @@ static int ssl_tls13_parse_client_hello( mbedtls_ssl_context *ssl,
|
|||
MBEDTLS_SSL_HS_CLIENT_HELLO,
|
||||
p - buf );
|
||||
|
||||
/* TODO: move later */
|
||||
#if defined(MBEDTLS_KEY_EXCHANGE_SOME_PSK_ENABLED)
|
||||
/* Update checksum with either
|
||||
* - The entire content of the CH message, if no PSK extension is present
|
||||
|
|
Loading…
Reference in a new issue