Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some "no such provider" initialisation errors in tests #54

Closed

Conversation

rtyley
Copy link
Contributor

@rtyley rtyley commented Jan 26, 2014

When running the Gradle build, these tests fail because the Bouncy Castle provider has not been registered.

Caused by: java.security.NoSuchProviderException: no such provider: BC
	at sun.security.jca.GetInstance.getService(GetInstance.java:83)
	at sun.security.jca.GetInstance.getInstance(GetInstance.java:206)
	at java.security.Signature.getInstance(Signature.java:355)
	at org.bouncycastle.jcajce.NamedJcaJceHelper.createSignature(NamedJcaJceHelper.java:95)

Fix org.bouncycastle.tsp.test.NewTSPTest:

org.bouncycastle.tsp.test.NewTSPTest > testGeneral FAILED
    java.lang.ExceptionInInitializerError
        at org.bouncycastle.tsp.test.NewTSPTest.testGeneral(NewTSPTest.java:64)
        Caused by:
        java.lang.RuntimeException: java.security.NoSuchProviderException: no such provider: BC
            at org.bouncycastle.tsp.test.TSPTestUtil.<clinit>(TSPTestUtil.java:86)
            ... 1 more

java.security.NoSuchAlgorithmException: MD5WithRSAEncryption Signature not available
	at java.security.Signature.getInstance(Signature.java:224)
	at org.bouncycastle.x509.X509Util.getSignatureInstance(X509Util.java:190)
	at org.bouncycastle.x509.X509Util.calculateSignature(X509Util.java:223)
	at org.bouncycastle.x509.X509V3CertificateGenerator.generate(X509V3CertificateGenerator.java:434)
	at org.bouncycastle.x509.X509V3CertificateGenerator.generate(X509V3CertificateGenerator.java:412)
	at org.bouncycastle.tsp.test.TSPTestUtil.makeCertificate(TSPTestUtil.java:196)
	at org.bouncycastle.tsp.test.TSPTestUtil.makeCACertificate(TSPTestUtil.java:155)
	at org.bouncycastle.tsp.test.NewTSPTest.testGeneral(NewTSPTest.java:65)
@peterdettman
Copy link
Collaborator

Merged, thanks.

@peterdettman
Copy link
Collaborator

Really merged this time!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants