jruby-openssl 0.12.1-java → 0.12.2-java

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 2b73e2783a26e7aa5254c66e325fa6c824c78b8d
4
- data.tar.gz: feb0ad37fca2ead87ed151f8c543214f7912508b
2
+ SHA256:
3
+ metadata.gz: 5e7e293b2549e684866105df2df1b7fdc93b930a9740bf6b5159149dfbc236e0
4
+ data.tar.gz: 771bace1ef936acd0ec9508f30f4636c3415a3785ebe29883490646b9221eae9
5
5
  SHA512:
6
- metadata.gz: aba588920a82b3a568183ee03bcbee3175c033863654521bfc6a624be84072d510853ea2b457f8742d222e19a230c8ce67592a3df16e1ae625d1b644c7e858bf
7
- data.tar.gz: ce31f7f99e2352871b2fdefc084eef1d8497a97baacf4a99a6459e39abf0cb35e66a1a4b422e454db6e9433cd6c698b22e07dc1e7688e7c580a397cc0a7ae37b
6
+ metadata.gz: f746ec0e6551af8004714f6345154a0c52a429283828e8a41765617627d0498083283216b33dcca9fe1dd7206aeb1bc8d9bff0b2e6999395bfe8cdaa32dd295e
7
+ data.tar.gz: 9261e4930fd87105dfcf2ade1cba0cf8d241623394f83ecd0c86a476d151eb12de34fa480a0838347dcc4950acebae3306746b4e0c69ebeb2c109c38ce7a81ac
data/History.md CHANGED
@@ -1,3 +1,12 @@
1
+ ## 0.12.2
2
+
3
+ * [fix] work-around JRuby 9.2 autoload behavior (#248)
4
+ to be able to install jruby-openssl >= 0.12 on JRuby 9.2
5
+ while the default gem (shipped with JRuby) is < 0.12
6
+ * [feat] support alpn negotiation in ssl context (#247)
7
+ * [feat] support Java cipher names on `SSLContext#ciphers=`
8
+ * [fix] properly handle `require_jar` fallback
9
+
1
10
  ## 0.12.1
2
11
 
3
12
  * improved compatibility with the openssl gem (version 2.2.1)
data/lib/jopenssl/load.rb CHANGED
@@ -5,15 +5,19 @@ require 'jopenssl/version'
5
5
  # NOTE: assuming user does pull in BC .jars from somewhere else on the CP
6
6
  unless ENV_JAVA['jruby.openssl.load.jars'].eql?('false')
7
7
  version = JOpenSSL::BOUNCY_CASTLE_VERSION
8
- bc_jars = nil
9
8
  begin
10
9
  require 'jar-dependencies'
11
10
  # if we have jar-dependencies we let it track the jars
12
- require_jar( 'org.bouncycastle', 'bcprov-jdk15on', version )
13
- require_jar( 'org.bouncycastle', 'bcpkix-jdk15on', version )
14
- require_jar( 'org.bouncycastle', 'bctls-jdk15on', version )
11
+ require_jar 'org.bouncycastle', 'bcprov-jdk15on', version
12
+ require_jar 'org.bouncycastle', 'bcpkix-jdk15on', version
13
+ require_jar 'org.bouncycastle', 'bctls-jdk15on', version
14
+ begin # bcutil got extracted from bcprov in BC 1.69
15
+ require_jar 'org.bouncycastle', 'bcutil-jdk15to18', version
16
+ rescue LoadError, RuntimeError
17
+ # continue without loading the jar - assume we got BC < 1.69
18
+ end
15
19
  bc_jars = true
16
- rescue LoadError
20
+ rescue LoadError, RuntimeError
17
21
  bc_jars = false
18
22
  end
19
23
  unless bc_jars
@@ -34,3 +38,48 @@ end
34
38
  if RUBY_VERSION > '2.3'
35
39
  load 'jopenssl/_compat23.rb'
36
40
  end
41
+
42
+ # NOTE: content bellow should live in *lib/openssl.rb* but due RubyGems/Bundler
43
+ # `autoload :OpenSSL` this will cause issues if an older version (0.11) is the
44
+ # default gem under JRuby 9.2 (which on auto-load does not trigger a dynamic
45
+ # require - this is only fixed in JRuby 9.3)
46
+
47
+ module OpenSSL
48
+ autoload :Config, 'openssl/config' unless const_defined?(:Config, false)
49
+ autoload :PKCS12, 'openssl/pkcs12'
50
+ end
51
+
52
+ =begin
53
+ = Info
54
+ 'OpenSSL for Ruby 2' project
55
+ Copyright (C) 2002 Michal Rokos <m.rokos@sh.cvut.cz>
56
+ All rights reserved.
57
+
58
+ = Licence
59
+ This program is licensed under the same licence as Ruby.
60
+ (See the file 'LICENCE'.)
61
+ =end
62
+
63
+ require 'openssl/bn'
64
+ require 'openssl/pkey'
65
+ require 'openssl/cipher'
66
+ #require 'openssl/config' if OpenSSL.const_defined?(:Config, false)
67
+ require 'openssl/digest'
68
+ require 'openssl/hmac'
69
+ require 'openssl/x509'
70
+ require 'openssl/ssl'
71
+ require 'openssl/pkcs5'
72
+
73
+ module OpenSSL
74
+ # call-seq:
75
+ # OpenSSL.secure_compare(string, string) -> boolean
76
+ #
77
+ # Constant time memory comparison. Inputs are hashed using SHA-256 to mask
78
+ # the length of the secret. Returns +true+ if the strings are identical,
79
+ # +false+ otherwise.
80
+ def self.secure_compare(a, b)
81
+ hashed_a = OpenSSL::Digest.digest('SHA256', a)
82
+ hashed_b = OpenSSL::Digest.digest('SHA256', b)
83
+ OpenSSL.fixed_length_secure_compare(hashed_a, hashed_b) && a == b
84
+ end
85
+ end
@@ -1,9 +1,10 @@
1
1
  module JOpenSSL
2
- VERSION = '0.12.1'
2
+ VERSION = '0.12.2'
3
3
  BOUNCY_CASTLE_VERSION = '1.68'
4
4
  end
5
5
 
6
6
  Object.class_eval do
7
7
  Jopenssl = JOpenSSL
8
8
  private_constant :Jopenssl if respond_to?(:private_constant)
9
+ deprecate_constant :Jopenssl if respond_to?(:deprecate_constant)
9
10
  end
data/lib/jopenssl.jar CHANGED
Binary file
data/lib/openssl.rb CHANGED
@@ -1,43 +1,3 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'jopenssl/load'
4
-
5
- module OpenSSL
6
- autoload :Config, 'openssl/config' unless const_defined?(:Config, false)
7
- autoload :PKCS12, 'openssl/pkcs12'
8
- end
9
-
10
- =begin
11
- = Info
12
- 'OpenSSL for Ruby 2' project
13
- Copyright (C) 2002 Michal Rokos <m.rokos@sh.cvut.cz>
14
- All rights reserved.
15
-
16
- = Licence
17
- This program is licensed under the same licence as Ruby.
18
- (See the file 'LICENCE'.)
19
- =end
20
-
21
- require_relative 'openssl/bn'
22
- require_relative 'openssl/pkey'
23
- require_relative 'openssl/cipher'
24
- #require_relative 'openssl/config' if OpenSSL.const_defined?(:Config, false)
25
- require_relative 'openssl/digest'
26
- require_relative 'openssl/hmac'
27
- require_relative 'openssl/x509'
28
- require_relative 'openssl/ssl'
29
- require_relative 'openssl/pkcs5'
30
-
31
- module OpenSSL
32
- # call-seq:
33
- # OpenSSL.secure_compare(string, string) -> boolean
34
- #
35
- # Constant time memory comparison. Inputs are hashed using SHA-256 to mask
36
- # the length of the secret. Returns +true+ if the strings are identical,
37
- # +false+ otherwise.
38
- def self.secure_compare(a, b)
39
- hashed_a = OpenSSL::Digest.digest('SHA256', a)
40
- hashed_b = OpenSSL::Digest.digest('SHA256', b)
41
- OpenSSL.fixed_length_secure_compare(hashed_a, hashed_b) && a == b
42
- end
43
- end
data/pom.xml CHANGED
@@ -11,7 +11,7 @@ DO NOT MODIFY - GENERATED CODE
11
11
  <modelVersion>4.0.0</modelVersion>
12
12
  <groupId>rubygems</groupId>
13
13
  <artifactId>jruby-openssl</artifactId>
14
- <version>0.12.1</version>
14
+ <version>0.12.2</version>
15
15
  <packaging>gem</packaging>
16
16
  <name>JRuby OpenSSL</name>
17
17
  <description>JRuby-OpenSSL is an add-on gem for JRuby that emulates the Ruby OpenSSL native library.</description>
@@ -65,8 +65,8 @@ DO NOT MODIFY - GENERATED CODE
65
65
  <invoker.test>${bc.versions}</invoker.test>
66
66
  <jruby.plugins.version>2.0.1</jruby.plugins.version>
67
67
  <jruby.switches>-W0</jruby.switches>
68
- <jruby.version>9.1.17.0</jruby.version>
69
- <jruby.versions>9.1.17.0</jruby.versions>
68
+ <jruby.version>9.2.19.0</jruby.version>
69
+ <jruby.versions>9.2.19.0</jruby.versions>
70
70
  <mavengem-wagon.version>1.0.3</mavengem-wagon.version>
71
71
  <mavengem.wagon.version>1.0.3</mavengem.wagon.version>
72
72
  <polyglot.dump.pom>pom.xml</polyglot.dump.pom>
@@ -269,6 +269,7 @@ DO NOT MODIFY - GENERATED CODE
269
269
  <configuration>
270
270
  <source>1.8</source>
271
271
  <target>1.8</target>
272
+ <release>8</release>
272
273
  <encoding>UTF-8</encoding>
273
274
  <debug>true</debug>
274
275
  <showWarnings>true</showWarnings>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jruby-openssl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.1
4
+ version: 0.12.2
5
5
  platform: java
6
6
  authors:
7
7
  - Karol Bucek
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2022-02-02 00:00:00.000000000 Z
13
+ date: 2022-03-03 00:00:00.000000000 Z
14
14
  dependencies: []
15
15
  description: JRuby-OpenSSL is an add-on gem for JRuby that emulates the Ruby OpenSSL
16
16
  native library.
@@ -70,8 +70,7 @@ requirements:
70
70
  - jar org.bouncycastle:bcprov-jdk15on, 1.68
71
71
  - jar org.bouncycastle:bcpkix-jdk15on, 1.68
72
72
  - jar org.bouncycastle:bctls-jdk15on, 1.68
73
- rubyforge_project:
74
- rubygems_version: 2.6.14.1
73
+ rubygems_version: 3.1.6
75
74
  signing_key:
76
75
  specification_version: 4
77
76
  summary: JRuby OpenSSL