From 731abd3bd7bb5fd0a1e1c943979c664045d8ae50 Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Wed, 26 Dec 2012 14:45:46 +0000 Subject: [PATCH] new function SSL_is_server to which returns 1 is the corresponding SSL context is for a server (backport from HEAD) --- ssl/ssl.h | 1 + ssl/ssl_lib.c | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/ssl/ssl.h b/ssl/ssl.h index 1f22cbccc5..e57e160bbd 100644 --- a/ssl/ssl.h +++ b/ssl/ssl.h @@ -2162,6 +2162,7 @@ int SSL_set_session_secret_cb(SSL *s, tls_session_secret_cb_fn tls_session_secre void SSL_set_debug(SSL *s, int debug); int SSL_cache_hit(SSL *s); +int SSL_is_server(SSL *s); /* BEGIN ERROR CODES */ /* The following lines are auto generated by the script mkerr.pl. Any changes diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c index ea5dd0bd69..51c020dc03 100644 --- a/ssl/ssl_lib.c +++ b/ssl/ssl_lib.c @@ -3327,6 +3327,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 -- 2.25.1