cat.debug("Created certificate (PKCS7) for " + username);
log.debug("Created certificate (PKCS7) for " + username);
    public byte[] pkcs10CertRequest(ISignSessionRemote signsession, byte[] b64Encoded, String username, String password)        throws Exception {        X509Certificate cert;        byte[] buffer;        try {            // A real PKCS10 PEM request            String beginKey = "-----BEGIN CERTIFICATE REQUEST-----";            String endKey = "-----END CERTIFICATE REQUEST-----";            buffer = FileTools.getBytesFromPEM(b64Encoded, beginKey, endKey);        } catch (IOException e) {            try {                // Keytool PKCS10 PEM request                String beginKey = "-----BEGIN NEW CERTIFICATE REQUEST-----";                String endKey = "-----END NEW CERTIFICATE REQUEST-----";                buffer = FileTools.getBytesFromPEM(b64Encoded, beginKey, endKey);            } catch (IOException ioe) {                // IE PKCS10 Base64 coded request                buffer = Base64.decode(b64Encoded);            }            /*            ISignSessionRemote ss = home.create();            cert = (X509Certificate) ss.createCertificate(administrator, username, password, new PKCS10RequestMessage(buffer));            */        }        cert = (X509Certificate) signsession.createCertificate(administrator, username, password, new PKCS10RequestMessage(buffer));        byte[] pkcs7 = signsession.createPKCS7(administrator, cert);        cat.debug("Created certificate (PKCS7) for " + username);        debug.print("<h4>Generated certificate:</h4>");        debug.printInsertLineBreaks(cert.toString().getBytes());        return Base64.encode(pkcs7);    } //ieCertRequest