mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-07 23:51:21 -05:00
ITS#4072 prevent ldaps listeners when TLS is not configured
This commit is contained in:
parent
f54bc26357
commit
4f0c386c68
1 changed files with 7 additions and 0 deletions
|
|
@ -836,6 +836,13 @@ static int slap_open_listener(
|
|||
#else
|
||||
l.sl_is_tls = ldap_pvt_url_scheme2tls( lud->lud_scheme );
|
||||
|
||||
if ( l.sl_is_tls && !slap_tls_ctx ) {
|
||||
Debug( LDAP_DEBUG_ANY,
|
||||
"daemon: TLS not configured (%s)\n",
|
||||
url, 0, 0 );
|
||||
ldap_free_urldesc( lud );
|
||||
return -1;
|
||||
}
|
||||
if(! lud->lud_port ) {
|
||||
lud->lud_port = l.sl_is_tls ? LDAPS_PORT : LDAP_PORT;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue