}
private MimeBodyPart decode2Mime(MimeBodyPart mp) throws MessagingException, CMSException, SMIMEException, NoSuchProviderException, IOException
{
SMIMEEnveloped m = new SMIMEEnveloped(mp);
RecipientId recId = new JceKeyTransRecipientId(cert);
RecipientInformationStore recipients = m.getRecipientInfos();
RecipientInformation recipient = recipients.get(recId);
return SMIMEUtil.toMimeBodyPart(recipient.getContent(privateKey, "BC"));