@Override
    void startTLS() throws Exception {
        boolean needed = JiveGlobals.getBooleanProperty(ConnectionSettings.Server.TLS_CERTIFICATE_VERIFY, true) &&
                JiveGlobals.getBooleanProperty(ConnectionSettings.Server.TLS_CERTIFICATE_CHAIN_VERIFY, true) &&
                !JiveGlobals.getBooleanProperty(ConnectionSettings.Server.TLS_ACCEPT_SELFSIGNED_CERTS, false);
        //needed ? Connection.ClientAuth.needed : Connection.ClientAuth.wanted
        connection.startTLS(false, false);
    }
Controls if JIDs that are in the addresses of stanzas supplied by remote domains are validated.
xmppserver/src/main/java/org/jivesoftware/openfire/net/ServerStanzaHandler.java