Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Cannot require 'openssl' in a signed jruby jar as of jruby 1.7.3 #1719
I cannot sign the jruby-complete jar and run it any more, after upgrading to the latest version. I "binary searched" to find where the problem first starts happening, and it's the upgrade to jruby 1.7.3 from 1.7.2 that breaks this.
The reason I need to sign the jar is because I am deploying my application via a JNLP (Java Web Start), and java security requirements dictate that I have to sign all of the jars. I have tried unjaring, signing everything (including the jopenssl.jar, the bouncycastle jars, etc) re-creating the jruby-complete jar and then signing it too, but that doesn't work either.
I very well may just be "doing it wrong" but can not figure out the right way.
Under jruby 1.7.2:
Starting with 1.7.3 all the way up to 1.7.12:
java.lang.SecurityException: class "org.jruby.ext.openssl.OpenSSLReal$OpenSSLModule$INVOKER$s$0$0$errors"'s signer information does not match signer information of other classes in the same package
From what I can tell, this is the crucial line:
It looks like it's dynamically defining a new jruby module based on the java code inside OpenSSLReal.java... and that newly defined class is not signed since it didn't exist at compile time? Just guessing based on my limited knowledge of the jruby codebase and java in general...
Any ideas on approaches to how to fix this?
@kares I was able to verify that JOpenSSL 0.9.6 fixes this issue, by hacking the pom.rb and pom.xml in the latest jruby-1_7 branch to update to 0.9.6.
I hate to be a pest, but is there any chance of releasing a 1.7.x with this upgrade? If not I can of course use my custom-built snapshot jar.