MCPcopy Create free account
hub / github.com/acl-dev/acl / set_ssl_version

Function set_ssl_version

lib_acl_cpp/src/stream/openssl_conf.cpp:624–641  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

622
623#ifdef HAS_OPENSSL
624static void set_ssl_version(SSL_CTX* ctx, int min_ver, int max_ver)
625{
626 if (min_ver > max_ver) {
627 return;
628 }
629
630 if (min_ver == tls_ver_1_2) {
631 __ssl_ctx_ctrl(ctx, SSL_CTRL_SET_MIN_PROTO_VERSION, TLS1_2_VERSION, NULL);
632 } else if (min_ver == tls_ver_1_3) {
633 __ssl_ctx_ctrl(ctx, SSL_CTRL_SET_MIN_PROTO_VERSION, TLS1_3_VERSION, NULL);
634 }
635
636 if (max_ver == tls_ver_1_2) {
637 __ssl_ctx_ctrl(ctx, SSL_CTRL_SET_MAX_PROTO_VERSION, TLS1_2_VERSION, NULL);
638 } else if (max_ver == tls_ver_1_3) {
639 __ssl_ctx_ctrl(ctx, SSL_CTRL_SET_MAX_PROTO_VERSION, TLS1_3_VERSION, NULL);
640 }
641}
642#endif
643
644bool openssl_conf::set_version(int ver_min, int ver_max) {

Callers 2

set_versionMethod · 0.70
create_ssl_ctxMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…