public void test19TestBCPKCS10RSAWithRSASha256WithMGF1CA() throws Exception {
log.trace(">test19TestBCPKCS10RSAWithRSASha256WithMGF1CA()");
userAdminSession.setUserStatus(admin, "foorsamgf1ca", UserDataConstants.STATUS_NEW);
log.debug("Reset status of 'foorsamgf1ca' to NEW");
// Create certificate request
PKCS10CertificationRequest req = new PKCS10CertificationRequest(AlgorithmConstants.SIGALG_SHA256_WITH_RSA_AND_MGF1, CertTools
.stringToBcX509Name("C=SE, O=AnaTom, CN=foorsamgf1ca"), rsakeys.getPublic(), new DERSet(), rsakeys.getPrivate());
ByteArrayOutputStream bOut = new ByteArrayOutputStream();
DEROutputStream dOut = new DEROutputStream(bOut);
dOut.writeObject(req);
dOut.close();
PKCS10CertificationRequest req2 = new PKCS10CertificationRequest(bOut.toByteArray());
boolean verify = req2.verify();
log.debug("Verify returned " + verify);
assertTrue(verify);
log.debug("CertificationRequest generated successfully.");
byte[] bcp10 = bOut.toByteArray();
PKCS10RequestMessage p10 = new PKCS10RequestMessage(bcp10);