The jruby-openssl gem prior to 0.6 for JRuby mishandles SSL certificate validation.
jruby jruby-openssl