ASN1Set recipientInfos = envData.getRecipientInfos();
Enumeration e = recipientInfos.getObjects();
while (e.hasMoreElements()) {
RecipientInfo ri = RecipientInfo.getInstance(e.nextElement());
KeyTransRecipientInfo recipientInfo = KeyTransRecipientInfo.getInstance(ri.getInfo());
RecipientIdentifier rid = recipientInfo.getRecipientIdentifier();
IssuerAndSerialNumber iasn = IssuerAndSerialNumber.getInstance(rid.getId());
issuerDN = iasn.getName().toString();
serialNo = iasn.getSerialNumber().getValue();
log.debug("IssuerDN: " + issuerDN);
log.debug("SerialNumber: " + iasn.getSerialNumber().getValue().toString(16));
}