diff --git a/doc/ssl/SSL_SESSION_get_protocol_version.pod b/doc/ssl/SSL_SESSION_get_protocol_version.pod index bc6f25ccde..a033fdd9bb 100644 --- a/doc/ssl/SSL_SESSION_get_protocol_version.pod +++ b/doc/ssl/SSL_SESSION_get_protocol_version.pod @@ -21,7 +21,8 @@ SSL_SESSION_get_protocol_version() returns a number indicating the protocol version used for the session; this number matches the constants I B or B. -If the function is passed the NULL pointer for the session B, 0 is returned. +Note that the SSL_SESSION_get_protocol_version() function +does B perform a null check on the provided session B pointer. =head1 SEE ALSO diff --git a/ssl/ssl_sess.c b/ssl/ssl_sess.c index 128d2d7942..f13e466d2c 100644 --- a/ssl/ssl_sess.c +++ b/ssl/ssl_sess.c @@ -830,8 +830,6 @@ long SSL_SESSION_set_time(SSL_SESSION *s, long t) int SSL_SESSION_get_protocol_version(const SSL_SESSION *s) { - if (s == NULL) - return (0); return s->ssl_version; }