diff options
author | Jung-uk Kim <jkim@FreeBSD.org> | 2014-10-15 17:35:39 +0000 |
---|---|---|
committer | Jung-uk Kim <jkim@FreeBSD.org> | 2014-10-15 17:35:39 +0000 |
commit | f62b4332f57a140c7a64082fb139c06b1a71584c (patch) | |
tree | 8df07ff17fed10701bf6420470d0c11581fdf345 /ssl/d1_lib.c | |
parent | 2af9154f28669943cf601ecc3c9bbbe372587787 (diff) |
Diffstat (limited to 'ssl/d1_lib.c')
-rw-r--r-- | ssl/d1_lib.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/ssl/d1_lib.c b/ssl/d1_lib.c index c872cb6594511..8427798bbfaf5 100644 --- a/ssl/d1_lib.c +++ b/ssl/d1_lib.c @@ -305,6 +305,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); |