diff options
author | Daniel P. Berrangé <berrange@redhat.com> | 2018-07-18 10:24:59 +0100 |
---|---|---|
committer | Daniel P. Berrangé <berrange@redhat.com> | 2018-07-24 17:36:12 +0100 |
commit | db0a8c70f25fe497c4b786d8edac063daa744c0d (patch) | |
tree | aedfa592cee91f1cde2d85901130c211798d4c99 /tests/test-crypto-tlssession.c | |
parent | 68db13183f2d3193476f5d5457c47fa10ba0f9e3 (diff) |
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>
Diffstat (limited to 'tests/test-crypto-tlssession.c')
-rw-r--r-- | tests/test-crypto-tlssession.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test-crypto-tlssession.c b/tests/test-crypto-tlssession.c index fd9acf9067..6fa9950afb 100644 --- a/tests/test-crypto-tlssession.c +++ b/tests/test-crypto-tlssession.c @@ -151,7 +151,7 @@ static void test_crypto_tls_session_psk(void) clientShake = true; } } - } while (!clientShake && !serverShake); + } while (!clientShake || !serverShake); /* Finally make sure the server & client validation is successful. */ @@ -341,7 +341,7 @@ static void test_crypto_tls_session_x509(const void *opaque) clientShake = true; } } - } while (!clientShake && !serverShake); + } while (!clientShake || !serverShake); /* Finally make sure the server validation does what |