From: Dr. Stephen Henson Date: Tue, 3 Jul 2012 14:25:17 +0000 (+0000) Subject: new function SSL_is_server to which returns 1 is the corresponding SSL context is... X-Git-Tag: master-post-reformat~1776 X-Git-Url: https://git.openssl.org/gitweb/?a=commitdiff_plain;ds=sidebyside;h=87adf1fa96ab4bba2787e1d44d1bd0f578580bf8;p=openssl.git new function SSL_is_server to which returns 1 is the corresponding SSL context is for a server --- diff --git a/ssl/ssl.h b/ssl/ssl.h index aea244ab1d..a3da0ccf05 100644 --- a/ssl/ssl.h +++ b/ssl/ssl.h @@ -2177,6 +2177,7 @@ void SSL_set_not_resumable_session_callback(SSL *ssl, void SSL_set_debug(SSL *s, int debug); int SSL_cache_hit(SSL *s); +int SSL_is_server(SSL *s); #ifndef OPENSSL_NO_SSL_TRACE void SSL_trace(int write_p, int version, int content_type, diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c index 18e80d4ddc..1ba6e2d5d3 100644 --- a/ssl/ssl_lib.c +++ b/ssl/ssl_lib.c @@ -3341,6 +3341,11 @@ int SSL_cache_hit(SSL *s) return s->hit; } +int SSL_is_server(SSL *s) + { + return s->server; + } + #if defined(_WINDLL) && defined(OPENSSL_SYS_WIN16) #include "../crypto/bio/bss_file.c" #endif