Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Anyone IAIK ?

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I have a big problem: I use the IAIK classes for digital signature and I get the follow problem:

java.lang.ExceptionInInitializerError
at javax.crypto.Cipher.a(DashoA6275)
at javax.crypto.Cipher.getInstance(DashoA6275)
at iaik.pkcs.pkcs7.SignerInfo.getDigest(Unknown Source)
at iaik.pkcs.pkcs7.SignedDataStream.verify(Unknown Source)
at iaik.pkcs.pkcs7.SignedDataStream.verify(Unknown Source)
at it.artware.inail.portale.associazionecategoria.digitalsignature.Firmato.analizza(Firmato.java:184)
at jsp_servlet._e_services._asscategoria.__ricevifile._jspService(__ricevifile.java:199)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1075)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:418)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:462)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:20)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
at it.artware.inail.portale.FiltroAutenticazione.doFilter(FiltroAutenticazione.java:86)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:5523)
at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:685)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3156)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2506)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:234)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:210)
Caused by: java.lang.SecurityException: Cannot set up certs for trusted CAs
at javax.crypto.SunJCE_b.<clinit>(DashoA6275)
... 21 more
Caused by: java.security.PrivilegedActionException: java.security.InvalidKeyException: InitVerify error: java.security.NoSuchAlgorithmException: Cannot find any provider supporting RSA/ECB/PKCS1Padding
at java.security.AccessController.doPrivileged(Native Method)
... 22 more
Caused by: java.security.InvalidKeyException: InitVerify error: java.security.NoSuchAlgorithmException: Cannot find any provider supporting RSA/ECB/PKCS1Padding
at iaik.security.rsa.RSASignature.engineInitVerify(Unknown Source)
at java.security.Signature.initVerify(Signature.java:297)
at sun.security.x509.X509CertImpl.verify(X509CertImpl.java:429)
at sun.security.x509.X509CertImpl.verify(X509CertImpl.java:383)
at javax.crypto.SunJCE_b.c(DashoA6275)
at javax.crypto.SunJCE_b.b(DashoA6275)
at javax.crypto.SunJCE_s.run(DashoA6275)
... 23 more


I'm sure that the code is OK (also the combination of the algorithms RSA/ECB/PKCS1Padding is OK) because in the test machine works OK. The environment of the two machines I think is identical (BEA Weblogic 7.0).
I deploy a .war file with includes the iaik_jce-full.jar. Everythink appears the same for the two server machines. The only evident difference is that the machine doesn't work has two front end servers in a cluster but I don't think that is a problem?
Any help may be usefull..... Thanks everyone!

P.S. I use the signed jars of IAIK and I added on the java.security file the line:
security.provider.2=iaik.security.provider.IAIK
but with no effect, I add anyway the provider on the code. The strange is everythink works fine on the test machine (same .WAR, same server weblogic7, same classpath)
 
Evangelos Papadakis
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK. Resolved. I replace JDK 1.4.2 with JDK 1.4.1 and everythink is working properly.
 
To get a wish, you need a genie. To get a genie, you need a lamp. To get a lamp, you need a tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic