summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjsing <>2020-10-14 16:49:57 +0000
committerjsing <>2020-10-14 16:49:57 +0000
commita94866305ad306011ef3cb3dade3f2c6c1c5dec0 (patch)
tree0659d28be9470d2a431720cbacc7b47e0c432f49
parentd01f579537c8999cab6b1bf97cfb2760827ceeae (diff)
downloadopenbsd-a94866305ad306011ef3cb3dade3f2c6c1c5dec0.tar.gz
openbsd-a94866305ad306011ef3cb3dade3f2c6c1c5dec0.tar.bz2
openbsd-a94866305ad306011ef3cb3dade3f2c6c1c5dec0.zip
Provide SSL_is_dtls().
For now this is #ifdef LIBRESSL_INTERNAL and will be exposed during the next library bump. ok tb@
-rw-r--r--src/lib/libssl/ssl.h5
-rw-r--r--src/lib/libssl/ssl_lib.c8
2 files changed, 11 insertions, 2 deletions
diff --git a/src/lib/libssl/ssl.h b/src/lib/libssl/ssl.h
index 88039c08d6..a6ac6a1825 100644
--- a/src/lib/libssl/ssl.h
+++ b/src/lib/libssl/ssl.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssl.h,v 1.178 2020/09/20 09:42:00 tb Exp $ */ 1/* $OpenBSD: ssl.h,v 1.179 2020/10/14 16:49:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -1457,6 +1457,9 @@ void SSL_free(SSL *ssl);
1457int SSL_up_ref(SSL *ssl); 1457int SSL_up_ref(SSL *ssl);
1458int SSL_accept(SSL *ssl); 1458int SSL_accept(SSL *ssl);
1459int SSL_connect(SSL *ssl); 1459int SSL_connect(SSL *ssl);
1460#ifdef LIBRESSL_INTERNAL
1461int SSL_is_dtls(const SSL *s);
1462#endif
1460int SSL_is_server(const SSL *s); 1463int SSL_is_server(const SSL *s);
1461int SSL_read(SSL *ssl, void *buf, int num); 1464int SSL_read(SSL *ssl, void *buf, int num);
1462int SSL_peek(SSL *ssl, void *buf, int num); 1465int SSL_peek(SSL *ssl, void *buf, int num);
diff --git a/src/lib/libssl/ssl_lib.c b/src/lib/libssl/ssl_lib.c
index b306137c14..399af7c769 100644
--- a/src/lib/libssl/ssl_lib.c
+++ b/src/lib/libssl/ssl_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssl_lib.c,v 1.235 2020/10/11 02:22:27 jsing Exp $ */ 1/* $OpenBSD: ssl_lib.c,v 1.236 2020/10/14 16:49:57 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -939,6 +939,12 @@ SSL_connect(SSL *s)
939} 939}
940 940
941int 941int
942SSL_is_dtls(const SSL *s)
943{
944 return s->method->internal->dtls;
945}
946
947int
942SSL_is_server(const SSL *s) 948SSL_is_server(const SSL *s)
943{ 949{
944 return s->server; 950 return s->server;