Branch: Tag:

2014-05-17

2014-05-17 11:43:36 by Henrik Grubbström (Grubba) <grubba@grubba.org>

SSL.sslfile: Changed client/server selection API.

Client and server operation is now selected by calling either
connect() (client-side) or accept() (server-side) after creating
the SSL.sslfile object.

Blocking handshaking mode is selected by calling set_blocking()
before either of the above.

705: Inside #if undefined(PARSE_RFCS) and #if constant(SSL.Cipher)
     #if constant(SSL.Cipher)    if(lauth->scheme == "ldaps") { -  ::create(SSL.sslfile(low_fd, context, 1,1)); +  SSL.sslfile ssl_fd = SSL.sslfile(low_fd, context); +  if (!ssl_fd->connect()) { +  ERROR("Failed to connect to LDAPS server.\n"); +  } +  ::create(ssl_fd);    info->tls_version = ldapfd->version;    } else    ::create(low_fd);
782: Inside #if constant(SSL.Cipher)
   context = SSL.Context();    }    object _f = ldapfd; -  ldapfd=SSL.sslfile(_f, context, 1, 1); -  return 1; +  ldapfd = SSL.sslfile(_f, context); +  return ldapfd->connect();   #endif    return 0;    }