title: LDAPConnection (org.apache.directory.ldap.client.api.LdapConnection) fails on ssl
body: <p>I get an error on trying to connect to my server via 636 and ssl enabled.</p>
  
  <p>I used apache directory studio to explore the Active directory and connected via port 636 and ssl (ldaps://....)</p>
  
  <p>now i got the following code: </p>
  
  <pre><code>LdapConnection connection = new LdapNetworkConnection("172.16.1.8", 636, true);
  </code></pre>
  
  <p>and this doesn't work:</p>
  
  <pre><code>org.apache.directory.api.ldap.model.exception.LdapProtocolErrorException: PROTOCOL_ERROR: The server will disconnect!
  at org.apache.directory.api.ldap.model.message.ResultCodeEnum.processResponse(ResultCodeEnum.java:2163)
  at org.apache.directory.ldap.client.api.AbstractLdapConnection.bind(AbstractLdapConnection.java:129)
  at org.apache.directory.ldap.client.api.AbstractLdapConnection.bind(AbstractLdapConnection.java:112)
  at ch.berufsbildungscenter.notiztool.control.Account.login(Account.java:123)
  at ch.berufsbildungscenter.notiztool.control.Account.login(Account.java:100)
  at ch.berufsbildungscenter.notiztool.gui.control.LoginController$2.run(LoginController.java:53)
  </code></pre>
  
  <p>Someone got an idea why not?</p>
  
  <p>Here's the login function: </p>
  
  <pre><code>/**
   * Checks the pw with the pw on the Active Directory.
   * 
   * @param username 
   * @param pw
   * @param b
   * 
   * @return true if login was successful, false if not.
   */
  private static boolean login(String username, String pw, Berufsbildner b) {
      if(b == null)
          return false;
      String cn = b.getNachname() + " " + b.getVorname();
      //Create connection to the LDAP server
      @SuppressWarnings("resource")
      LdapConnection connection = new LdapNetworkConnection("172.16.1.8", 636, true);
      //try to bind with the login data
      try {
          //------------------ Here's the exception
          connection.bind("CN="+ cn +",OU=Ausbilder,OU=Informatiker,OU=Ascom Bern,OU=Berufsbildungscenter,DC=bbcnet,DC=ch", pw);
          loggedin = true;
          currentAccount = b;
      } catch (LdapException e) {
          e.printStackTrace();
          loggedin = false;
          return false;
      }
      return true;
  </code></pre>
  
  <p>Thanks</p>