Skip to content
This repository has been archived by the owner on Apr 13, 2019. It is now read-only.

Commit

Permalink
tests: fix TLS handshake failure with TLS 1.3
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Daniel P. Berrangé <[email protected]>
  • Loading branch information
berrange committed Jul 24, 2018
1 parent 68db131 commit db0a8c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test-crypto-tlssession.c
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit db0a8c7

Please sign in to comment.