public static ResultHolder generateCertificateChainWithExpiredEndEntityCert(@Nullable final String subjectCommonName) throws Exception
    {
        return generateCertificateChainWithExpiredCertOnPosition(subjectCommonName, 0);
    }
Generates a chain of certificates, identical to {@link #generateValidCertificateChain()}, with one exception:
the first certificate (the end-entity) is expired.

@param subjectCommonName The CN value to use in the end-entity certificate.
@return an array of certificates. Never null, never an empty array.
xmppserver/src/test/java/org/jivesoftware/openfire/keystore/KeystoreTestUtils.java