summaryrefslogtreecommitdiff
path: root/lib/libssl/ssl.h
diff options
context:
space:
mode:
authorJeremie Courreges-Anglas <jca@cvs.openbsd.org>2018-03-15 12:27:02 +0000
committerJeremie Courreges-Anglas <jca@cvs.openbsd.org>2018-03-15 12:27:02 +0000
commitf91550aa92615810c4f73eb90d0f7164b557c7e3 (patch)
treebf931d202aa65f71f1a07493ca623c215fa11115 /lib/libssl/ssl.h
parent2269218003f081c53de9c55fea3ba0d999597129 (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 'lib/libssl/ssl.h')
-rw-r--r--lib/libssl/ssl.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/libssl/ssl.h b/lib/libssl/ssl.h
index e6556fd136c..5f9d248cedb 100644
--- a/lib/libssl/ssl.h
+++ b/lib/libssl/ssl.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssl.h,v 1.146 2018/03/03 19:58:29 jca Exp $ */
+/* $OpenBSD: ssl.h,v 1.147 2018/03/15 12:27:01 jca Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -1125,6 +1125,8 @@ int PEM_write_SSL_SESSION(FILE *fp, SSL_SESSION *x);
#define SSL_CTRL_SET_MIN_PROTO_VERSION 123
#define SSL_CTRL_SET_MAX_PROTO_VERSION 124
+#define SSL_CTRL_GET_MIN_PROTO_VERSION 130
+#define SSL_CTRL_GET_MAX_PROTO_VERSION 131
#define DTLSv1_get_timeout(ssl, arg) \
SSL_ctrl(ssl,DTLS_CTRL_GET_TIMEOUT,0, (void *)arg)
@@ -1174,9 +1176,13 @@ int SSL_CTX_set1_groups_list(SSL_CTX *ctx, const char *groups);
int SSL_set1_groups(SSL *ssl, const int *groups, size_t groups_len);
int SSL_set1_groups_list(SSL *ssl, const char *groups);
+int SSL_CTX_get_min_proto_version(SSL_CTX *ctx);
+int SSL_CTX_get_max_proto_version(SSL_CTX *ctx);
int SSL_CTX_set_min_proto_version(SSL_CTX *ctx, uint16_t version);
int SSL_CTX_set_max_proto_version(SSL_CTX *ctx, uint16_t version);
+int SSL_get_min_proto_version(SSL *ssl);
+int SSL_get_max_proto_version(SSL *ssl);
int SSL_set_min_proto_version(SSL *ssl, uint16_t version);
int SSL_set_max_proto_version(SSL *ssl, uint16_t version);
@@ -1209,8 +1215,12 @@ int SSL_set_max_proto_version(SSL *ssl, uint16_t version);
#define SSL_CTX_set1_groups_list SSL_CTX_set1_groups_list
#define SSL_set1_groups SSL_set1_groups
#define SSL_set1_groups_list SSL_set1_groups_list
+#define SSL_CTX_get_min_proto_version SSL_CTX_get_min_proto_version
+#define SSL_CTX_get_max_proto_version SSL_CTX_get_max_proto_version
#define SSL_CTX_set_min_proto_version SSL_CTX_set_min_proto_version
#define SSL_CTX_set_max_proto_version SSL_CTX_set_max_proto_version
+#define SSL_get_min_proto_version SSL_get_min_proto_version
+#define SSL_get_max_proto_version SSL_get_max_proto_version
#define SSL_set_min_proto_version SSL_set_min_proto_version
#define SSL_set_max_proto_version SSL_set_max_proto_version
#endif