diff options
author | Jeremie Courreges-Anglas <jca@cvs.openbsd.org> | 2018-03-15 12:27:02 +0000 |
---|---|---|
committer | Jeremie Courreges-Anglas <jca@cvs.openbsd.org> | 2018-03-15 12:27:02 +0000 |
commit | f91550aa92615810c4f73eb90d0f7164b557c7e3 (patch) | |
tree | bf931d202aa65f71f1a07493ca623c215fa11115 /regress/lib/libssl/unit | |
parent | 2269218003f081c53de9c55fea3ba0d999597129 (diff) |
Provide SSL_CTX_get_min_proto_version and SSL_CTX_get_max_proto_version
We already provided the setters, so also provide the getters like
OpenSSL does. Addition prompted by the use of those functions in recent
openvpn releases.
manpage diff from schwarze@ (thanks!) with input from jsing@, ok tb@
jsing@
Diffstat (limited to 'regress/lib/libssl/unit')
-rw-r--r-- | regress/lib/libssl/unit/ssl_versions.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/regress/lib/libssl/unit/ssl_versions.c b/regress/lib/libssl/unit/ssl_versions.c index c12f115c19a..d84a7106d58 100644 --- a/regress/lib/libssl/unit/ssl_versions.c +++ b/regress/lib/libssl/unit/ssl_versions.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ssl_versions.c,v 1.4 2017/05/06 20:39:03 jsing Exp $ */ +/* $OpenBSD: ssl_versions.c,v 1.5 2018/03/15 12:27:01 jca Exp $ */ /* * Copyright (c) 2016, 2017 Joel Sing <jsing@openbsd.org> * @@ -620,16 +620,16 @@ test_ssl_min_max_version(void) goto next; } - if (ssl_ctx->internal->min_version != mmvt->want_minver) { + if (SSL_CTX_get_min_proto_version(ssl_ctx) != mmvt->want_minver) { fprintf(stderr, "FAIL: test %zu - got SSL_CTX min " "version 0x%x, want 0x%x\n", i, - ssl_ctx->internal->min_version, mmvt->want_minver); + SSL_CTX_get_min_proto_version(ssl_ctx), mmvt->want_minver); goto next; } - if (ssl_ctx->internal->max_version != mmvt->want_maxver) { + if (SSL_CTX_get_max_proto_version(ssl_ctx) != mmvt->want_maxver) { fprintf(stderr, "FAIL: test %zu - got SSL_CTX max " "version 0x%x, want 0x%x\n", i, - ssl_ctx->internal->max_version, mmvt->want_maxver); + SSL_CTX_get_max_proto_version(ssl_ctx), mmvt->want_maxver); goto next; } @@ -638,16 +638,16 @@ test_ssl_min_max_version(void) return 1; } - if (ssl->internal->min_version != mmvt->want_minver) { + if (SSL_get_min_proto_version(ssl) != mmvt->want_minver) { fprintf(stderr, "FAIL: test %zu - initial SSL min " "version 0x%x, want 0x%x\n", i, - ssl_ctx->internal->min_version, mmvt->want_minver); + SSL_get_min_proto_version(ssl), mmvt->want_minver); goto next; } - if (ssl->internal->max_version != mmvt->want_maxver) { + if (SSL_get_max_proto_version(ssl) != mmvt->want_maxver) { fprintf(stderr, "FAIL: test %zu - initial SSL max " "version 0x%x, want 0x%x\n", i, - ssl_ctx->internal->max_version, mmvt->want_maxver); + SSL_get_max_proto_version(ssl), mmvt->want_maxver); goto next; } @@ -679,16 +679,16 @@ test_ssl_min_max_version(void) goto next; } - if (ssl->internal->min_version != mmvt->want_minver) { + if (SSL_get_min_proto_version(ssl) != mmvt->want_minver) { fprintf(stderr, "FAIL: test %zu - got SSL min " "version 0x%x, want 0x%x\n", i, - ssl_ctx->internal->min_version, mmvt->want_minver); + SSL_get_min_proto_version(ssl), mmvt->want_minver); goto next; } - if (ssl->internal->max_version != mmvt->want_maxver) { + if (SSL_get_max_proto_version(ssl) != mmvt->want_maxver) { fprintf(stderr, "FAIL: test %zu - got SSL max " "version 0x%x, want 0x%x\n", i, - ssl->internal->max_version, mmvt->want_maxver); + SSL_get_max_proto_version(ssl), mmvt->want_maxver); goto next; } |