]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
LDAP_OPT_X_TLS_PROTOCOL_TLS1_3 not available in every libldap...
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Mon, 2 Jun 2025 05:06:05 +0000 (23:06 -0600)
committerNick Porter <nick@portercomputing.co.uk>
Wed, 18 Jun 2025 12:53:16 +0000 (13:53 +0100)
src/modules/rlm_ldap/rlm_ldap.c

index e16e381985d114cf4b522a483daefe5a7f706ed2..ffdb1ff7c1aa9f477762dd8b34ec44274e4979c9 100644 (file)
@@ -2729,10 +2729,13 @@ static int mod_instantiate(module_inst_ctx_t const *mctx)
        }
 
        if (inst->handle_config.tls_min_version_str) {
+#ifdef LDAP_OPT_X_TLS_PROTOCOL_TLS1_3
                if (strcmp(inst->handle_config.tls_min_version_str, "1.3") == 0) {
                        inst->handle_config.tls_min_version = LDAP_OPT_X_TLS_PROTOCOL_TLS1_3;
 
-               } else if (strcmp(inst->handle_config.tls_min_version_str, "1.2") == 0) {
+               } else
+#endif
+               if (strcmp(inst->handle_config.tls_min_version_str, "1.2") == 0) {
                        inst->handle_config.tls_min_version = LDAP_OPT_X_TLS_PROTOCOL_TLS1_2;
 
                } else if (strcmp(inst->handle_config.tls_min_version_str, "1.1") == 0) {