Quantcast

Security problems creating messages

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Security problems creating messages

dani-18
Hi,  
    I get next exception when I try to sign a message:

[hidden email]
java.lang.SecurityException: class "org.bouncycastle.mail.smime.CMSProcessableBodyPartOutbound"'s signer information does not match signer information of other classes in the same package
    at java.lang.ClassLoader.checkCerts(ClassLoader.java:568)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:496)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:250)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:54)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:193)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
    at org.bouncycastle.mail.smime.SMIMESignedGenerator.make(SMIMESignedGenerator.java:227)
    at org.bouncycastle.mail.smime.SMIMESignedGenerator.generate(SMIMESignedGenerator.java:371)
    at com.steria.cet.smime.creation.bouncyCastle.FDIGmailCreatorBC.signMessage(FDIGmailCreatorBC.java:181)
    at com.steria.cet.smime.creation.test.FDIGtestCreacion.main(FDIGtestCreacion.java:120)

If've modified my java.policy file adding:

grant {
    // There are no restrictions to any algorithms.
    permission javax.crypto.CryptoAllPermission;
};

and I've downloaded bouncy castle jce signed jar as you sugest on your documentation but it doesn't works. If I put bouncy castle jars, mail.jar and activation.jar on de lib/ext of my JRE the problem gets solved but I'd like to find another way to solve it.

thanks and best regards,

dani.

Loading...