File tree 1 file changed +4
-14
lines changed
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
-
3
1
require 'jopenssl/version'
4
2
5
3
# NOTE: assuming user does pull in BC .jars from somewhere else on the CP
25
23
end
26
24
27
25
require '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' )
38
27
39
28
# NOTE: content bellow should live in *lib/openssl.rb* but due RubyGems/Bundler
40
29
# `autoload :OpenSSL` this will cause issues if an older version (0.11) is the
@@ -61,7 +50,6 @@ module OpenSSL
61
50
require 'openssl/bn'
62
51
require 'openssl/pkey'
63
52
require 'openssl/cipher'
64
- #require 'openssl/config' if OpenSSL.const_defined?(:Config, false)
65
53
require 'openssl/digest'
66
54
require 'openssl/hmac'
67
55
require 'openssl/x509'
@@ -80,4 +68,6 @@ def self.secure_compare(a, b)
80
68
hashed_b = OpenSSL ::Digest . digest ( 'SHA256' , b )
81
69
OpenSSL . fixed_length_secure_compare ( hashed_a , hashed_b ) && a == b
82
70
end
83
- end
71
+ end
72
+
73
+ load 'jopenssl/_compat23.rb'
You can’t perform that action at this time.
0 commit comments