Add support for minimum and maximum protocol version
[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, SSL_set_min_proto_version, SSL_set_max_proto_version - Set minimum and maximum supported protocol version
6
7 =head1 SYNOPSIS
8
9  #include <openssl/ssl.h>
10
11  int SSL_CTX_set_min_proto_version(SSL_CTX *ctx, int version);
12  int SSL_CTX_set_max_proto_version(SSL_CTX *ctx, int version);
13  int SSL_set_min_proto_version(SSL *ssl, int version);
14  int SSL_set_max_proto_version(SSL *ssl, int version);
15
16 =head1 DESCRIPTION
17
18 The functions set the minimum and maximum supported portocol versions for the B<ctx> or B<ssl>.
19 This works in combination with the options set via SSL_CTX_set_options() that allows to disable specific protocol versions.
20 You should use these functions instead of disabling a specific protocol version.
21
22 When setting the minimum or maximum version to 0 it will use the lowest or highest supported version, respectively, by the library.
23
24 Currently supported versions are B<SSL3_VERSION>, B<TLS1_VERSION>, B<TLS1_1_VERSION>, B<TLS1_2_VERSION>, B<DTLS1_VERSION> and B<DTLS1_2_VERSION>.
25
26 =head1 RETURN VALUES
27
28 The function returns 1 on success and 0 on failure.
29
30 =head1 NOTES
31
32 All these functions are implemented using macros.
33
34 =head1 HISTORY
35
36 The functions were added in OpenSSL 1.1.0
37
38 =head1 SEE ALSO
39
40 L<SSL_CTX_set_options(3)>, L<SSL_CONF_cmd(3)>
41
42 =cut