log.debug("No existing user with username: "+username);
}
// Finally generate the certificate (assuming status is NEW and password is correct
byte[] response = processCertReq(username, password, cvcreq, REQTYPE_CVC, null, CertificateHelper.RESPONSETYPE_CERTIFICATE, logger);
CertificateResponse ret = new CertificateResponse(CertificateHelper.RESPONSETYPE_CERTIFICATE, response);
byte[] b64cert = ret.getData();
CVCertificate certObject = CertificateParser.parseCertificate(Base64.decode(b64cert));
java.security.cert.Certificate iscert = new CardVerifiableCertificate(certObject);
ArrayList<Certificate> retval = new ArrayList<Certificate>();
retval.add(new Certificate((java.security.cert.Certificate)iscert));
// Get the certificate chain