tests: fix TLS handshake failure with TLS 1.3
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.

Signed-off-by: Daniel P. Berrangé <bb938cf255e055ff3507f2627d214e8e62118fcf@redhat.com>

olafhering/libvirt,nertpinx/libvirt,fabianfreyer/libvirt,jardasgit/libvirt,jardasgit/libvirt,fabianfreyer/libvirt,olafhering/libvirt,fabianfreyer/libvirt,eskultety/libvirt,libvirt/libvirt,andreabolognani/libvirt,jfehlig/libvirt,libvirt/libvirt,fabianfreyer/libvirt,libvirt/libvirt,crobinso/libvirt,eskultety/libvirt,jardasgit/libvirt,nertpinx/libvirt,nertpinx/libvirt,zippy2/libvirt,jardasgit/libvirt,jfehlig/libvirt,zippy2/libvirt,eskultety/libvirt,jfehlig/libvirt,crobinso/libvirt,eskultety/libvirt,zippy2/libvirt,andreabolognani/libvirt,nertpinx/libvirt,libvirt/libvirt,andreabolognani/libvirt,olafhering/libvirt,nertpinx/libvirt,crobinso/libvirt,olafhering/libvirt,andreabolognani/libvirt,eskultety/libvirt,zippy2/libvirt,andreabolognani/libvirt,fabianfreyer/libvirt,crobinso/libvirt,jfehlig/libvirt,jardasgit/libvirt