|| config.getSecurityMode() == SecurityMode.disabled) { tlsHandled.reportSuccess(); saslFeatureReceived.reportSuccess();
if (!isSecureConnection() && getConfiguration().getSecurityMode() == SecurityMode.required) { shutdown(); throw new SecurityRequiredByClientException();
/** * Notification message saying that the server supports TLS so confirm the server that we * want to secure the connection. * * @param required true when the server indicates that TLS is required. */ void startTLSReceived(boolean required) { if (required && config.getSecurityMode() == ConnectionConfiguration.SecurityMode.disabled) { packetReader.notifyConnectionError(new IllegalStateException( "TLS required by server but not allowed by connection configuration")); return; } if (config.getSecurityMode() == ConnectionConfiguration.SecurityMode.disabled) { // Do not secure the connection using TLS since TLS was disabled return; } try { writer.write("<starttls xmlns=\"urn:ietf:params:xml:ns:xmpp-tls\"/>"); writer.flush(); } catch (IOException e) { packetReader.notifyConnectionError(e); } }
/** * Notification message saying that the server supports TLS so confirm the server that we * want to secure the connection. * * @param required true when the server indicates that TLS is required. */ void startTLSReceived(boolean required) { if (required && config.getSecurityMode() == ConnectionConfiguration.SecurityMode.disabled) { notifyConnectionError(new IllegalStateException( "TLS required by server but not allowed by connection configuration")); return; } if (config.getSecurityMode() == ConnectionConfiguration.SecurityMode.disabled) { // Do not secure the connection using TLS since TLS was disabled return; } try { writer.write("<starttls xmlns=\"urn:ietf:params:xml:ns:xmpp-tls\"/>"); writer.flush(); } catch (IOException e) { notifyConnectionError(e); } }
/** * Notification message saying that the server supports TLS so confirm the server that we * want to secure the connection. * * @param required true when the server indicates that TLS is required. */ void startTLSReceived(boolean required) { if (required && config.getSecurityMode() == ConnectionConfiguration.SecurityMode.disabled) { packetReader.notifyConnectionError(new IllegalStateException( "TLS required by server but not allowed by connection configuration")); return; } if (config.getSecurityMode() == ConnectionConfiguration.SecurityMode.disabled) { // Do not secure the connection using TLS since TLS was disabled return; } try { writer.write("<starttls xmlns=\"urn:ietf:params:xml:ns:xmpp-tls\"/>"); writer.flush(); } catch (IOException e) { packetReader.notifyConnectionError(e); } }
if (!startTLSReceived && connection.getConfiguration().getSecurityMode() == ConnectionConfiguration.SecurityMode.required) { throw new XMPPException("Server does not support security (TLS), " + if (!startTLSReceived || connection.getConfiguration().getSecurityMode() == ConnectionConfiguration.SecurityMode.disabled) { releaseConnectionIDLock();
if (!startTLSReceived && connection.getConfiguration().getSecurityMode() == ConnectionConfiguration.SecurityMode.required) if (!startTLSReceived || connection.getConfiguration().getSecurityMode() == ConnectionConfiguration.SecurityMode.disabled)
if (!startTLSReceived && connection.getConfiguration().getSecurityMode() == ConnectionConfiguration.SecurityMode.required) if (!startTLSReceived || connection.getConfiguration().getSecurityMode() == ConnectionConfiguration.SecurityMode.disabled)
|| config.getSecurityMode() == SecurityMode.disabled) { tlsHandled.reportSuccess(); saslFeatureReceived.reportSuccess();
if (!isSecureConnection() && getConfiguration().getSecurityMode() == SecurityMode.required) { shutdown(); throw new SecurityRequiredByClientException();