Skip to Main Content

Java Security

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JCE cannot authenticate the provider CryptixCrypto

843811Dec 2 2008 — edited Dec 18 2008
Hi

i am using cryptix open PGP encryption API. I included JCE provider jar file in my project.
there are two options by which we can register the provider.

First one :
i have put these entries inside $JAVA_HOME/jre/lib/security/java.security

security.provider.7=cryptix.jce.provider.CryptixCrypto
security.provider.8=cryptix.openpgp.provider.CryptixOpenPGP

but the exception i am getting is java.lang.SecurityException: No such algorithm

second one:
i am dynamically registering the provider as in following way

java.security.Security.addProvider(
new CryptixCrypto() );
java.security.Security.addProvider(
new cryptix.openpgp.provider.CryptixOpenPGP() );
but after that the exception i am getting is

java.lang.SecurityException: JCE cannot authenticate the provider CryptixCrypto
at javax.crypto.Cipher.getInstance(DashoA12275)
at javax.crypto.Cipher.getInstance(DashoA12275)
at cryptix.openpgp.algorithm.PGPAlgorithmFactory.getCipherAlgorithm(PGPAlgorithmFactory.java:675)
at cryptix.openpgp.packet.PGPKeyPacket.encrypt(PGPKeyPacket.java:426)
at cryptix.openpgp.provider.PGPKeyBundleImpl.addPrivateKey(PGPKeyBundleImpl.java:340)
at com.idealinvent.dm.GenerateAndWriteKey.generateComplexKey(Unknown Source)
at com.idealinvent.dm.PGPEncryption.execute(Unknown Source)
at com.idealinvent.dm.DownloadRequest.downloadFile(Unknown Source)
at com.idealinvent.dm.DownloadRequest.execute(Unknown Source)
at com.idealinvent.dm.ejb.MessageProcessor.onMessage(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
at org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(MessageDrivenContainer.java:495)
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.jav
at org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterceptor.java:116
at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
at org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:109)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:205)
at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:136)
at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:402)
at org.jboss.ejb.Container.invoke(Container.java:954)
at org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:987)
at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerInvoker.java:12
at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:266)
at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:902)
at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:170)
at org.jboss.mq.SpySession.run(SpySession.java:323)
at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:194)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:748)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.util.jar.JarException: file:/C:/Documents and Settings/.......
at javax.crypto.SunJCE_d.b(DashoA12275)
at javax.crypto.SunJCE_d.a(DashoA12275)
at javax.crypto.SunJCE_d.a(DashoA12275)
at javax.crypto.SunJCE_b.b(DashoA12275)
at javax.crypto.SunJCE_b.a(DashoA12275)
... 36 more

Please help me.
Thanks in advance
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 15 2009
Added on Dec 2 2008
2 comments
2,589 views