JRuby Builtin OpenSSL Support

JRuby historically has not shipped with a fully functional openssl module due to cryptographic export restrictions. However, in order to support Rails 2.0 out of the box, we implemented a limited subset of openssl that implements OpenSSL::HMAC and OpenSSL::Digest.

However, this breaks programs that use require 'openssl' as a test for whether openssl is available or not. Soap4r is one such program. In order to support this behavior, simply add

require 'jruby/openssl/gem_only'

at the start of your program, and requiring openssl will revert to raising a load error.

See also JRUBY-1808 for a discussion on this feature.