3

I have to load and verify pkcs7 file in java. I found many tutorials that talk about CMSSignedData but I can't find the package org.bouncycastle.cms.*, there is just org.bouncycastle.asn1.cms.* and it doesn't contain the class CMSSignedData.

I downloaded these libraries: bcprov-jdk15on-152.jar, bcprov-ext-jdk15on-152.jar and bcmail-jdk15on-152.jar.

Is there other package that I didn't add ?

Hakim
  • 434
  • 7
  • 21

2 Answers2

5

Finally I found the answer, the bcpkix-jdk15on-152.jar was missing. The class CMSSignedData is embedded in this jar.

Most tutorials that i followed mentioned that only the three jar above are necessary.

Hakim
  • 434
  • 7
  • 21
1

Add to pom.xml:

<dependency>
  <groupId>org.bouncycastle</groupId>
  <artifactId>bcpkix-jdk15on</artifactId>
  <version>1.68</version>
</dependency>