Discussion:
MimeBodyPart reading a mail
filippo2
2014-08-20 09:06:56 UTC
Permalink
i decrypt a mail and when i arrive to this code

MimeBodyPart res = SMIMEUtil.toMimeBodyPart(recipient.getContent(new
JceKeyTransEnvelopedRecipient((PrivateKey)ks.getKey(keyAlias,
storepass)).setProvider("BC")));


i get a MimeBodyPart where the clauseObject
Object o = res.getContent();

enter in the "if" clause

else if (o instanceof InputStream) {

i create some system.out

System.out.println("res-getContentType: "+res.getContentType();
System.out.println("res-getContent: "+res.getContent());
System.out.println("res-fileName_: "+res.getFileName());

and i get

res-getContentType: application/x-pkcs7-mime; name="smime.p7m"
res-getContent: ***@1b9ce4b
res-fileName_: smime.p7m

if i create a file from my InputStream is= res.getInputStream();

a get the file that i'm attaching to this post

ok

now what can i do to read my result?

thanks

avvs.txt <http://bouncy-castle.1462172.n4.nabble.com/file/n4657312/avvs.txt>



--
View this message in context: http://bouncy-castle.1462172.n4.nabble.com/MimeBodyPart-reading-a-mail-tp4657312.html
Sent from the Bouncy Castle - Dev mailing list archive at Nabble.com.
filippo2
2014-08-20 11:08:30 UTC
Permalink
i attach The schematic representation of the mail Immagine.jpg
<Loading Image...>



--
View this message in context: http://bouncy-castle.1462172.n4.nabble.com/MimeBodyPart-reading-a-mail-tp4657312p4657313.html
Sent from the Bouncy Castle - Dev mailing list archive at Nabble.com.
filippo2
2014-08-22 11:58:58 UTC
Permalink
solved

i create a second MimeBodyPart



--
View this message in context: http://bouncy-castle.1462172.n4.nabble.com/MimeBodyPart-reading-a-mail-tp4657312p4657321.html
Sent from the Bouncy Castle - Dev mailing list archive at Nabble.com.
Loading...