} catch (CADoesntExistsException e) { log.error("Requested CA does not exist: ", e);
    public byte[] scepCertRequest(byte[] msg)            throws ObjectNotFoundException, AuthLoginException,            SignRequestException, AuthStatusException, IllegalKeyException,            SignRequestSignatureException {        byte[] ret = null;        log.debug(">getRequestMessage(" + msg.length + " bytes)");        try {            reqmsg = new ScepRequestMessage(msg);            if (reqmsg.getErrorNo() != 0) {                log.error("Error '" + reqmsg.getErrorNo() + "' receiving Scep request message.");                return null;            }            if (reqmsg.getMessageType() == ScepRequestMessage.SCEP_TYPE_PKCSREQ) {                // Get the certificate                IResponseMessage resp = signsession.createCertificate(admin, reqmsg, -1,                        Class.forName("se.anatom.ejbca.protocol.ScepResponseMessage"));                if (resp != null) {                    ret = resp.getResponseMessage();                }            }            if (reqmsg.getMessageType() == ScepRequestMessage.SCEP_TYPE_GETCRL) {                // create the stupid encrypted CRL message, the below can actually only be made                 // at the CA, since CAs privvate key is needed to decrypt                IResponseMessage resp = signsession.getCRL(admin, reqmsg,                        Class.forName("se.anatom.ejbca.protocol.ScepResponseMessage"));                if (resp != null) {                    ret = resp.getResponseMessage();                }            }        } catch (IOException e) {            log.error("Error receiving ScepMessage: ", e);        } catch (GeneralSecurityException e) {            log.error("Error receiving ScepMessage: ", e);        } catch (ClassNotFoundException e) {            log.error("Error createing response message template: ", e);        } catch (CADoesntExistsException e) {            log.error("Requested CA does not exist: ", e);        }        log.debug("<getRequestMessage():" + ((ret == null) ? 0 : ret.length));        return ret;    }