File tree Expand file tree Collapse file tree 1 file changed +4
-14
lines changed Expand file tree Collapse file tree 1 file changed +4
-14
lines changed Original file line number Diff line number Diff line change 1- warn 'Loading jruby-openssl gem in a non-JRuby interpreter' unless defined? JRUBY_VERSION
2-
31require 'jopenssl/version'
42
53# NOTE: assuming user does pull in BC .jars from somewhere else on the CP
2523end
2624
2725require 'jopenssl.jar'
28-
29- if JRuby ::Util . respond_to? ( :load_ext ) # JRuby 9.2
30- JRuby ::Util . load_ext ( 'org.jruby.ext.openssl.OpenSSL' )
31- else ; require 'jruby'
32- org . jruby . ext . openssl . OpenSSL . load ( JRuby . runtime )
33- end
34-
35- if RUBY_VERSION > '2.3'
36- load 'jopenssl/_compat23.rb'
37- end
26+ JRuby ::Util . load_ext ( 'org.jruby.ext.openssl.OpenSSL' )
3827
3928# NOTE: content bellow should live in *lib/openssl.rb* but due RubyGems/Bundler
4029# `autoload :OpenSSL` this will cause issues if an older version (0.11) is the
@@ -61,7 +50,6 @@ module OpenSSL
6150require 'openssl/bn'
6251require 'openssl/pkey'
6352require 'openssl/cipher'
64- #require 'openssl/config' if OpenSSL.const_defined?(:Config, false)
6553require 'openssl/digest'
6654require 'openssl/hmac'
6755require 'openssl/x509'
@@ -80,4 +68,6 @@ def self.secure_compare(a, b)
8068 hashed_b = OpenSSL ::Digest . digest ( 'SHA256' , b )
8169 OpenSSL . fixed_length_secure_compare ( hashed_a , hashed_b ) && a == b
8270 end
83- end
71+ end
72+
73+ load 'jopenssl/_compat23.rb'
You can’t perform that action at this time.
0 commit comments