Package nu.fw.jeti.plugins.xmpp.tls

Examples of nu.fw.jeti.plugins.xmpp.tls.StartTlsPacket


    {
      doFeatures((Features)packet);
    }
    else if(packet instanceof StartTlsPacket)
    {
      StartTlsPacket tlsp = (StartTlsPacket)packet;
      if(tlsp.hasFailed())
      {
        if(state == State.SASL)
        {//TLS failed
          //TODO ask user to try again or try without TLS or use old
          //or try again, then try old ssl on 5223, then ask to connect without tls
          connect.sendLoginError("TLS negotion failed");
        }
        else if (state == State.COMPRESSION)
        {//compression failed
          connect.sendLoginError("Compression negotion failed");
        }
        else if (state == State.BIND)
        {//SASL failed
          connect.sendLoginError("Wrong password");
          String error = tlsp.getError();
          if("incorrect-encoding".equals(error))
          {//wrong base64
            connect.sendLoginError("Bug in Jeti, please report");
            Log.error("Sasl incorrect-encoding");
          }
View Full Code Here


  private void doFeatures(Features f) {
    System.out.println("features " + f + " state" + state);
    if(state == State.TLS && f.hasFeature(StartTls.class))
    {
      state = State.SASL;
      connect.sendWhileConnecting(new StartTlsPacket());
    }
    else if(state == State.TLS || state == State.SASL)
    {
      state = State.BIND;
      if(f.hasFeature(SaslMechanisms.class)) startSasl((SaslMechanisms)f.getFeature(SaslMechanisms.class));
View Full Code Here

TOP

Related Classes of nu.fw.jeti.plugins.xmpp.tls.StartTlsPacket

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.