2015-12-07 00:56:41 +08:00
|
|
|
=pod
|
|
|
|
|
|
|
|
=head1 NAME
|
|
|
|
|
2015-12-29 16:19:24 +08:00
|
|
|
SSL_CTX_set_min_proto_version, SSL_CTX_set_max_proto_version,
|
2017-09-14 15:28:39 +08:00
|
|
|
SSL_CTX_get_min_proto_version, SSL_CTX_get_max_proto_version,
|
|
|
|
SSL_set_min_proto_version, SSL_set_max_proto_version,
|
|
|
|
SSL_get_min_proto_version, SSL_get_max_proto_version - Get and set minimum
|
2015-12-29 16:19:24 +08:00
|
|
|
and maximum supported protocol version
|
2015-12-07 00:56:41 +08:00
|
|
|
|
|
|
|
=head1 SYNOPSIS
|
|
|
|
|
|
|
|
#include <openssl/ssl.h>
|
|
|
|
|
|
|
|
int SSL_CTX_set_min_proto_version(SSL_CTX *ctx, int version);
|
|
|
|
int SSL_CTX_set_max_proto_version(SSL_CTX *ctx, int version);
|
2017-09-14 15:28:39 +08:00
|
|
|
int SSL_CTX_get_min_proto_version(SSL_CTX *ctx);
|
|
|
|
int SSL_CTX_get_max_proto_version(SSL_CTX *ctx);
|
2017-01-21 02:58:49 +08:00
|
|
|
|
2015-12-07 00:56:41 +08:00
|
|
|
int SSL_set_min_proto_version(SSL *ssl, int version);
|
|
|
|
int SSL_set_max_proto_version(SSL *ssl, int version);
|
2017-09-14 15:28:39 +08:00
|
|
|
int SSL_get_min_proto_version(SSL *ssl);
|
|
|
|
int SSL_get_max_proto_version(SSL *ssl);
|
2015-12-07 00:56:41 +08:00
|
|
|
|
|
|
|
=head1 DESCRIPTION
|
|
|
|
|
2017-09-14 15:28:39 +08:00
|
|
|
The functions get or set the minimum and maximum supported protocol versions
|
2015-12-29 16:19:24 +08:00
|
|
|
for the B<ctx> or B<ssl>.
|
2016-01-11 09:15:04 +08:00
|
|
|
This works in combination with the options set via
|
|
|
|
L<SSL_CTX_set_options(3)> that also make it possible to disable
|
|
|
|
specific protocol versions.
|
2015-12-29 16:19:24 +08:00
|
|
|
Use these functions instead of disabling specific protocol versions.
|
2015-12-07 00:56:41 +08:00
|
|
|
|
2015-12-29 16:19:24 +08:00
|
|
|
Setting the minimum or maximum version to 0, will enable protocol
|
|
|
|
versions down to the lowest version, or up to the highest version
|
|
|
|
supported by the library, respectively.
|
2015-12-07 00:56:41 +08:00
|
|
|
|
2017-09-14 15:28:39 +08:00
|
|
|
Getters return 0 in case B<ctx> or B<ssl> have been configured to
|
|
|
|
automatically use the lowest or highest version supported by the library.
|
|
|
|
|
2015-12-29 16:19:24 +08:00
|
|
|
Currently supported versions are B<SSL3_VERSION>, B<TLS1_VERSION>,
|
2016-10-22 00:39:33 +08:00
|
|
|
B<TLS1_1_VERSION>, B<TLS1_2_VERSION>, B<TLS1_3_VERSION> for TLS and
|
|
|
|
B<DTLS1_VERSION>, B<DTLS1_2_VERSION> for DTLS.
|
2015-12-07 00:56:41 +08:00
|
|
|
|
2023-04-25 21:49:22 +08:00
|
|
|
In the current version of OpenSSL only QUICv1 is supported in conjunction with
|
|
|
|
TLSv1.3. Calling these functions on a QUIC object has no effect.
|
|
|
|
|
2015-12-07 00:56:41 +08:00
|
|
|
=head1 RETURN VALUES
|
|
|
|
|
2017-09-14 15:28:39 +08:00
|
|
|
These setter functions return 1 on success and 0 on failure. The getter
|
|
|
|
functions return the configured version or 0 for auto-configuration of
|
|
|
|
lowest or highest protocol, respectively.
|
2015-12-07 00:56:41 +08:00
|
|
|
|
|
|
|
=head1 NOTES
|
|
|
|
|
|
|
|
All these functions are implemented using macros.
|
|
|
|
|
2019-04-09 22:13:55 +08:00
|
|
|
=head1 SEE ALSO
|
|
|
|
|
2019-11-02 00:27:29 +08:00
|
|
|
L<ssl(7)>,
|
2019-04-09 22:13:55 +08:00
|
|
|
L<SSL_CTX_set_options(3)>, L<SSL_CONF_cmd(3)>
|
|
|
|
|
2015-12-07 00:56:41 +08:00
|
|
|
=head1 HISTORY
|
|
|
|
|
2017-09-14 15:28:39 +08:00
|
|
|
The setter functions were added in OpenSSL 1.1.0. The getter functions
|
|
|
|
were added in OpenSSL 1.1.1.
|
2015-12-07 00:56:41 +08:00
|
|
|
|
2016-05-18 23:44:05 +08:00
|
|
|
=head1 COPYRIGHT
|
|
|
|
|
2019-04-09 22:13:55 +08:00
|
|
|
Copyright 2016-2019 The OpenSSL Project Authors. All Rights Reserved.
|
2016-05-18 23:44:05 +08:00
|
|
|
|
2018-12-06 21:04:44 +08:00
|
|
|
Licensed under the Apache License 2.0 (the "License"). You may not use
|
2016-05-18 23:44:05 +08:00
|
|
|
this file except in compliance with the License. You can obtain a copy
|
|
|
|
in the file LICENSE in the source distribution or at
|
|
|
|
L<https://www.openssl.org/source/license.html>.
|
|
|
|
|
|
|
|
=cut
|