Let the TLSv1_method() etc. functions return a const SSL_METHOD pointer and make the SSL_METHOD parameter in SSL_CTX_new, SSL_CTX_set_ssl_version and SSL_set_ssl_method const.
diff --git a/ssl/s23_clnt.c b/ssl/s23_clnt.c index 8bac26c..045a953 100644 --- a/ssl/s23_clnt.c +++ b/ssl/s23_clnt.c
@@ -63,10 +63,10 @@ #include <openssl/objects.h> #include <openssl/evp.h> -static SSL_METHOD *ssl23_get_client_method(int ver); +static const SSL_METHOD *ssl23_get_client_method(int ver); static int ssl23_client_hello(SSL *s); static int ssl23_get_server_hello(SSL *s); -static SSL_METHOD *ssl23_get_client_method(int ver) +static const SSL_METHOD *ssl23_get_client_method(int ver) { #ifndef OPENSSL_NO_SSL2 if (ver == SSL2_VERSION)