pike.git / lib / modules / Protocols.pmod / LDAP.pmod / client.pike

version» Context lines:

pike.git/lib/modules/Protocols.pmod/LDAP.pmod/client.pike:698: Inside #if undefined(PARSE_RFCS)
   //ldapfd->destroy();    //ldap=0;    //ok = 0;    //if(con_fail)    // con_fail(this, @extra_args);    ERROR ("Failed to connect to LDAP server: %s\n", ldap_rem_errstr);    }      #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);   #else    if(lauth->scheme == "ldaps") {    THROW(({"LDAP: LDAPS is not available without SSL support.\n",backtrace()}));    }    else    ::create(low_fd);   #endif
pike.git/lib/modules/Protocols.pmod/LDAP.pmod/client.pike:775: Inside #if constant(SSL.Cipher)
      do_op(msgval);    int result = ASN1_RESULTCODE(.ldap_privates.ldap_der_decode (readbuf));    if(result!=0) return 0;    // otherwise, we can try to negotiate.    if(!context)    {    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;    }       //! Requests that a SSL/TLS session be negotiated on the connection.    //! If the connection is already secure, this call will fail.    //!    //! @param context    //! an optional SSL.context object to provide to the    //! SSL/TLS connection client.