tests: fix TLS handshake failure with TLS 1.3
commitdb0a8c70f25fe497c4b786d8edac063daa744c0d
authorDaniel P. Berrangé <berrange@redhat.com>
Wed, 18 Jul 2018 09:24:59 +0000 (18 10:24 +0100)
committerDaniel P. Berrangé <berrange@redhat.com>
Tue, 24 Jul 2018 16:36:12 +0000 (24 17:36 +0100)
treeaedfa592cee91f1cde2d85901130c211798d4c99
parent68db13183f2d3193476f5d5457c47fa10ba0f9e3
tests: fix TLS handshake failure with TLS 1.3

When gnutls negotiates TLS 1.3 instead of 1.2, the order of messages
sent by the handshake changes. This exposed a logic bug in the test
suite which caused us to wait for the server to see handshake
completion, but not wait for the client to see completion. The result
was the client didn't receive the certificate for verification and the
test failed.

This is exposed in Fedora 29 rawhide which has just enabled TLS 1.3 in
its GNUTLS builds.

Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
tests/test-crypto-tlssession.c