diff options
author | Matt Caswell <matt@openssl.org> | 2018-05-03 15:59:31 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2018-05-08 09:40:17 +0100 |
commit | 6f6da2fe1710842c37c73ed2b114cf6942221db6 (patch) | |
tree | 01c76cab8478e7b3eb6e71d1841ec4f6fd74bf3d /apps/s_server.c | |
parent | f20404fce90919b614b737d07cc75d9e1c019fb8 (diff) | |
download | openssl-6f6da2fe1710842c37c73ed2b114cf6942221db6.tar.gz |
Fix s_client and s_server so that they correctly handle the DTLS timer
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6170)
Diffstat (limited to 'apps/s_server.c')
-rw-r--r-- | apps/s_server.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/apps/s_server.c b/apps/s_server.c index ef39a4f538..b0e9659b52 100644 --- a/apps/s_server.c +++ b/apps/s_server.c @@ -2398,18 +2398,15 @@ static int sv_body(int s, int stype, int prot, unsigned char *context) if ((i < 0) || (!i && !read_from_terminal)) continue; #else - if ((SSL_version(con) == DTLS1_VERSION) && - DTLSv1_get_timeout(con, &timeout)) + if (SSL_is_dtls(con) && DTLSv1_get_timeout(con, &timeout)) timeoutp = &timeout; else timeoutp = NULL; i = select(width, (void *)&readfds, NULL, NULL, timeoutp); - if ((SSL_version(con) == DTLS1_VERSION) - && DTLSv1_handle_timeout(con) > 0) { + if ((SSL_is_dtls(con)) && DTLSv1_handle_timeout(con) > 0) BIO_printf(bio_err, "TIMEOUT occurred\n"); - } if (i <= 0) continue; |