]>
Commit | Line | Data |
---|---|---|
2c1571b4 LJ |
1 | =pod |
2 | ||
3 | =head1 NAME | |
4 | ||
e417070c | 5 | SSL_get_version, SSL_is_dtls - get the protocol information of a connection |
2c1571b4 LJ |
6 | |
7 | =head1 SYNOPSIS | |
8 | ||
9 | #include <openssl/ssl.h> | |
10 | ||
c3e64028 | 11 | const char *SSL_get_version(const SSL *ssl); |
2c1571b4 | 12 | |
e417070c RS |
13 | int SSL_is_dtls(const SSL *ssl); |
14 | ||
2c1571b4 LJ |
15 | =head1 DESCRIPTION |
16 | ||
fc1d88f0 | 17 | SSL_get_version() returns the name of the protocol used for the |
2c1571b4 LJ |
18 | connection B<ssl>. |
19 | ||
e417070c RS |
20 | SSL_is_dtls() returns one if the connection is using DTLS, zero if not. |
21 | ||
2c1571b4 LJ |
22 | =head1 RETURN VALUES |
23 | ||
e417070c | 24 | SSL_get_verison() returns one of the following strings: |
2c1571b4 LJ |
25 | |
26 | =over 4 | |
27 | ||
2c1571b4 LJ |
28 | =item SSLv3 |
29 | ||
30 | The connection uses the SSLv3 protocol. | |
31 | ||
32 | =item TLSv1 | |
33 | ||
fc1d88f0 RS |
34 | The connection uses the TLSv1.0 protocol. |
35 | ||
36 | =item TLSv1.1 | |
37 | ||
38 | The connection uses the TLSv1.1 protocol. | |
39 | ||
40 | =item TLSv1.2 | |
41 | ||
42 | The connection uses the TLSv1.2 protocol. | |
2c1571b4 LJ |
43 | |
44 | =item unknown | |
45 | ||
46 | This indicates that no version has been set (no connection established). | |
47 | ||
48 | =back | |
49 | ||
50 | =head1 SEE ALSO | |
51 | ||
9b86974e | 52 | L<ssl(3)> |
2c1571b4 | 53 | |
e417070c RS |
54 | =head1 HISTORY |
55 | ||
56 | SSL_is_dtls() was added in OpenSSL 1.1.0. | |
57 | ||
e2f92610 RS |
58 | =head1 COPYRIGHT |
59 | ||
60 | Copyright 2001-2016 The OpenSSL Project Authors. All Rights Reserved. | |
61 | ||
62 | Licensed under the OpenSSL license (the "License"). You may not use | |
63 | this file except in compliance with the License. You can obtain a copy | |
64 | in the file LICENSE in the source distribution or at | |
65 | L<https://www.openssl.org/source/license.html>. | |
66 | ||
67 | =cut |