mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-29 11:41:15 +03:00
Test ssl_pthread_server
Test ssl_pthread_server with both TLS 1.2 and TLS 1.3. Test against both OpenSSL and GnuTLS. In the server, flush more often. Otherwise, when stdout is redirected to a file, the server gets killed before it writes important information, such as the logs that we expect in the test cases. Clean up compile-time requirements in ssl_pthread_server.c: any certificate-based key exchange is ok, so don't insist on built-in RSA. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
@ -118,3 +118,47 @@ run_test "Sample: ssl_server, gnutls client, TLS 1.3" \
|
||||
-c "Description:.*TLS1.3" \
|
||||
-S "error" \
|
||||
-C "ERROR"
|
||||
|
||||
requires_protocol_version tls12
|
||||
run_test "Sample: ssl_pthread_server, openssl client, TLS 1.2" \
|
||||
-P 4433 \
|
||||
"$PROGRAMS_DIR/ssl_pthread_server" \
|
||||
"$O_CLI -tls1_2" \
|
||||
0 \
|
||||
-s "Successful connection using: TLS-" \
|
||||
-c "New, TLSv1.2, Cipher is" \
|
||||
-S "error" \
|
||||
-C "ERROR"
|
||||
|
||||
requires_protocol_version tls12
|
||||
run_test "Sample: ssl_pthread_server, gnutls client, TLS 1.2" \
|
||||
-P 4433 \
|
||||
"$PROGRAMS_DIR/ssl_pthread_server" \
|
||||
"$G_CLI --priority=NORMAL:-VERS-TLS-ALL:+VERS-TLS1.2 localhost" \
|
||||
0 \
|
||||
-s "Successful connection using: TLS-" \
|
||||
-c "Description:.*TLS1.2" \
|
||||
-S "error" \
|
||||
-C "ERROR"
|
||||
|
||||
requires_protocol_version tls13
|
||||
run_test "Sample: ssl_pthread_server, openssl client, TLS 1.3" \
|
||||
-P 4433 \
|
||||
"$PROGRAMS_DIR/ssl_pthread_server" \
|
||||
"$O_CLI -tls1_3" \
|
||||
0 \
|
||||
-s "Successful connection using: TLS1-3-" \
|
||||
-c "New, TLSv1.3, Cipher is" \
|
||||
-S "error" \
|
||||
-C "ERROR"
|
||||
|
||||
requires_protocol_version tls13
|
||||
run_test "Sample: ssl_pthread_server, gnutls client, TLS 1.3" \
|
||||
-P 4433 \
|
||||
"$PROGRAMS_DIR/ssl_pthread_server" \
|
||||
"$G_CLI --priority=NORMAL:-VERS-TLS-ALL:+VERS-TLS1.3 localhost" \
|
||||
0 \
|
||||
-s "Successful connection using: TLS1-3-" \
|
||||
-c "Description:.*TLS1.3" \
|
||||
-S "error" \
|
||||
-C "ERROR"
|
||||
|
Reference in New Issue
Block a user