summaryrefslogtreecommitdiff
path: root/openssl/ssl/d1_lib.c
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2014-10-02 15:47:44 +0100
committerBen Murdoch <benm@google.com>2014-10-03 16:32:18 +0100
commitcc2cd4790cd85023341988efac0ec88b9f630f73 (patch)
treeff7b9055783c8d1b95c6148a6371f60842303365 /openssl/ssl/d1_lib.c
parent06bb5023d34b9a8f6d9260a6a419090379c363c4 (diff)
downloadopenssl-cc2cd4790cd85023341988efac0ec88b9f630f73.tar.gz
Change-Id: I56626b12407f19e7ed48a680b596e2b2c7b46de1
Diffstat (limited to 'openssl/ssl/d1_lib.c')
-rw-r--r--openssl/ssl/d1_lib.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/openssl/ssl/d1_lib.c b/openssl/ssl/d1_lib.c
index 1004c57..cb7d825 100644
--- a/openssl/ssl/d1_lib.c
+++ b/openssl/ssl/d1_lib.c
@@ -265,6 +265,16 @@ long dtls1_ctrl(SSL *s, int cmd, long larg, void *parg)
case DTLS_CTRL_LISTEN:
ret = dtls1_listen(s, parg);
break;
+ case SSL_CTRL_CHECK_PROTO_VERSION:
+ /* For library-internal use; checks that the current protocol
+ * is the highest enabled version (according to s->ctx->method,
+ * as version negotiation may have changed s->method). */
+#if DTLS_MAX_VERSION != DTLS1_VERSION
+# error Code needs update for DTLS_method() support beyond DTLS1_VERSION.
+#endif
+ /* Just one protocol version is supported so far;
+ * fail closed if the version is not as expected. */
+ return s->version == DTLS_MAX_VERSION;
default:
ret = ssl3_ctrl(s, cmd, larg, parg);