Update version docs

Make it clear that you should not attempt to get the version before the
first handshake is complete.

Fixes #2893

Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6015)
This commit is contained in:
Matt Caswell 2018-04-19 13:32:45 +01:00
parent ad2510836c
commit 85032506d6

View File

@ -13,7 +13,9 @@ SSL_get_version - get the protocol version of a connection.
=head1 DESCRIPTION =head1 DESCRIPTION
SSL_get_version() returns the name of the protocol used for the SSL_get_version() returns the name of the protocol used for the
connection B<ssl>. connection B<ssl>. It should only be called after the initial handshake has been
completed. Prior to that the results returned from this function may be
unreliable.
=head1 RETURN VALUES =head1 RETURN VALUES
@ -43,7 +45,7 @@ The connection uses the TLSv1.2 protocol.
=item unknown =item unknown
This indicates that no version has been set (no connection established). This indicates an unknown protocol version.
=back =back