- tls_option = LDAP_OPT_X_TLS_NEVER;
- if (Ustrcmp(eldap_require_cert, "hard") == 0)
- {
- tls_option = LDAP_OPT_X_TLS_HARD;
- }
- else if (Ustrcmp(eldap_require_cert, "demand") == 0)
- {
- tls_option = LDAP_OPT_X_TLS_DEMAND;
- }
- else if (Ustrcmp(eldap_require_cert, "allow") == 0)
- {
- tls_option = LDAP_OPT_X_TLS_ALLOW;
- }
- else if (Ustrcmp(eldap_require_cert, "try") == 0)
- {
- tls_option = LDAP_OPT_X_TLS_TRY;
- }
- DEBUG(D_lookup)
- debug_printf("Require certificate overrides LDAP_OPT_X_TLS option (%d)\n",
- tls_option);
+ tls_option =
+ Ustrcmp(eldap_require_cert, "hard") == 0 ? LDAP_OPT_X_TLS_HARD
+ : Ustrcmp(eldap_require_cert, "demand") == 0 ? LDAP_OPT_X_TLS_DEMAND
+ : Ustrcmp(eldap_require_cert, "allow") == 0 ? LDAP_OPT_X_TLS_ALLOW
+ : Ustrcmp(eldap_require_cert, "try") == 0 ? LDAP_OPT_X_TLS_TRY
+ : LDAP_OPT_X_TLS_NEVER;
+
+ DEBUG(D_lookup) debug_printf_indent(
+ "Require certificate overrides LDAP_OPT_X_TLS option (%d)\n",
+ tls_option);