提交 80c630f6 编写于 作者: T TJ Saunders 提交者: Rich Salz

Remove null check, per review feedback. Note this in the docs.

Reviewed-by: NMatt Caswell <matt@openssl.org>
Reviewed-by: NRich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/1135)
上级 73271290
......@@ -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
......
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册