Skip to content

Commit

Permalink
Provide SSL_is_server().
Browse files Browse the repository at this point in the history
  • Loading branch information
jsing committed Feb 22, 2018
1 parent a5e31fb commit d7ec516
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/lib/libssl/Symbols.list
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ SSL_get_version
SSL_get_wbio
SSL_get_wfd
SSL_has_matching_session_id
SSL_is_server
SSL_library_init
SSL_load_client_CA_file
SSL_load_error_strings
Expand Down
3 changes: 2 additions & 1 deletion src/lib/libssl/ssl.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $OpenBSD: ssl.h,v 1.144 2018/02/22 17:29:24 jsing Exp $ */
/* $OpenBSD: ssl.h,v 1.145 2018/02/22 17:30:25 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
Expand Down Expand Up @@ -1354,6 +1354,7 @@ void SSL_free(SSL *ssl);
int SSL_up_ref(SSL *ssl);
int SSL_accept(SSL *ssl);
int SSL_connect(SSL *ssl);
int SSL_is_server(const SSL *s);
int SSL_read(SSL *ssl, void *buf, int num);
int SSL_peek(SSL *ssl, void *buf, int num);
int SSL_write(SSL *ssl, const void *buf, int num);
Expand Down
8 changes: 7 additions & 1 deletion src/lib/libssl/ssl_lib.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $OpenBSD: ssl_lib.c,v 1.178 2018/02/22 17:29:25 jsing Exp $ */
/* $OpenBSD: ssl_lib.c,v 1.179 2018/02/22 17:30:25 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
Expand Down Expand Up @@ -940,6 +940,12 @@ SSL_connect(SSL *s)
return (s->method->internal->ssl_connect(s));
}

int
SSL_is_server(const SSL *s)
{
return s->server;
}

long
SSL_get_default_timeout(const SSL *s)
{
Expand Down

0 comments on commit d7ec516

Please sign in to comment.