Refine and re-wrap Min/Max protocol docs
[openssl.git] / doc / ssl / SSL_CTX_set_min_proto_version.pod
1 =pod
2
3 =head1 NAME
4
5 SSL_CTX_set_min_proto_version, SSL_CTX_set_max_proto_version,
6 SSL_set_min_proto_version, SSL_set_max_proto_version - Set minimum
7 and maximum supported protocol version
8
9 =head1 SYNOPSIS
10
11  #include <openssl/ssl.h>
12
13  int SSL_CTX_set_min_proto_version(SSL_CTX *ctx, int version);
14  int SSL_CTX_set_max_proto_version(SSL_CTX *ctx, int version);
15  int SSL_set_min_proto_version(SSL *ssl, int version);
16  int SSL_set_max_proto_version(SSL *ssl, int version);
17
18 =head1 DESCRIPTION
19
20 The functions set the minimum and maximum supported portocol versions
21 for the B<ctx> or B<ssl>.
22 This works in combination with the options set via SSL_CTX_set_options()
23 that also make it possible to disable specific protocol versions.
24 Use these functions instead of disabling specific protocol versions.
25
26 Setting the minimum or maximum version to 0, will enable protocol
27 versions down to the lowest version, or up to the highest version
28 supported by the library, respectively.
29
30 Currently supported versions are B<SSL3_VERSION>, B<TLS1_VERSION>,
31 B<TLS1_1_VERSION>, B<TLS1_2_VERSION> for TLS and B<DTLS1_VERSION>,
32 B<DTLS1_2_VERSION> for DTLS.
33
34 =head1 RETURN VALUES
35
36 Both functions return 1 on success and 0 on failure.
37
38 =head1 NOTES
39
40 All these functions are implemented using macros.
41
42 =head1 HISTORY
43
44 The functions were added in OpenSSL 1.1.0
45
46 =head1 SEE ALSO
47
48 L<SSL_CTX_set_options(3)>, L<SSL_CONF_cmd(3)>
49
50 =cut