SSL_set_max_proto_version
This function sets the maximum supported protocol version for an SSL session.
Last updated
- Changed in 2024.
- Added in 2019.
Format
LIBS := CSSL
#include <openssl/ssl.h>
int SSL_set_max_proto_version(SSL* ssl, int version)
- ssl
- A pointer to a token returned on the SSL_new function call.
- version
- Must be one of the following values:
- TLS1_VERSION
- TLS1_1_VERSION
- TLS1_2_VERSION
- TLS1_3_VERSION
Normal return
A value of 1.
Error return
A value of 0.
Programming considerations
- To use this function, you must include the library that is specified in the prototype in your makefile.
- Issue this function only when you use the TLS_server_method or TLS_client_method function.
Examples
For sample SSL applications, see SSL examples.