@Test
void generateEndEntitySignedCertificateVersion1() throws Exception
{

    CertifiedPublicKey caCertificate =
        factory.getInstance(signerFactory.getInstance(true, rsaPrivateKey),
            new X509CertificateGenerationParameters(
                //<validity in days>
            ))
            .generate(new DistinguishedName("CN=Test CA"), rsaPublicKey,
                new X509CertificateParameters());
    //dumpCert(caCertificate);
    CertifiedPublicKey certificate =
        factory.getInstance(
            CertifyingSigner.getInstance(true, new CertifiedKeyPair(rsaPrivateKey, caCertificate), signerFactory),
            new X509CertificateGenerationParameters(
                //<validity in days>
            )
        ).generate(new DistinguishedName("CN=Test End Entity"), dsaPublicKey,
            new X509CertificateParameters());
    checkRootSigned(certificate, 1);
}