diff options
author | jsing <> | 2020-10-14 16:49:57 +0000 |
---|---|---|
committer | jsing <> | 2020-10-14 16:49:57 +0000 |
commit | a94866305ad306011ef3cb3dade3f2c6c1c5dec0 (patch) | |
tree | 0659d28be9470d2a431720cbacc7b47e0c432f49 | |
parent | d01f579537c8999cab6b1bf97cfb2760827ceeae (diff) | |
download | openbsd-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.h | 5 | ||||
-rw-r--r-- | src/lib/libssl/ssl_lib.c | 8 |
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); | |||
1457 | int SSL_up_ref(SSL *ssl); | 1457 | int SSL_up_ref(SSL *ssl); |
1458 | int SSL_accept(SSL *ssl); | 1458 | int SSL_accept(SSL *ssl); |
1459 | int SSL_connect(SSL *ssl); | 1459 | int SSL_connect(SSL *ssl); |
1460 | #ifdef LIBRESSL_INTERNAL | ||
1461 | int SSL_is_dtls(const SSL *s); | ||
1462 | #endif | ||
1460 | int SSL_is_server(const SSL *s); | 1463 | int SSL_is_server(const SSL *s); |
1461 | int SSL_read(SSL *ssl, void *buf, int num); | 1464 | int SSL_read(SSL *ssl, void *buf, int num); |
1462 | int SSL_peek(SSL *ssl, void *buf, int num); | 1465 | int 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 | ||
941 | int | 941 | int |
942 | SSL_is_dtls(const SSL *s) | ||
943 | { | ||
944 | return s->method->internal->dtls; | ||
945 | } | ||
946 | |||
947 | int | ||
942 | SSL_is_server(const SSL *s) | 948 | SSL_is_server(const SSL *s) |
943 | { | 949 | { |
944 | return s->server; | 950 | return s->server; |