mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2026-09-15 14:49:57 +00:00
Always print detailed cert errors in test programs
Previously the client was only printing them on handshake success, and the server was printing them on success and some but not all failures. This makes ssl-opt.sh more consistent as we can always check for the presence of the expected message in the output, regardless of whether the failure is hard or soft. Signed-off-by: Manuel Pégourié-Gonnard <[email protected]>
This commit is contained in:
committed by
Elena Uziunaite
parent
4956e32538
commit
92a391e0fe
@@ -3504,7 +3504,8 @@ handshake:
|
||||
(unsigned int) -ret);
|
||||
|
||||
#if defined(MBEDTLS_SSL_HANDSHAKE_WITH_CERT_ENABLED)
|
||||
if (ret == MBEDTLS_ERR_X509_CERT_VERIFY_FAILED) {
|
||||
if (ret == MBEDTLS_ERR_X509_CERT_VERIFY_FAILED ||
|
||||
ret == MBEDTLS_ERR_SSL_BAD_CERTIFICATE) {
|
||||
char vrfy_buf[512];
|
||||
flags = mbedtls_ssl_get_verify_result(&ssl);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user