jruby-openssl 0.9.18-java → 0.9.19-java

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7f388e4b46a1251e1b24c13f15a7bde0f18e08a7
4
- data.tar.gz: 4e1b627fe988301ef5cb741837459427b902d0a7
3
+ metadata.gz: fb1f830ea348fd26b11fe83a542a77aac7e4e330
4
+ data.tar.gz: 091f65172ee221e9441934259149bb111ce15fcd
5
5
  SHA512:
6
- metadata.gz: 4952dbaa5751dca5391834d9640e87685acd2c239794332fb7c548bbe7843ebef64a787794fccfa874bf75982faa80f036395674479ab73d21bc8f028cef7b7c
7
- data.tar.gz: 81a1455e6c84d53198db6b4f7c49037d26cae33fb1a4fbd29977ed5f19a950253daa8028fbbdb3f9b23356752cc9a4f6461b14e5c6e64674badcdc94eccc76de
6
+ metadata.gz: 210b5e716e5ac06ebeddb756b887adb31fae18b337c55ba7ef7ca60137f44185cbb4b6e4e8cff7f223cd70d14559be59b85cd2d450e104d6cced43e9fb53c1ae
7
+ data.tar.gz: 68e72a6edc19f06dd5288589b8c09949067e782a8bdb39ac74a9841fac46858e8a9c5e3dcc5b28f823777e77ed5504f139124642d9e59b321a4eb2360bd42373
data/History.md CHANGED
@@ -1,3 +1,13 @@
1
+ ## 0.9.19
2
+
3
+ * re-use secure random from thread-context on SSL context initialization
4
+ * preliminary OpenSSL 1.1 (Ruby 2.4) compatibility bits (#112)
5
+ * try using thread-shared secure random gen (in PKey-s) where possible
6
+ * implement PKeyDSA#syssign and PKeyDSA#sysverify methods
7
+ * avoid (unnecessary) byte[] copies in PKey#sign/verify
8
+ * fix ClassCastException error in X509Store.verify (#113)
9
+ * align BH#hash with eql? (+ equals/hashCode on Java)
10
+
1
11
  ## 0.9.18
2
12
 
3
13
  * handle X.509 authorityKeyIdentifier parsing somehow right (#102)
Binary file
@@ -27,6 +27,7 @@ org.jruby.ext.openssl.OpenSSL.load(JRuby.runtime)
27
27
 
28
28
  if RUBY_VERSION > '2.3'
29
29
  load 'jopenssl23/openssl.rb'
30
+ load 'jopenssl24.rb' if RUBY_VERSION >= '2.4'
30
31
  elsif RUBY_VERSION > '2.2'
31
32
  load 'jopenssl22/openssl.rb'
32
33
  elsif RUBY_VERSION > '2.1'
@@ -1,5 +1,5 @@
1
1
  module Jopenssl
2
- VERSION = '0.9.18'
2
+ VERSION = '0.9.19'
3
3
  BOUNCY_CASTLE_VERSION = '1.55'
4
4
  # @deprecated
5
5
  module Version
@@ -132,7 +132,6 @@ module OpenSSL::Buffering
132
132
  buf.replace(ret)
133
133
  ret = buf
134
134
  end
135
- raise EOFError if ret.empty?
136
135
  ret
137
136
  end
138
137
 
@@ -182,7 +181,6 @@ module OpenSSL::Buffering
182
181
  buf.replace(ret)
183
182
  ret = buf
184
183
  end
185
- raise EOFError if ret.empty?
186
184
  ret
187
185
  end
188
186
 
@@ -14,9 +14,12 @@
14
14
 
15
15
  module OpenSSL
16
16
  class Cipher
17
- # This class is only provided for backwards compatibility. Use OpenSSL::Cipher in the future.
18
- class Cipher < Cipher
19
- # add warning
20
- end
17
+
18
+ # Deprecated.
19
+ #
20
+ # This class is only provided for backwards compatibility.
21
+ # Use OpenSSL::Cipher.
22
+ class Cipher < Cipher; end
23
+ deprecate_constant :Cipher
21
24
  end # Cipher
22
25
  end # OpenSSL
@@ -14,18 +14,13 @@
14
14
 
15
15
  module OpenSSL
16
16
  class Digest
17
+
17
18
  # Deprecated.
18
19
  #
19
20
  # This class is only provided for backwards compatibility.
20
- class Digest < Digest # :nodoc:
21
- # Deprecated.
22
- #
23
- # See OpenSSL::Digest.new
24
- def initialize(*args)
25
- warn('Digest::Digest is deprecated; use Digest')
26
- super(*args)
27
- end
28
- end
21
+ # Use OpenSSL::Digest instead.
22
+ class Digest < Digest; end # :nodoc:
23
+ deprecate_constant :Digest
29
24
 
30
25
  end # Digest
31
26
 
@@ -108,10 +108,8 @@ module OpenSSL
108
108
  #
109
109
  # You can get a list of valid methods with OpenSSL::SSL::SSLContext::METHODS
110
110
  def initialize(version = nil)
111
- INIT_VARS.each { |v| instance_variable_set v, nil }
112
- self.options = self.options | OpenSSL::SSL::OP_ALL
113
- return unless version
114
- self.ssl_version = version
111
+ self.options |= OpenSSL::SSL::OP_ALL
112
+ self.ssl_version = version if version
115
113
  end unless defined? JRUBY_VERSION # JRuby: handled in "native" Java
116
114
 
117
115
  ##
@@ -0,0 +1,112 @@
1
+ # frozen_string_literal: false
2
+
3
+ # Ruby 2.4 preliminary compatibility script, loaded after all (2.3) jruby-openssl files
4
+
5
+ module OpenSSL
6
+
7
+ module SSL
8
+ class SSLContext
9
+ # OpenSSL 1.1.0 introduced "security level"
10
+ def security_level; 0 end
11
+ def security_level=(level); raise NotImplementedError end
12
+ end
13
+ end
14
+
15
+ module PKey
16
+
17
+ class DH
18
+
19
+ def set_key(pub_key, priv_key)
20
+ self.public_key = pub_key
21
+ self.priv_key = priv_key
22
+ self
23
+ end
24
+
25
+ def set_pqg(p, q, g)
26
+ self.p = p
27
+ # TODO self.q = q
28
+ if respond_to?(:q)
29
+ self.q = q
30
+ else
31
+ OpenSSL.warn "JRuby-OpenSSL does not support setting q param on #{inspect}" if q
32
+ end
33
+ self.g = g
34
+ self
35
+ end
36
+
37
+ end
38
+
39
+ class DSA
40
+
41
+ def set_key(pub_key, priv_key)
42
+ self.public_key = pub_key
43
+ self.priv_key = priv_key
44
+ self
45
+ end
46
+
47
+ def set_pqg(p, q, g)
48
+ self.p = p
49
+ self.q = q
50
+ self.g = g
51
+ self
52
+ end
53
+
54
+ end
55
+
56
+ class RSA
57
+
58
+ def set_key(n, e, d)
59
+ self.n = n
60
+ self.e = e
61
+ self.d = d
62
+ self
63
+ end
64
+
65
+ def set_factors(p, q)
66
+ self.p = p
67
+ self.q = q
68
+ self
69
+ end
70
+
71
+ def set_crt_params(dmp1, dmq1, iqmp)
72
+ self.dmp1 = dmp1
73
+ self.dmq1 = dmq1
74
+ self.iqmp = iqmp
75
+ self
76
+ end
77
+
78
+ end
79
+
80
+ # openssl/lib/openssl/pkey.rb :
81
+
82
+ class DH
83
+
84
+ remove_const :DEFAULT_512 if const_defined?(:DEFAULT_512)
85
+
86
+ DEFAULT_2048 = new <<-_end_of_pem_
87
+ -----BEGIN DH PARAMETERS-----
88
+ MIIBCAKCAQEA7E6kBrYiyvmKAMzQ7i8WvwVk9Y/+f8S7sCTN712KkK3cqd1jhJDY
89
+ JbrYeNV3kUIKhPxWHhObHKpD1R84UpL+s2b55+iMd6GmL7OYmNIT/FccKhTcveab
90
+ VBmZT86BZKYyf45hUF9FOuUM9xPzuK3Vd8oJQvfYMCd7LPC0taAEljQLR4Edf8E6
91
+ YoaOffgTf5qxiwkjnlVZQc3whgnEt9FpVMvQ9eknyeGB5KHfayAc3+hUAvI3/Cr3
92
+ 1bNveX5wInh5GDx1FGhKBZ+s1H+aedudCm7sCgRwv8lKWYGiHzObSma8A86KG+MD
93
+ 7Lo5JquQ3DlBodj3IDyPrxIv96lvRPFtAwIBAg==
94
+ -----END DH PARAMETERS-----
95
+ _end_of_pem_
96
+
97
+ end
98
+
99
+ remove_const :DEFAULT_TMP_DH_CALLBACK if const_defined?(:DEFAULT_TMP_DH_CALLBACK)
100
+
101
+ DEFAULT_TMP_DH_CALLBACK = lambda { |ctx, is_export, keylen|
102
+ warn "using default DH parameters." if $VERBOSE
103
+ case keylen
104
+ when 1024 then OpenSSL::PKey::DH::DEFAULT_1024
105
+ when 2048 then OpenSSL::PKey::DH::DEFAULT_2048
106
+ else nil
107
+ end
108
+ }
109
+
110
+ end
111
+
112
+ end
data/pom.xml CHANGED
@@ -11,7 +11,7 @@ DO NOT MODIFIY - GENERATED CODE
11
11
  <modelVersion>4.0.0</modelVersion>
12
12
  <groupId>rubygems</groupId>
13
13
  <artifactId>jruby-openssl</artifactId>
14
- <version>0.9.18</version>
14
+ <version>0.9.19</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>
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.9.18
4
+ version: 0.9.19
5
5
  platform: java
6
6
  authors:
7
7
  - Ola Bini
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-11-06 00:00:00.000000000 Z
12
+ date: 2016-12-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  requirement: !ruby/object:Gem::Requirement
@@ -118,6 +118,7 @@ files:
118
118
  - lib/jopenssl23/openssl/pkey.rb
119
119
  - lib/jopenssl23/openssl/ssl.rb
120
120
  - lib/jopenssl23/openssl/x509.rb
121
+ - lib/jopenssl24.rb
121
122
  - lib/jruby-openssl.rb
122
123
  - lib/openssl.rb
123
124
  - lib/openssl/bn.rb