ctx = ld->ld_defconn->lconn_sasl_authctx;
+#ifdef HAVE_TLS
/* Check for TLS */
ssl = ldap_pvt_tls_sb_ctx( ld->ld_defconn->lconn_sb );
if ( ssl ) {
(void) ldap_int_sasl_external( ld, ld->ld_defconn, authid.bv_val, fac );
LDAP_FREE( authid.bv_val );
}
+#endif
#if !defined(_WIN32)
/* Check for local */
{ BER_BVNULL, BER_BVNULL }
};
+#ifdef HAVE_TLS
+
void
ldap_pvt_tls_ctx_free ( void *c )
{
void *
ldap_pvt_tls_sb_ctx( Sockbuf *sb )
{
-#ifdef HAVE_TLS
void *p = NULL;
ber_sockbuf_ctrl( sb, LBER_SB_OPT_GET_SSL, (void *)&p );
return p;
-#endif
- return NULL;
}
int
return tls_imp->ti_session_strength( session );
}
-
int
ldap_pvt_tls_get_my_dn( void *s, struct berval *dn, LDAPDN_rewrite_dummy *func, unsigned flags )
{
-#ifdef HAVE_TLS
tls_session *session = s;
struct berval der_dn;
int rc;
tls_imp->ti_session_my_dn( session, &der_dn );
rc = ldap_X509dn2bv(&der_dn, dn, (LDAPDN_rewrite_func *)func, flags );
return rc;
-#else /* !HAVE_TLS */
- return LDAP_NOT_SUPPORTED;
-#endif
}
+#endif /* HAVE_TLS */
int
ldap_start_tls( LDAP *ld,