public void preparePKIX() throws Exception
    {
        if (generatedPKIX != null) {
            throw new IllegalStateException("PKIX already prepared.");
        }

        if (useSelfSignedCertificate) {
            generatedPKIX = useExpiredEndEntityCertificate ? EXPIRED_SELF_SIGNED_CERTIFICATE : SELF_SIGNED_CERTIFICATE;
        } else {
            generatedPKIX = useExpiredEndEntityCertificate ? EXPIRED_CERTIFICATE_CHAIN : VALID_CERTIFICATE_CHAIN;
        }
    }
Generates KeyPairs and certificates that are used to identify this server using TLS.

The data that is generated by this method can be configured by invoking methods such as
{@link #setUseSelfSignedCertificate(boolean)} and
{@link #setUseExpiredEndEntityCertificate(boolean)}. These must be invoked before invoking #preparePKIX
xmppserver/src/test/java/org/jivesoftware/openfire/session/AbstractRemoteServerDummy.java