]> git.ipfire.org Git - thirdparty/openssl.git/blame - doc/man3/SSL_CTX_set_min_proto_version.pod
Rename OPENSSL_CTX prefix to OSSL_LIB_CTX
[thirdparty/openssl.git] / doc / man3 / SSL_CTX_set_min_proto_version.pod
CommitLineData
7946ab33
KR
1=pod
2
3=head1 NAME
4
57ce7b61 5SSL_CTX_set_min_proto_version, SSL_CTX_set_max_proto_version,
3edabd3c
CH
6SSL_CTX_get_min_proto_version, SSL_CTX_get_max_proto_version,
7SSL_set_min_proto_version, SSL_set_max_proto_version,
8SSL_get_min_proto_version, SSL_get_max_proto_version - Get and set minimum
57ce7b61 9and maximum supported protocol version
7946ab33
KR
10
11=head1 SYNOPSIS
12
13 #include <openssl/ssl.h>
14
15 int SSL_CTX_set_min_proto_version(SSL_CTX *ctx, int version);
16 int SSL_CTX_set_max_proto_version(SSL_CTX *ctx, int version);
3edabd3c
CH
17 int SSL_CTX_get_min_proto_version(SSL_CTX *ctx);
18 int SSL_CTX_get_max_proto_version(SSL_CTX *ctx);
e9b77246 19
7946ab33
KR
20 int SSL_set_min_proto_version(SSL *ssl, int version);
21 int SSL_set_max_proto_version(SSL *ssl, int version);
3edabd3c
CH
22 int SSL_get_min_proto_version(SSL *ssl);
23 int SSL_get_max_proto_version(SSL *ssl);
7946ab33
KR
24
25=head1 DESCRIPTION
26
3edabd3c 27The functions get or set the minimum and maximum supported protocol versions
57ce7b61 28for the B<ctx> or B<ssl>.
8106cb8b
VD
29This works in combination with the options set via
30L<SSL_CTX_set_options(3)> that also make it possible to disable
31specific protocol versions.
57ce7b61 32Use these functions instead of disabling specific protocol versions.
7946ab33 33
57ce7b61
VD
34Setting the minimum or maximum version to 0, will enable protocol
35versions down to the lowest version, or up to the highest version
36supported by the library, respectively.
7946ab33 37
3edabd3c
CH
38Getters return 0 in case B<ctx> or B<ssl> have been configured to
39automatically use the lowest or highest version supported by the library.
40
57ce7b61 41Currently supported versions are B<SSL3_VERSION>, B<TLS1_VERSION>,
582a17d6
MC
42B<TLS1_1_VERSION>, B<TLS1_2_VERSION>, B<TLS1_3_VERSION> for TLS and
43B<DTLS1_VERSION>, B<DTLS1_2_VERSION> for DTLS.
7946ab33
KR
44
45=head1 RETURN VALUES
46
3edabd3c
CH
47These setter functions return 1 on success and 0 on failure. The getter
48functions return the configured version or 0 for auto-configuration of
49lowest or highest protocol, respectively.
7946ab33
KR
50
51=head1 NOTES
52
53All these functions are implemented using macros.
54
b5c4bbbe
JL
55=head1 SEE ALSO
56
98ca37e4 57L<ssl(7)>,
b5c4bbbe
JL
58L<SSL_CTX_set_options(3)>, L<SSL_CONF_cmd(3)>
59
7946ab33
KR
60=head1 HISTORY
61
3edabd3c
CH
62The setter functions were added in OpenSSL 1.1.0. The getter functions
63were added in OpenSSL 1.1.1.
7946ab33 64
e2f92610
RS
65=head1 COPYRIGHT
66
b5c4bbbe 67Copyright 2016-2019 The OpenSSL Project Authors. All Rights Reserved.
e2f92610 68
4746f25a 69Licensed under the Apache License 2.0 (the "License"). You may not use
e2f92610
RS
70this file except in compliance with the License. You can obtain a copy
71in the file LICENSE in the source distribution or at
72L<https://www.openssl.org/source/license.html>.
73
74=cut