X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=apps%2Fs_client.c;h=96f9da698593baa4a4c9281bc528dc2e165f0dc6;hp=9d463f6d81c093e03f3520a9e63bb3c1e5ad03ff;hb=6f6da2fe1710842c37c73ed2b114cf6942221db6;hpb=f20404fce90919b614b737d07cc75d9e1c019fb8 diff --git a/apps/s_client.c b/apps/s_client.c index 9d463f6d81..96f9da6985 100644 --- a/apps/s_client.c +++ b/apps/s_client.c @@ -2703,8 +2703,7 @@ int s_client_main(int argc, char **argv) FD_ZERO(&readfds); FD_ZERO(&writefds); - 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; @@ -2815,10 +2814,8 @@ int s_client_main(int argc, char **argv) } } - 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 (!ssl_pending && FD_ISSET(SSL_get_fd(con), &writefds)) { k = SSL_write(con, &(cbuf[cbuf_off]), (unsigned int)cbuf_len);