public static ResultHolder generateExpiredCertificate(@Nullable final String subjectCommonName)  throws Exception
    {
        return generateTestCertificate( subjectCommonName, false, false, 0 );
    }
Instantiates a new certificate of which the notAfter value is a point in time that is in the past (as compared
to the point in time of the invocation of this method).

@param subjectCommonName The CN value to use in the certificate.
@return A certificate that is invalid (never null).
xmppserver/src/test/java/org/jivesoftware/openfire/keystore/KeystoreTestUtils.java