gen.setDigestOid(digestoid);
    private byte[] genScepRequest(boolean makeCrlReq) throws InvalidKeyException, NoSuchAlgorithmException, NoSuchProviderException, SignatureException, InvalidAlgorithmParameterException, CertStoreException, IOException, CMSException {        ScepRequestGenerator gen = new ScepRequestGenerator();        gen.setKeys(keys);        byte[] msgBytes = null;        if (makeCrlReq) {            msgBytes = gen.generateCrlReq("C=SE, O=PrimeKey, CN=sceptest", cacert);        } else {            msgBytes = gen.generateCertReq("C=SE, O=PrimeKey, CN=sceptest", "foo123", cacert);                    }        assertNotNull(msgBytes);        transId = gen.getTransactionId();        assertNotNull(transId);        byte[] idBytes = Base64.decode(transId.getBytes());        assertTrue(idBytes.length == 16);        senderNonce = gen.getSenderNonce();        byte[] nonceBytes = Base64.decode(senderNonce.getBytes());        assertTrue(nonceBytes.length == 16);         return msgBytes;    }