1SSL_CTX_SET_MIN_PROTO_VERSION(3ossl)OpenSSLSSL_CTX_SET_MIN_PROTO_VERSION(3ossl)
2
3
4
6 SSL_CTX_set_min_proto_version, SSL_CTX_set_max_proto_version,
7 SSL_CTX_get_min_proto_version, SSL_CTX_get_max_proto_version,
8 SSL_set_min_proto_version, SSL_set_max_proto_version,
9 SSL_get_min_proto_version, SSL_get_max_proto_version - Get and set
10 minimum and maximum supported protocol version
11
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);
17 int SSL_CTX_get_min_proto_version(SSL_CTX *ctx);
18 int SSL_CTX_get_max_proto_version(SSL_CTX *ctx);
19
20 int SSL_set_min_proto_version(SSL *ssl, int version);
21 int SSL_set_max_proto_version(SSL *ssl, int version);
22 int SSL_get_min_proto_version(SSL *ssl);
23 int SSL_get_max_proto_version(SSL *ssl);
24
26 The functions get or set the minimum and maximum supported protocol
27 versions for the ctx or ssl. This works in combination with the
28 options set via SSL_CTX_set_options(3) that also make it possible to
29 disable specific protocol versions. Use these functions instead of
30 disabling specific protocol versions.
31
32 Setting the minimum or maximum version to 0, will enable protocol
33 versions down to the lowest version, or up to the highest version
34 supported by the library, respectively.
35
36 Getters return 0 in case ctx or ssl have been configured to
37 automatically use the lowest or highest version supported by the
38 library.
39
40 Currently supported versions are SSL3_VERSION, TLS1_VERSION,
41 TLS1_1_VERSION, TLS1_2_VERSION, TLS1_3_VERSION for TLS and
42 DTLS1_VERSION, DTLS1_2_VERSION for DTLS.
43
45 These setter functions return 1 on success and 0 on failure. The getter
46 functions return the configured version or 0 for auto-configuration of
47 lowest or highest protocol, respectively.
48
50 All these functions are implemented using macros.
51
53 ssl(7), SSL_CTX_set_options(3), SSL_CONF_cmd(3)
54
56 The setter functions were added in OpenSSL 1.1.0. The getter functions
57 were added in OpenSSL 1.1.1.
58
60 Copyright 2016-2019 The OpenSSL Project Authors. All Rights Reserved.
61
62 Licensed under the Apache License 2.0 (the "License"). You may not use
63 this file except in compliance with the License. You can obtain a copy
64 in the file LICENSE in the source distribution or at
65 <https://www.openssl.org/source/license.html>.
66
67
68
693.0.9 2023-07-2S7SL_CTX_SET_MIN_PROTO_VERSION(3ossl)