diff --git a/ssl/d1_clnt.c b/ssl/d1_clnt.c index 746f2600e..c787167ab 100644 --- a/ssl/d1_clnt.c +++ b/ssl/d1_clnt.c @@ -137,6 +137,7 @@ int dtls1_connect(SSL *s) assert(s->handshake_func == dtls1_connect); assert(!s->server); + assert(SSL_IS_DTLS(s)); ERR_clear_error(); ERR_clear_system_error(); @@ -164,13 +165,6 @@ int dtls1_connect(SSL *s) if (cb != NULL) cb(s,SSL_CB_HANDSHAKE_START,1); - if ((s->version & 0xff00 ) != (DTLS1_VERSION & 0xff00)) - { - OPENSSL_PUT_ERROR(SSL, dtls1_connect, ERR_R_INTERNAL_ERROR); - ret = -1; - goto end; - } - if (s->init_buf == NULL) { if ((buf=BUF_MEM_new()) == NULL) diff --git a/ssl/d1_srvr.c b/ssl/d1_srvr.c index 058235676..3320f7500 100644 --- a/ssl/d1_srvr.c +++ b/ssl/d1_srvr.c @@ -138,6 +138,7 @@ int dtls1_accept(SSL *s) assert(s->handshake_func == dtls1_accept); assert(s->server); + assert(SSL_IS_DTLS(s)); ERR_clear_error(); ERR_clear_system_error(); @@ -170,12 +171,6 @@ int dtls1_accept(SSL *s) if (cb != NULL) cb(s,SSL_CB_HANDSHAKE_START,1); - if ((s->version & 0xff00) != (DTLS1_VERSION & 0xff00)) - { - OPENSSL_PUT_ERROR(SSL, dtls1_accept, ERR_R_INTERNAL_ERROR); - return -1; - } - if (s->init_buf == NULL) { if ((buf=BUF_MEM_new()) == NULL) diff --git a/ssl/s23_clnt.c b/ssl/s23_clnt.c index a181ec68b..b0d6b6902 100644 --- a/ssl/s23_clnt.c +++ b/ssl/s23_clnt.c @@ -129,6 +129,7 @@ int ssl23_connect(SSL *s) assert(s->handshake_func == ssl23_connect); assert(!s->server); + assert(!SSL_IS_DTLS(s)); ERR_clear_error(); ERR_clear_system_error(); diff --git a/ssl/s23_srvr.c b/ssl/s23_srvr.c index 20352897c..06916ed30 100644 --- a/ssl/s23_srvr.c +++ b/ssl/s23_srvr.c @@ -144,6 +144,7 @@ int ssl23_accept(SSL *s) assert(s->handshake_func == ssl23_accept); assert(s->server); + assert(!SSL_IS_DTLS(s)); ERR_clear_error(); ERR_clear_system_error(); diff --git a/ssl/s3_clnt.c b/ssl/s3_clnt.c index 545985349..19af3cc5f 100644 --- a/ssl/s3_clnt.c +++ b/ssl/s3_clnt.c @@ -175,6 +175,7 @@ int ssl3_connect(SSL *s) assert(s->handshake_func == ssl3_connect); assert(!s->server); + assert(!SSL_IS_DTLS(s)); ERR_clear_error(); ERR_clear_system_error(); @@ -202,13 +203,6 @@ int ssl3_connect(SSL *s) if (cb != NULL) cb(s,SSL_CB_HANDSHAKE_START,1); - if ((s->version & 0xff00 ) != 0x0300) - { - OPENSSL_PUT_ERROR(SSL, ssl3_connect, ERR_R_INTERNAL_ERROR); - ret = -1; - goto end; - } - if (s->init_buf == NULL) { if ((buf=BUF_MEM_new()) == NULL) diff --git a/ssl/s3_srvr.c b/ssl/s3_srvr.c index 326d78cd2..86e87440c 100644 --- a/ssl/s3_srvr.c +++ b/ssl/s3_srvr.c @@ -182,6 +182,7 @@ int ssl3_accept(SSL *s) assert(s->handshake_func == ssl3_accept); assert(s->server); + assert(!SSL_IS_DTLS(s)); ERR_clear_error(); ERR_clear_system_error(); @@ -214,12 +215,6 @@ int ssl3_accept(SSL *s) if (cb != NULL) cb(s,SSL_CB_HANDSHAKE_START,1); - if ((s->version>>8) != 3) - { - OPENSSL_PUT_ERROR(SSL, ssl3_accept, ERR_R_INTERNAL_ERROR); - return -1; - } - if (s->init_buf == NULL) { if ((buf=BUF_MEM_new()) == NULL)