diff options
author | jsing <> | 2018-02-22 17:30:25 +0000 |
---|---|---|
committer | jsing <> | 2018-02-22 17:30:25 +0000 |
commit | fee8d3d7658981aa443812b770ad03352b7e7b31 (patch) | |
tree | 2116675fe6e3699a2781a5301de2d0d051a8baf2 | |
parent | a0d81d22e89ef62627c06fd19917add3917923f7 (diff) | |
download | openbsd-fee8d3d7658981aa443812b770ad03352b7e7b31.tar.gz openbsd-fee8d3d7658981aa443812b770ad03352b7e7b31.tar.bz2 openbsd-fee8d3d7658981aa443812b770ad03352b7e7b31.zip |
Provide SSL_is_server().
-rw-r--r-- | src/lib/libssl/Symbols.list | 1 | ||||
-rw-r--r-- | src/lib/libssl/ssl.h | 3 | ||||
-rw-r--r-- | src/lib/libssl/ssl_lib.c | 8 |
3 files changed, 10 insertions, 2 deletions
diff --git a/src/lib/libssl/Symbols.list b/src/lib/libssl/Symbols.list index ad32b98677..eb00c8d25a 100644 --- a/src/lib/libssl/Symbols.list +++ b/src/lib/libssl/Symbols.list | |||
@@ -213,6 +213,7 @@ SSL_get_version | |||
213 | SSL_get_wbio | 213 | SSL_get_wbio |
214 | SSL_get_wfd | 214 | SSL_get_wfd |
215 | SSL_has_matching_session_id | 215 | SSL_has_matching_session_id |
216 | SSL_is_server | ||
216 | SSL_library_init | 217 | SSL_library_init |
217 | SSL_load_client_CA_file | 218 | SSL_load_client_CA_file |
218 | SSL_load_error_strings | 219 | SSL_load_error_strings |
diff --git a/src/lib/libssl/ssl.h b/src/lib/libssl/ssl.h index 1b92bde9d4..d65e99363d 100644 --- a/src/lib/libssl/ssl.h +++ b/src/lib/libssl/ssl.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssl.h,v 1.144 2018/02/22 17:29:24 jsing Exp $ */ | 1 | /* $OpenBSD: ssl.h,v 1.145 2018/02/22 17:30:25 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 | * |
@@ -1354,6 +1354,7 @@ void SSL_free(SSL *ssl); | |||
1354 | int SSL_up_ref(SSL *ssl); | 1354 | int SSL_up_ref(SSL *ssl); |
1355 | int SSL_accept(SSL *ssl); | 1355 | int SSL_accept(SSL *ssl); |
1356 | int SSL_connect(SSL *ssl); | 1356 | int SSL_connect(SSL *ssl); |
1357 | int SSL_is_server(const SSL *s); | ||
1357 | int SSL_read(SSL *ssl, void *buf, int num); | 1358 | int SSL_read(SSL *ssl, void *buf, int num); |
1358 | int SSL_peek(SSL *ssl, void *buf, int num); | 1359 | int SSL_peek(SSL *ssl, void *buf, int num); |
1359 | int SSL_write(SSL *ssl, const void *buf, int num); | 1360 | int SSL_write(SSL *ssl, const void *buf, int num); |
diff --git a/src/lib/libssl/ssl_lib.c b/src/lib/libssl/ssl_lib.c index aa629a2848..80a2bd7bfc 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.178 2018/02/22 17:29:25 jsing Exp $ */ | 1 | /* $OpenBSD: ssl_lib.c,v 1.179 2018/02/22 17:30:25 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 | * |
@@ -940,6 +940,12 @@ SSL_connect(SSL *s) | |||
940 | return (s->method->internal->ssl_connect(s)); | 940 | return (s->method->internal->ssl_connect(s)); |
941 | } | 941 | } |
942 | 942 | ||
943 | int | ||
944 | SSL_is_server(const SSL *s) | ||
945 | { | ||
946 | return s->server; | ||
947 | } | ||
948 | |||
943 | long | 949 | long |
944 | SSL_get_default_timeout(const SSL *s) | 950 | SSL_get_default_timeout(const SSL *s) |
945 | { | 951 | { |