Branch: Tag:


2017-10-30 10:22:46 by Henrik Grubbström (Grubba) <>

Protocols.LDAP: Use SSL in blocking mode.

SSL.File defaults to non-blocking mode and the LDAP module
attempts syncronous blocking writes. Non-blocking mode causes
these writes to eg fail with EAGAIN if the connection hasn't
finished being negotiated before the first write.

Fixes "LDAP write error: Resource temporarily unavailable".

704: Inside #if undefined(PARSE_RFCS) and #if constant(SSL.Cipher)
  #if constant(SSL.Cipher)    if(lauth->scheme == "ldaps") {    SSL.File ssl_fd = SSL.File(low_fd, context); +  ssl_fd->set_blocking(); // NB: SSL.File defaults to non-blocking mode.    if (!ssl_fd->connect()) {    ERROR("Failed to connect to LDAPS server.\n");    }