Reputation: 1861
I wanted to code from this answer but i have error The import org.bouncycastle.openssl cannot be resolved
The import org.bouncycastle.openssl cannot be resolved
and i have no idea how coudl i repair this becouse other bouncycastle libs are detected correctly.
I will be grateful for any ideas whats wrong. Im using eclipse and i have instaled bouncycastle like in this instruction itcsoultions
Upvotes: 10
Views: 34237
Reputation: 492
Whenever we get error saying "The import *** cannot be resolved", it means that there is problem with library. Here, bcprov-jdk jar is missing.
I did the following, and it worked for me!
1. Download bcprov-jdk15on-152.jar from https://www.bouncycastle.org/latest_releases.html
2. Right click on Project-->Properties-->Java Build Path-->Libraries tab--> Click on Add External JARs.. Select the path where you have the dowlnloaded bcprov-jdk15on-152.jar.
Then click OK. That's it.
Upvotes: 4
Reputation: 33046
In addition to the provider (a.k.a. bcprov
) and lightweight API, you also need the PKIX API, which provides the openssl
package.
Either download bcpkix-jdk15on-150.jar
from BC downloads page (direct link) and drop it in the same directory of bcprov
or add it to your maven dependencies with its coordinates:
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcpkix-jdk15on</artifactId>
<version>1.50</version>
</dependency>
Upvotes: 28