public static ResultHolder generateSelfSignedCertificate() throws Exception
    {
        return generateTestCertificate( null, true, true, 0 );
    }
Instantiates a new certificate that is self-signed, meaning that the issuer and subject values are identical. The
returned certificate is valid in the same manner as described in the documentation of
{@link #generateValidCertificate()}.

@return A certificate that is self-signed (never null).
@see #generateValidCertificate()
xmppserver/src/test/java/org/jivesoftware/openfire/keystore/KeystoreTestUtils.java