Win a copy of Java EE 8 High Performance this week in the Java/Jakarta EE forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem in decrypting SMIME  RSS feed

Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys,

I am findign it difficult as to how I can create an SMIMEEnveloped object:

On executing my second line, I get the following exception:

I have smime.p7m file (encrypted) on my machine, which I want to decrypt.

I have the complete certificate, which works fine when I load it on my windows machine.

The certificate loading also works fine, in my opinion in my java program, it just that it is unable to decrypt the smime part.

I am using bcpkix-jdk15on-151 and bcmail-jdk15on-151 as bouncy castle jars.
Any help in this regard shall be highlly appreciated.

Attached is the complete source file

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!