45e2f1d45b4573553bfe61c845fe78e07f71ab73
[openssl.git] / doc / ssl / SSL_get_version.pod
1 =pod
2
3 =head1 NAME
4
5 SSL_get_version - get the protocol version of a connection
6
7 =head1 SYNOPSIS
8
9  #include <openssl/ssl.h>
10
11  const char *SSL_get_version(const SSL *ssl);
12
13 =head1 DESCRIPTION
14
15 SSL_get_version() returns the name of the protocol used for the
16 connection B<ssl>.
17
18 =head1 RETURN VALUES
19
20 The following strings can be returned:
21
22 =over 4
23
24 =item SSLv3
25
26 The connection uses the SSLv3 protocol.
27
28 =item TLSv1
29
30 The connection uses the TLSv1.0 protocol.
31
32 =item TLSv1.1
33
34 The connection uses the TLSv1.1 protocol.
35
36 =item TLSv1.2
37
38 The connection uses the TLSv1.2 protocol.
39
40 =item unknown
41
42 This indicates that no version has been set (no connection established).
43
44 =back
45
46 =head1 SEE ALSO
47
48 L<ssl(3)>
49
50 =head1 COPYRIGHT
51
52 Copyright 2001-2016 The OpenSSL Project Authors. All Rights Reserved.
53
54 Licensed under the OpenSSL license (the "License").  You may not use
55 this file except in compliance with the License.  You can obtain a copy
56 in the file LICENSE in the source distribution or at
57 L<https://www.openssl.org/source/license.html>.
58
59 =cut