@@ -1884,7 +1884,7 @@ static int ssl_parse_server_key_exchange(mbedtls_ssl_context *ssl)
18841884 unsigned char hash [MBEDTLS_MD_MAX_SIZE ];
18851885
18861886 mbedtls_md_type_t md_alg = MBEDTLS_MD_NONE ;
1887- mbedtls_pk_type_t pk_alg = MBEDTLS_PK_NONE ;
1887+ mbedtls_pk_sigalg_t pk_alg = MBEDTLS_PK_SIGALG_NONE ;
18881888 unsigned char * params = ssl -> in_msg + mbedtls_ssl_hs_hdr_len (ssl );
18891889 size_t params_len = (size_t ) (p - params );
18901890 void * rs_ctx = NULL ;
@@ -1908,7 +1908,7 @@ static int ssl_parse_server_key_exchange(mbedtls_ssl_context *ssl)
19081908 */
19091909 MBEDTLS_SSL_CHK_BUF_READ_PTR (p , end , 2 );
19101910 sig_alg = MBEDTLS_GET_UINT16_BE (p , 0 );
1911- if (mbedtls_ssl_get_pk_type_and_md_alg_from_sig_alg (
1911+ if (mbedtls_ssl_get_pk_sigalg_and_md_alg_from_sig_alg (
19121912 sig_alg , & pk_alg , & md_alg ) != 0 &&
19131913 !mbedtls_ssl_sig_alg_is_offered (ssl , sig_alg ) &&
19141914 !mbedtls_ssl_sig_alg_is_supported (ssl , sig_alg )) {
@@ -1922,7 +1922,7 @@ static int ssl_parse_server_key_exchange(mbedtls_ssl_context *ssl)
19221922 }
19231923 p += 2 ;
19241924
1925- if (!mbedtls_pk_can_do (peer_pk , pk_alg )) {
1925+ if (!mbedtls_pk_can_do (peer_pk , ( mbedtls_pk_type_t ) pk_alg )) {
19261926 MBEDTLS_SSL_DEBUG_MSG (1 ,
19271927 ("bad server key exchange message" ));
19281928 mbedtls_ssl_send_alert_message (
@@ -1978,7 +1978,7 @@ static int ssl_parse_server_key_exchange(mbedtls_ssl_context *ssl)
19781978 /*
19791979 * Verify signature
19801980 */
1981- if (!mbedtls_pk_can_do (peer_pk , pk_alg )) {
1981+ if (!mbedtls_pk_can_do (peer_pk , ( mbedtls_pk_type_t ) pk_alg )) {
19821982 MBEDTLS_SSL_DEBUG_MSG (1 , ("bad server key exchange message" ));
19831983 mbedtls_ssl_send_alert_message (
19841984 ssl ,
@@ -1994,7 +1994,7 @@ static int ssl_parse_server_key_exchange(mbedtls_ssl_context *ssl)
19941994#endif
19951995
19961996#if defined(MBEDTLS_X509_RSASSA_PSS_SUPPORT )
1997- if (pk_alg == MBEDTLS_PK_RSASSA_PSS ) {
1997+ if (pk_alg == MBEDTLS_PK_SIGALG_RSA_PSS ) {
19981998 ret = mbedtls_pk_verify_ext ((mbedtls_pk_sigalg_t ) pk_alg , peer_pk ,
19991999 md_alg , hash , hashlen ,
20002000 p , sig_len );
@@ -2014,7 +2014,7 @@ static int ssl_parse_server_key_exchange(mbedtls_ssl_context *ssl)
20142014 MBEDTLS_SSL_ALERT_LEVEL_FATAL ,
20152015 MBEDTLS_SSL_ALERT_MSG_DECRYPT_ERROR );
20162016 }
2017- MBEDTLS_SSL_DEBUG_RET (1 , "mbedtls_pk_verify " , ret );
2017+ MBEDTLS_SSL_DEBUG_RET (1 , "mbedtls_pk_verify_restartable " , ret );
20182018#if defined(MBEDTLS_SSL_ECP_RESTARTABLE_ENABLED )
20192019 if (ret == MBEDTLS_ERR_ECP_IN_PROGRESS ) {
20202020 ret = MBEDTLS_ERR_SSL_CRYPTO_IN_PROGRESS ;
@@ -2565,8 +2565,8 @@ static int ssl_write_client_key_exchange(mbedtls_ssl_context *ssl)
25652565
25662566 mbedtls_ssl_handshake_increment_state (ssl );
25672567
2568- if ((ret = mbedtls_ssl_write_handshake_msg (ssl )) != 0 ) {
2569- MBEDTLS_SSL_DEBUG_RET (1 , "mbedtls_ssl_write_handshake_msg " , ret );
2568+ if ((ret = mbedtls_ssl_write_handshake_msg_ext (ssl , 1 , 1 )) != 0 ) {
2569+ MBEDTLS_SSL_DEBUG_RET (1 , "mbedtls_ssl_write_handshake_msg_ext " , ret );
25702570 return ret ;
25712571 }
25722572
@@ -2708,7 +2708,7 @@ static int ssl_write_certificate_verify(mbedtls_ssl_context *ssl)
27082708 out_buf_len - 6 - offset ,
27092709 & n ,
27102710 rs_ctx )) != 0 ) {
2711- MBEDTLS_SSL_DEBUG_RET (1 , "mbedtls_pk_sign " , ret );
2711+ MBEDTLS_SSL_DEBUG_RET (1 , "mbedtls_pk_sign_restartable " , ret );
27122712#if defined(MBEDTLS_SSL_ECP_RESTARTABLE_ENABLED )
27132713 if (ret == MBEDTLS_ERR_ECP_IN_PROGRESS ) {
27142714 ret = MBEDTLS_ERR_SSL_CRYPTO_IN_PROGRESS ;
@@ -2725,8 +2725,8 @@ static int ssl_write_certificate_verify(mbedtls_ssl_context *ssl)
27252725
27262726 mbedtls_ssl_handshake_increment_state (ssl );
27272727
2728- if ((ret = mbedtls_ssl_write_handshake_msg (ssl )) != 0 ) {
2729- MBEDTLS_SSL_DEBUG_RET (1 , "mbedtls_ssl_write_handshake_msg " , ret );
2728+ if ((ret = mbedtls_ssl_write_handshake_msg_ext (ssl , 1 , 1 )) != 0 ) {
2729+ MBEDTLS_SSL_DEBUG_RET (1 , "mbedtls_ssl_write_handshake_msg_ext " , ret );
27302730 return ret ;
27312731 }
27322732
0 commit comments