kpg.initialize(ecGenSpec, new SecureRandom());
KeyPair enrollmentPair = kpg.generateKeyPair();
PKCS10CertificationRequestBuilder pkcs10Builder = new JcaPKCS10CertificationRequestBuilder(new X500Name("CN=Test"), enrollmentPair.getPublic());
PKCS10CertificationRequest csr = pkcs10Builder.build(
new JcaContentSignerBuilder("SHA256WITHECDSA").setProvider("BC").build(enrollmentPair.getPrivate()));
<BUG>ESTServiceBuilder.ESTEnrollmentResponse enr = est.simpleEnroll(false, csr, new BasicAuth("estreal", "estuser", "estpwd"));
X509Certificate expectedCA = ESTTestUtils.toJavaX509Certificate(ESTTestUtils.readPemCertificate(</BUG>
ESTServerUtils.makeRelativeToServerHome("/estCA/cacert.crt")
));
<BUG>X509CertificateHolder enrolledAsHolder = ESTServiceBuilder.storeToArray(enr.getStore())[0];
X509Certificate enrolled = ESTTestUtils.toJavaX509Certificate(enrolledAsHolder);</BUG>
enrolled.verify(expectedCA.getPublicKey(), "BC");

kpg.initialize(ecGenSpec, new SecureRandom());
KeyPair enrollmentPair = kpg.generateKeyPair();
PKCS10CertificationRequestBuilder pkcs10Builder = new JcaPKCS10CertificationRequestBuilder(new X500Name("CN=Test"), enrollmentPair.getPublic());
PKCS10CertificationRequest csr = pkcs10Builder.build(
new JcaContentSignerBuilder("SHA256WITHECDSA").setProvider("BC").build(enrollmentPair.getPrivate()));
ESTService.ESTEnrollmentResponse enr = est.simpleEnroll(false, csr, new BasicAuth("estreal", "estuser", "estpwd"));
X509Certificate expectedCA = ESTTestUtils.toJavaX509Certificate(ESTTestUtils.readPemCertificate(
ESTServerUtils.makeRelativeToServerHome("/estCA/cacert.crt")
));
X509CertificateHolder enrolledAsHolder = ESTService.storeToArray(enr.getStore())[0];
X509Certificate enrolled = ESTTestUtils.toJavaX509Certificate(enrolledAsHolder);
enrolled.verify(expectedCA.getPublicKey(), "BC");
