summaryrefslogtreecommitdiff
path: root/lib/libssl
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2019-03-17 17:28:09 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2019-03-17 17:28:09 +0000
commitb5ab85ca82e11da070c83d6732cb1ed66f6cea13 (patch)
tree7ef58c994cf9cd9db07a34922ac390bd5f76bb65 /lib/libssl
parent720de71c47079212922b4a16809649de18be0457 (diff)
Provide version agnostic DTLS methods.
ok tb@
Diffstat (limited to 'lib/libssl')
-rw-r--r--lib/libssl/Symbols.list3
-rw-r--r--lib/libssl/ssl.h6
-rw-r--r--lib/libssl/ssl_methods.c20
3 files changed, 27 insertions, 2 deletions
diff --git a/lib/libssl/Symbols.list b/lib/libssl/Symbols.list
index 410f08e92c3..425d71126bf 100644
--- a/lib/libssl/Symbols.list
+++ b/lib/libssl/Symbols.list
@@ -7,6 +7,9 @@ BIO_ssl_copy_session_id
BIO_ssl_shutdown
/* methods */
+DTLS_client_method
+DTLS_method
+DTLS_server_method
DTLSv1_client_method
DTLSv1_method
DTLSv1_server_method
diff --git a/lib/libssl/ssl.h b/lib/libssl/ssl.h
index e6ac7689dae..58b1be6d0d6 100644
--- a/lib/libssl/ssl.h
+++ b/lib/libssl/ssl.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssl.h,v 1.164 2019/01/22 01:15:37 tb Exp $ */
+/* $OpenBSD: ssl.h,v 1.165 2019/03/17 17:28:08 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -1436,6 +1436,10 @@ const SSL_METHOD *DTLSv1_method(void); /* DTLSv1.0 */
const SSL_METHOD *DTLSv1_server_method(void); /* DTLSv1.0 */
const SSL_METHOD *DTLSv1_client_method(void); /* DTLSv1.0 */
+const SSL_METHOD *DTLS_method(void); /* DTLS v1.0 or later */
+const SSL_METHOD *DTLS_server_method(void); /* DTLS v1.0 or later */
+const SSL_METHOD *DTLS_client_method(void); /* DTLS v1.0 or later */
+
STACK_OF(SSL_CIPHER) *SSL_get_ciphers(const SSL *s);
STACK_OF(SSL_CIPHER) *SSL_get_client_ciphers(const SSL *s);
STACK_OF(SSL_CIPHER) *SSL_get1_supported_ciphers(SSL *s);
diff --git a/lib/libssl/ssl_methods.c b/lib/libssl/ssl_methods.c
index bacc186a58b..df99d98c8a6 100644
--- a/lib/libssl/ssl_methods.c
+++ b/lib/libssl/ssl_methods.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssl_methods.c,v 1.3 2019/02/14 18:53:15 jsing Exp $ */
+/* $OpenBSD: ssl_methods.c,v 1.4 2019/03/17 17:28:08 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -95,6 +95,12 @@ DTLSv1_client_method(void)
}
const SSL_METHOD *
+DTLS_client_method(void)
+{
+ return DTLSv1_client_method();
+}
+
+const SSL_METHOD *
dtls1_get_client_method(int ver)
{
if (ver == DTLS1_VERSION)
@@ -139,6 +145,12 @@ DTLSv1_method(void)
return &DTLSv1_method_data;
}
+const SSL_METHOD *
+DTLS_method(void)
+{
+ return DTLSv1_method();
+}
+
static const SSL_METHOD *
dtls1_get_method(int ver)
{
@@ -183,6 +195,12 @@ DTLSv1_server_method(void)
}
const SSL_METHOD *
+DTLS_server_method(void)
+{
+ return DTLSv1_server_method();
+}
+
+const SSL_METHOD *
dtls1_get_server_method(int ver)
{
if (ver == DTLS1_VERSION)