Remove null check, per review feedback. Note this in the docs.
authorTJ Saunders <tj@castaglia.org>
Tue, 31 May 2016 21:09:17 +0000 (14:09 -0700)
committerRich Salz <rsalz@openssl.org>
Tue, 31 May 2016 21:16:29 +0000 (17:16 -0400)
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/1135)

doc/ssl/SSL_SESSION_get_protocol_version.pod
ssl/ssl_sess.c

index bc6f25ccde90feae25476498d63f8ab0fccc06b0..a033fdd9bbdeecbaadc7a29d85f8d91942786b13 100644 (file)
@@ -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<e.g.>
 B<TLS1_VERSION> or B<TLS1_2_VERSION>.
 
-If the function is passed the NULL pointer for the session B<s>, 0 is returned.
+Note that the SSL_SESSION_get_protocol_version() function
+does B<not> perform a null check on the provided session B<s> pointer.
 
 =head1 SEE ALSO
 
index 128d2d79422fb696a04c98c0373d2e914aef3f5d..f13e466d2c0fedd0e255b965f005049e27c69fd9 100644 (file)
@@ -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;
 }