PDA

View Full Version : Encryption operation failed: java.security.InvalidKeyException: Illegal key size or


Alain Knaff
2008-06-17, 12:31 PM
Now, if I try to register a new user, I get the following message in the browser:

Error
An error was encountered:

Encryption operation failed: java.security.InvalidKeyException: Illegal key size or default parameters

Please press the return button to go back to the previous page.


... and the following in the catalina.out log (still set to debug):

17:20:21,125 ERROR net.project.security.EncryptionManager:327 - Error encrypting. Invalid security key: java.security.InvalidKeyException: Illegal key size or default parameters
17:20:21,126 DEBUG net.project.base.PnetException:56 - net.project.security.EncryptionException: Encryption operation failed: java.security.InvalidKeyException: Illegal key size or default parameters
java.security.InvalidKeyException: Illegal key size or default parameters
at javax.crypto.Cipher.a(DashoA12275)
at javax.crypto.Cipher.init(DashoA12275)
at javax.crypto.Cipher.init(DashoA12275)
at net.project.security.EncryptionManager.encryptBlow fishBytes(EncryptionManager.java:321)
at net.project.security.EncryptionManager.encryptBlow fish(EncryptionManager.java:258)
at net.project.base.directory.nativedir.NativeDirecto ryEntry.setClearTextHintPhrase(NativeDirectoryEntr y.java:169)
at org.apache.jsp.registration.NativeDirectoryAuthori zationController_jsp._jspService(NativeDirectoryAu thorizationController_jsp.java:117)
at org.apache.jasper.runtime.HttpJspBase.service(Http JspBase.java:98)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:803)
at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:188)
at net.project.security.SecurityFilter.doFilter(Secur ityFilter.java:62)
at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:188)
at net.project.security.SessionAccessFilter.doFilter( SessionAccessFilter.java:79)
at org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.java:174)
at org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.servic e(CoyoteAdapter.java:151)
at org.apache.coyote.http11.Http11Processor.process(H ttp11Processor.java:874)
at org.apache.coyote.http11.Http11BaseProtocol$Http11 ConnectionHandler.processConnection(Http11BaseProt ocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.process Socket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThr ead.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlR unnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Thread.java:595)

DSD998
2008-06-17, 02:12 PM
I upgraded from the 8.3 release to self compiled 8.4 trunk last night, and now 2/4 of my users are getting that same error when trying to sign in. The other two and appadmin have no problems signing in, but get that error at various places within the application.

Alain Knaff
2008-06-19, 06:09 AM
Even after almost 2 days of looking for a solution on this, I didn't advance. This looks like a real show-stopper now.

Thanks for any help

Avinash
2008-06-20, 09:04 AM
check http://community.project.net/trac/pnet-community/wiki/Production-Tomcat55#a5.2:UpdatetheJavaSecurityforStrongEncryp tion

and follow the instruction #5.2

Alain Knaff
2008-06-24, 05:24 AM
Indeed, copying US_export_policy.jar and local_policy.jar from core/lib/jce to $JAVAHOME/lib/security helped. Thanks.

dashti
2009-07-13, 03:07 AM
Thank you very much for your help!
I also faced this problem and you helped me so much.