From 1218bc0f74a14436915e6c0807be0e3f752b9da4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Fri, 17 Aug 2018 10:51:26 +0200 Subject: [PATCH] Add simple interop tests (reliable connection) --- tests/ssl-opt.sh | 114 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 114 insertions(+) diff --git a/tests/ssl-opt.sh b/tests/ssl-opt.sh index 397c565fe..86e9f1e06 100755 --- a/tests/ssl-opt.sh +++ b/tests/ssl-opt.sh @@ -5253,6 +5253,120 @@ run_test "DTLS fragmenting: proxy MTU + 3d" \ -c "found fragmented DTLS handshake message" \ -C "error" +# here and below we just want to test that the we fragment in a way that +# pleases other implementations, so we don't need the peer to fragment +requires_config_enabled MBEDTLS_SSL_PROTO_DTLS +requires_config_enabled MBEDTLS_RSA_C +requires_config_enabled MBEDTLS_ECDSA_C +requires_config_enabled MBEDTLS_SSL_PROTO_TLS1_2 +run_test "DTLS fragmenting: gnutls server, DTLS 1.2" \ + "$G_SRV -u" \ + "$P_CLI dtls=1 debug_level=2 \ + crt_file=data_files/server8_int-ca2.crt \ + key_file=data_files/server8.key \ + mtu=512 force_version=dtls1_2" \ + 0 \ + -c "fragmenting handshake message" \ + -C "error" + +requires_config_enabled MBEDTLS_SSL_PROTO_DTLS +requires_config_enabled MBEDTLS_RSA_C +requires_config_enabled MBEDTLS_ECDSA_C +requires_config_enabled MBEDTLS_SSL_PROTO_TLS1_1 +run_test "DTLS fragmenting: gnutls server, DTLS 1.0" \ + "$G_SRV -u" \ + "$P_CLI dtls=1 debug_level=2 \ + crt_file=data_files/server8_int-ca2.crt \ + key_file=data_files/server8.key \ + mtu=512 force_version=dtls1_2" \ + 0 \ + -c "fragmenting handshake message" \ + -C "error" + +# gnutls-cli always tries IPv6 first, and doesn't fall back to IPv4 with DTLS +requires_ipv6 +requires_config_enabled MBEDTLS_SSL_PROTO_DTLS +requires_config_enabled MBEDTLS_RSA_C +requires_config_enabled MBEDTLS_ECDSA_C +requires_config_enabled MBEDTLS_SSL_PROTO_TLS1_2 +run_test "DTLS fragmenting: gnutls client, DTLS 1.2" \ + "$P_SRV dtls=1 debug_level=2 server_addr=::1 \ + crt_file=data_files/server7_int-ca.crt \ + key_file=data_files/server7.key \ + mtu=512 force_version=dtls1_2" \ + "$G_CLI -u" \ + 0 \ + -s "fragmenting handshake message" + +# gnutls-cli always tries IPv6 first, and doesn't fall back to IPv4 with DTLS +requires_ipv6 +requires_config_enabled MBEDTLS_SSL_PROTO_DTLS +requires_config_enabled MBEDTLS_RSA_C +requires_config_enabled MBEDTLS_ECDSA_C +requires_config_enabled MBEDTLS_SSL_PROTO_TLS1_1 +run_test "DTLS fragmenting: gnutls client, DTLS 1.0" \ + "$P_SRV dtls=1 debug_level=2 server_addr=::1 \ + crt_file=data_files/server7_int-ca.crt \ + key_file=data_files/server7.key \ + mtu=512 force_version=dtls1" \ + "$G_CLI -u" \ + 0 \ + -s "fragmenting handshake message" + +requires_config_enabled MBEDTLS_SSL_PROTO_DTLS +requires_config_enabled MBEDTLS_RSA_C +requires_config_enabled MBEDTLS_ECDSA_C +requires_config_enabled MBEDTLS_SSL_PROTO_TLS1_2 +run_test "DTLS fragmenting: openssl server, DTLS 1.2" \ + "$O_SRV -dtls1_2 -verify 10" \ + "$P_CLI dtls=1 debug_level=2 \ + crt_file=data_files/server8_int-ca2.crt \ + key_file=data_files/server8.key \ + mtu=512 force_version=dtls1_2" \ + 0 \ + -c "fragmenting handshake message" \ + -C "error" + +requires_config_enabled MBEDTLS_SSL_PROTO_DTLS +requires_config_enabled MBEDTLS_RSA_C +requires_config_enabled MBEDTLS_ECDSA_C +requires_config_enabled MBEDTLS_SSL_PROTO_TLS1_1 +run_test "DTLS fragmenting: openssl server, DTLS 1.0" \ + "$O_SRV -dtls1 -verify 10" \ + "$P_CLI dtls=1 debug_level=2 \ + crt_file=data_files/server8_int-ca2.crt \ + key_file=data_files/server8.key \ + mtu=512 force_version=dtls1" \ + 0 \ + -c "fragmenting handshake message" \ + -C "error" + +requires_config_enabled MBEDTLS_SSL_PROTO_DTLS +requires_config_enabled MBEDTLS_RSA_C +requires_config_enabled MBEDTLS_ECDSA_C +requires_config_enabled MBEDTLS_SSL_PROTO_TLS1_2 +run_test "DTLS fragmenting: openssl client, DTLS 1.2" \ + "$P_SRV dtls=1 debug_level=2 \ + crt_file=data_files/server7_int-ca.crt \ + key_file=data_files/server7.key \ + mtu=512 force_version=dtls1_2" \ + "$O_CLI -dtls1_2" \ + 0 \ + -s "fragmenting handshake message" + +requires_config_enabled MBEDTLS_SSL_PROTO_DTLS +requires_config_enabled MBEDTLS_RSA_C +requires_config_enabled MBEDTLS_ECDSA_C +requires_config_enabled MBEDTLS_SSL_PROTO_TLS1_1 +run_test "DTLS fragmenting: openssl client, DTLS 1.0" \ + "$P_SRV dtls=1 debug_level=2 \ + crt_file=data_files/server7_int-ca.crt \ + key_file=data_files/server7.key \ + mtu=512 force_version=dtls1" \ + "$O_CLI -dtls1" \ + 0 \ + -s "fragmenting handshake message" + # Tests for specific things with "unreliable" UDP connection not_with_valgrind # spurious resend due to timeout