- lc_curr.lc_conn = op->o_conn->c_is_tls ?
- LDAP_BACK_PRIV_CONN_TLS : LDAP_BACK_PRIV_CONN;
+#ifdef HAVE_TLS
+ if ( op->o_conn->c_is_tls ) {
+ lc_curr.lc_conn = LDAP_BACK_PRIV_CONN_TLS;
+ } else
+#endif /* HAVE_TLS */
+ {
+ lc_curr.lc_conn = LDAP_BACK_PRIV_CONN;
+ }
}
/* Internal searches are privileged and shared. So is root. */
/* FIXME: there seem to be concurrency issues */
if ( op->o_do_not_cache || be_isroot( op ) ) {
lc_curr.lc_local_ndn = op->o_bd->be_rootndn;
}
/* Internal searches are privileged and shared. So is root. */
/* FIXME: there seem to be concurrency issues */
if ( op->o_do_not_cache || be_isroot( op ) ) {
lc_curr.lc_local_ndn = op->o_bd->be_rootndn;
- lc_curr.lc_conn = op->o_conn->c_is_tls ?
- LDAP_BACK_PRIV_CONN_TLS : LDAP_BACK_PRIV_CONN;
+#ifdef HAVE_TLS
+ if ( op->o_conn->c_is_tls ) {
+ lc_curr.lc_conn = LDAP_BACK_PRIV_CONN_TLS;
+ } else
+#endif /* HAVE_TLS */
+ {
+ lc_curr.lc_conn = LDAP_BACK_PRIV_CONN;
+ }
/* if start TLS failed but it was not mandatory,
* check if the non-TLS connection was already
* in cache; in case, destroy the newly created
/* if start TLS failed but it was not mandatory,
* check if the non-TLS connection was already
* in cache; in case, destroy the newly created