2

I wrote a new provider and also a application to test it.

JCE only accepted a signed provider according this article.

I didn't have a certificate from an entity trusted by JCA, so i wonder can i use a self-sign certificate to sign this new provider.

I followed this article to add my certificate to JDK's cacerts. Then used this certificate to sign the provider jar file.

But i still got this Exception:

Exception in thread "main" java.security.NoSuchProviderException: JCE cannot authenticate the provider Tang
  at javax.crypto.SunJCE_b.a(DashoA13*..)
  at javax.crypto.Mac.getInstance(DashoA13*..)
  at SSLServer.<init>(SSLServer.java:48)
  at SSLServer.main(SSLServer.java:156)
Caused by: java.util.jar.JarException: Cannot parse file:/D:/Develop/tang.jar
  at javax.crypto.SunJCE_c.a(DashoA13*..)
  at javax.crypto.SunJCE_b.b(DashoA13*..)
  at javax.crypto.SunJCE_b.a(DashoA13*..)
  ... 4 more

My question is only a certificate from an entity trusted by JCA can sign JCE provider jar file, anyother java code-signing certificate, like comodo or self-siged, can't?

txworking
  • 280
  • 1
  • 10

0 Answers0