Signed-off-by: Joakim Tjernlund <[email protected]>
---
apps/s_client.c | 5 ++++-
apps/s_server.c | 4 +++-
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/apps/s_client.c b/apps/s_client.c
index 3857c2a..d4c348b 100644
--- a/apps/s_client.c
+++ b/apps/s_client.c
@@ -388,10 +388,12 @@ s_client_main(int argc, char **argv)
#endif
char *sess_in = NULL;
char *sess_out = NULL;
+#ifndef OPENSSL_NO_DTLS1
struct sockaddr peer;
int peerlen = sizeof(peer);
int enable_timeouts = 0;
long socket_mtu = 0;
+#endif
meth = SSLv23_client_method();
@@ -839,7 +841,7 @@ re_start:
}
if (c_Pause & 0x01)
SSL_set_debug(con, 1);
-
+#ifndef OPENSSL_NO_DTLS1
if (SSL_version(con) == DTLS1_VERSION) {
sbio = BIO_new_dgram(s, BIO_NOCLOSE);
@@ -868,6 +870,7 @@ re_start:
/* want to do MTU discovery */
BIO_ctrl(sbio, BIO_CTRL_DGRAM_MTU_DISCOVER, 0, NULL);
} else
+#endif
sbio = BIO_new_socket(s, BIO_NOCLOSE);
if (nbio_test) {
diff --git a/apps/s_server.c b/apps/s_server.c
index 6d4ce93..411b4a3 100644
--- a/apps/s_server.c
+++ b/apps/s_server.c
@@ -273,9 +273,9 @@ static char *engine_id = NULL;
#endif
static const char *session_id_prefix = NULL;
+#ifndef OPENSSL_NO_DTLS1
static int enable_timeouts = 0;
static long socket_mtu;
-#ifndef OPENSSL_NO_DTLS1
static int cert_chain = 0;
#endif
@@ -1390,6 +1390,7 @@ sv_body(char *hostname, int s, unsigned char *context)
}
SSL_clear(con);
+#ifndef OPENSSL_NO_DTLS1
if (SSL_version(con) == DTLS1_VERSION) {
sbio = BIO_new_dgram(s, BIO_NOCLOSE);
@@ -1413,6 +1414,7 @@ sv_body(char *hostname, int s, unsigned char *context)
/* turn on cookie exchange */
SSL_set_options(con, SSL_OP_COOKIE_EXCHANGE);
} else
+#endif
sbio = BIO_new_socket(s, BIO_NOCLOSE);
if (s_nbio_test) {
--
1.8.5.5