DERObject derobj = new DERInputStream(new ByteArrayInputStream(decBytes)).readObject();
DERObject derobj = new ASN1InputStream(new ByteArrayInputStream(decBytes)).readObject();
    private void decrypt()            throws NoSuchAlgorithmException, InvalidKeyException, IllegalBlockSizeException,            CMSException, NoSuchProviderException, BadPaddingException,            InvalidAlgorithmParameterException, GeneralSecurityException, IOException {        log.debug(">decrypt");        // Now we are getting somewhere (pheew),        // Now we just have to get the damn key...to decrypt the PKCS10        if (privateKey == null) {            errorText = "Need private key to decrypt!";            error = 5;            log.error(errorText);            return;        }        if (envEncData == null) {            errorText = "No enveloped data to decrypt!";            error = 6;            log.error(errorText);            return;        }        CMSEnvelopedData ed = new CMSEnvelopedData(envEncData);        RecipientInformationStore recipients = ed.getRecipientInfos();        Collection c = recipients.getRecipients();        Iterator it = c.iterator();        byte[] decBytes = null;        while (it.hasNext()) {            RecipientInformation recipient = (RecipientInformation) it.next();            decBytes = recipient.getContent(privateKey, "BC");            break;        }        DERObject derobj = new DERInputStream(new ByteArrayInputStream(decBytes)).readObject();        if (messageType == ScepRequestMessage.SCEP_TYPE_PKCSREQ) {            ASN1Sequence seq = (ASN1Sequence) derobj;            pkcs10 = new PKCS10CertificationRequest(seq);        }        if (messageType == ScepRequestMessage.SCEP_TYPE_GETCRL) {            issuerAndSerno = IssuerAndSerialNumber.getInstance(derobj);        }        log.debug("Successfully extracted PKCS10.");        log.debug("<decrypt");    } // decrypt