Skip to content

Commit

Permalink
mbedtls_ssl_tls13_get_sig_alg_from_pk: remove debug prints as they ar…
Browse files Browse the repository at this point in the history
…e causing issues

This commit needs to be dropped when real reason is found for:

Sign alg from PK: RSA_PSS(SHA256), not supported .................. ==587199==WARNING: MemorySanitizer: use-of-uninitialized-value
    #0 0x4cd774 in mbedtls_debug_print_msg (/home/przemek/mbedtls/tests/test_suite_ssl+0x4cd774)
    Mbed-TLS#1 0x536e76 in mbedtls_ssl_tls13_get_sig_alg_from_pk (/home/przemek/mbedtls/tests/test_suite_ssl+0x536e76)
    Mbed-TLS#2 0x4beeb7 in test_get_sig_alg_from_pk (/home/przemek/mbedtls/tests/test_suite_ssl+0x4beeb7)
    Mbed-TLS#3 0x4bf2dc in test_get_sig_alg_from_pk_wrapper (/home/przemek/mbedtls/tests/test_suite_ssl+0x4bf2dc)
    Mbed-TLS#4 0x4c199f in execute_tests (/home/przemek/mbedtls/tests/test_suite_ssl+0x4c199f)
    Mbed-TLS#5 0x4c2e86 in main (/home/przemek/mbedtls/tests/test_suite_ssl+0x4c2e86)
    Mbed-TLS#6 0x7f4a5c8c60b2 in __libc_start_main /build/glibc-sMfBJT/glibc-2.31/csu/../csu/libc-start.c:308:16
    Mbed-TLS#7 0x41c37d in _start (/home/przemek/mbedtls/tests/test_suite_ssl+0x41c37d)

Signed-off-by: Przemek Stekiel <[email protected]>
  • Loading branch information
mprse committed Jun 20, 2022
1 parent bea2359 commit e03cd51
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions library/ssl_tls13_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -898,10 +898,7 @@ int mbedtls_ssl_tls13_get_sig_alg_from_pk( mbedtls_ssl_context *ssl,
}
break;
default:
MBEDTLS_SSL_DEBUG_MSG( 3,
( "unknown key size: %"
MBEDTLS_PRINTF_SIZET " bits",
own_key_size ) );
// do nothing
break;
}
break;
Expand Down Expand Up @@ -981,22 +978,19 @@ int mbedtls_ssl_tls13_get_sig_alg_from_pk( mbedtls_ssl_context *ssl,
else
#endif /* MBEDTLS_SHA512_C */
{
MBEDTLS_SSL_DEBUG_MSG( 1,
( "Unable to find matching PKCS1 signature alg" ) );
// do nothing
}
}
else
{
MBEDTLS_SSL_DEBUG_MSG( 1,
( "Unable to find matching RSA signature alg" ) );
// do nothing
}
#endif /* MBEDTLS_PKCS1_V15 */

break;
#endif /* MBEDTLS_RSA_C */
default:
MBEDTLS_SSL_DEBUG_MSG( 1,
( "unknown signature type : %u", sig ) );
// do nothing
break;
}
return( -1 );
Expand Down

0 comments on commit e03cd51

Please sign in to comment.