TLS_client_method

This function indicates that the application is a client and supports Transport Layer Security (TLS) 1.0, 1.1, 1.2, and 1.3. This function is the preferred way to define the method of the client.

Last updated

  • Changed in 2024.
  • Added in 2019.

Format

LIBS := CSSL 

#include <openssl/ssl.h>

const SSL_METHOD *TLS_client_method(void)

Normal return

A pointer to the appropriate connection method.

Error return

None.

Programming considerations

  • To use this function, you must include the library that is specified in the prototype in your makefile.
  • The client application is version flexible by using this function. If you want to limit the supported protocols for the version-flexible methods, you can use the SSL_CTX_set_min_proto_version, SSL_set_min_proto_version, SSL_CTX_set_max_proto_version, and SSL_set_max_proto_version functions.
  • Use the output of this function as input to the SSL_CTX_new function or the SSL_CTX_new_shared function.

Examples

For sample SSL applications, see SSL examples.