mbedtls/tests
Manuel Pégourié-Gonnard 34aa187df6 Force IPv4 for gnutls-cli DTLS tests
Depending on the settings of the local machine, gnutls-cli will either try
IPv4 or IPv6 when trying to connect to localhost. With TLS, whatever it tries
first, it will notice if any failure happens and try the other protocol if
necessary. With DTLS it can't do that. Unfortunately for now there isn't
really any good way to specify an address and hostname independently, though
that might come soon: https://gitlab.com/gnutls/gnutls/issues/344

A work around is to specify an address directly and then use --insecure to
ignore certificate hostname mismatch; that is OK for tests that are completely
unrelated to certificate verification (such as the recent fragmenting tests)
but unacceptable for others.

For that reason, don't specify a default hostname for gnutls-cli, but instead
let each test choose between `--insecure 127.0.0.1` and `localhost` (or
`--insecure '::1'` if desired).

Alternatives include:
- having test certificates with 127.0.0.1 as the hostname, but having an IP as
  the CN is unusual, and we would need to change our test certs;
- have our server open two sockets under the hood and listen on both IPv4 and
  IPv6 (that's what gnutls-serv does, and IMO it's a good thing) but that
obviously requires development and testing (esp. for windows compatibility)
- wait for a newer version of GnuTLS to be released, install it on the CI and
  developer machines, and use that in all tests - quite satisfying but can't
be done now (and puts stronger requirements on test environment).
2018-08-23 19:07:15 +02:00
..
data_files Merge remote-tracking branch 'upstream-public/pr/1379' into development-proposed 2018-03-29 10:57:57 +01:00
git-scripts Add check-files.py to pre-push.sh 2018-05-21 11:41:18 +01:00
scripts Merge remote-tracking branch 'public/pr/779' into development 2018-07-24 17:20:36 +01:00
suites Change test dependencies to RC4 from DES 2018-07-27 17:15:39 +01:00
.gitignore Move some ignore patterns to subdirectories 2015-01-28 15:33:23 +00:00
CMakeLists.txt Merge remote-tracking branch 'public/pr/1198' into development 2018-07-24 17:20:17 +01:00
compat.sh Add ChachaPoly ciphersuites to compat.sh 2018-06-19 13:16:30 +02:00
Descriptions.txt Add selftest program to the list of tests 2014-04-04 16:33:01 +02:00
Makefile Merge remote-tracking branch 'public/pr/1198' into development 2018-07-24 17:20:17 +01:00
ssl-opt.sh Force IPv4 for gnutls-cli DTLS tests 2018-08-23 19:07:15 +02:00