]> git.ipfire.org Git - thirdparty/openssl.git/blob - doc/ssl/SSL_get_version.pod
Update version docs
[thirdparty/openssl.git] / doc / ssl / SSL_get_version.pod
1 =pod
2
3 =head1 NAME
4
5 SSL_get_version, SSL_is_dtls - get the protocol information 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 int SSL_is_dtls(const SSL *ssl);
14
15 =head1 DESCRIPTION
16
17 SSL_get_version() returns the name of the protocol used for the
18 connection B<ssl>. It should only be called after the initial handshake has been
19 completed. Prior to that the results returned from this function may be
20 unreliable.
21
22 SSL_is_dtls() returns one if the connection is using DTLS, zero if not.
23
24 =head1 RETURN VALUES
25
26 SSL_get_version() returns one of the following strings:
27
28 =over 4
29
30 =item SSLv3
31
32 The connection uses the SSLv3 protocol.
33
34 =item TLSv1
35
36 The connection uses the TLSv1.0 protocol.
37
38 =item TLSv1.1
39
40 The connection uses the TLSv1.1 protocol.
41
42 =item TLSv1.2
43
44 The connection uses the TLSv1.2 protocol.
45
46 =item unknown
47
48 This indicates an unknown protocol version.
49
50 =back
51
52 =head1 SEE ALSO
53
54 L<ssl(3)>
55
56 =head1 HISTORY
57
58 SSL_is_dtls() was added in OpenSSL 1.1.0.
59
60 =head1 COPYRIGHT
61
62 Copyright 2001-2016 The OpenSSL Project Authors. All Rights Reserved.
63
64 Licensed under the OpenSSL license (the "License"). You may not use
65 this file except in compliance with the License. You can obtain a copy
66 in the file LICENSE in the source distribution or at
67 L<https://www.openssl.org/source/license.html>.
68
69 =cut