From: Matt Caswell Date: Tue, 2 May 2017 10:00:50 +0000 (+0100) Subject: Make SSL_is_server() accept a const SSL X-Git-Tag: OpenSSL_1_1_0f~12 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e68f0ea8d3c87a018646ac652b57a18da41cfbf6;p=openssl Make SSL_is_server() accept a const SSL Fixes #1526 Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/3360) (cherry picked from commit 6944311688015ad293bd788ce78f3226738ebf00) --- diff --git a/include/openssl/ssl.h b/include/openssl/ssl.h index b2132f3dc2..6f0f361d7e 100644 --- a/include/openssl/ssl.h +++ b/include/openssl/ssl.h @@ -1832,7 +1832,7 @@ void SSL_set_not_resumable_session_callback(SSL *ssl, # endif __owur int SSL_session_reused(SSL *s); -__owur int SSL_is_server(SSL *s); +__owur int SSL_is_server(const SSL *s); __owur __owur SSL_CONF_CTX *SSL_CONF_CTX_new(void); int SSL_CONF_CTX_finish(SSL_CONF_CTX *cctx); diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c index cf246157ce..9f9dce6c1e 100644 --- a/ssl/ssl_lib.c +++ b/ssl/ssl_lib.c @@ -3776,7 +3776,7 @@ int SSL_session_reused(SSL *s) return s->hit; } -int SSL_is_server(SSL *s) +int SSL_is_server(const SSL *s) { return s->server; }