jruby-openssl 0.9.18-java → 0.9.19-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/History.md +10 -0
- data/lib/jopenssl.jar +0 -0
- data/lib/jopenssl/load.rb +1 -0
- data/lib/jopenssl/version.rb +1 -1
- data/lib/jopenssl23/openssl/buffering.rb +0 -2
- data/lib/jopenssl23/openssl/cipher.rb +7 -4
- data/lib/jopenssl23/openssl/digest.rb +4 -9
- data/lib/jopenssl23/openssl/ssl.rb +2 -4
- data/lib/jopenssl24.rb +112 -0
- data/pom.xml +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fb1f830ea348fd26b11fe83a542a77aac7e4e330
|
4
|
+
data.tar.gz: 091f65172ee221e9441934259149bb111ce15fcd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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)
|
data/lib/jopenssl.jar
CHANGED
Binary file
|
data/lib/jopenssl/load.rb
CHANGED
data/lib/jopenssl/version.rb
CHANGED
@@ -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
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
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
|
-
|
21
|
-
|
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
|
-
|
112
|
-
self.
|
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
|
##
|
data/lib/jopenssl24.rb
ADDED
@@ -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.
|
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.
|
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-
|
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
|