EVP digest list: one hash algorithm per file, synchronize EVP list, overall cleanup.
[openssl.git] / doc / man3 / SSL_get_version.pod
1 =pod
2
3 =head1 NAME
4
5 SSL_client_version, SSL_get_version, SSL_is_dtls, SSL_version - get the
6 protocol information of a connection
7
8 =head1 SYNOPSIS
9
10  #include <openssl/ssl.h>
11
12  int SSL_client_version(const SSL *s);
13
14  const char *SSL_get_version(const SSL *ssl);
15
16  int SSL_is_dtls(const SSL *ssl);
17
18  int SSL_version(const SSL *s);
19
20 =head1 DESCRIPTION
21
22 SSL_client_version() returns the protocol version used by the client when
23 initiating the connection.
24
25 SSL_get_version() returns the name of the protocol used for the
26 connection.
27
28 SSL_is_dtls() returns one if the connection is using DTLS, zero if not.
29
30 SSL_version() returns the protocol version used for the connection.
31
32 =head1 RETURN VALUES
33
34 SSL_get_version() returns one of the following strings:
35
36 =over 4
37
38 =item SSLv3
39
40 The connection uses the SSLv3 protocol.
41
42 =item TLSv1
43
44 The connection uses the TLSv1.0 protocol.
45
46 =item TLSv1.1
47
48 The connection uses the TLSv1.1 protocol.
49
50 =item TLSv1.2
51
52 The connection uses the TLSv1.2 protocol.
53
54 =item TLSv1.3
55
56 The connection uses the TLSv1.3 protocol.
57
58 =item unknown
59
60 This indicates that no version has been set (no connection established).
61
62 =back
63
64 SSL_version() and SSL_client_version() return an integer which could include any of
65 the following:
66
67 =over 4
68
69 =item SSL3_VERSION
70
71 The connection uses the SSLv3 protocol.
72
73 =item TLS1_VERSION
74
75 The connection uses the TLSv1.0 protocol.
76
77 =item TLS1_1_VERSION
78
79 The connection uses the TLSv1.1 protocol.
80
81 =item TLS1_2_VERSION
82
83 The connection uses the TLSv1.2 protocol.
84
85 =item TLS1_3_VERSION
86
87 The connection uses the TLSv1.3 protocol.
88
89 =back
90
91 =head1 SEE ALSO
92
93 L<ssl(7)>
94
95 =head1 HISTORY
96
97 SSL_is_dtls() was added in OpenSSL 1.1.0.
98
99 =head1 COPYRIGHT
100
101 Copyright 2001-2017 The OpenSSL Project Authors. All Rights Reserved.
102
103 Licensed under the OpenSSL license (the "License").  You may not use
104 this file except in compliance with the License.  You can obtain a copy
105 in the file LICENSE in the source distribution or at
106 L<https://www.openssl.org/source/license.html>.
107
108 =cut