jruby-openssl 0.10.0-java → 0.10.1-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 +12 -0
- data/Mavenfile +12 -33
- data/lib/jopenssl.jar +0 -0
- data/lib/jopenssl/_compat23.rb +71 -0
- data/lib/jopenssl/load.rb +13 -7
- data/lib/jopenssl/version.rb +3 -2
- data/lib/jopenssl19/openssl/ssl-internal.rb +104 -0
- data/lib/jopenssl22/openssl/ssl.rb +16 -16
- data/lib/jopenssl23/openssl.rb +1 -1
- data/lib/jopenssl23/openssl/bn.rb +2 -1
- data/lib/jopenssl23/openssl/buffering.rb +34 -23
- data/lib/jopenssl23/openssl/config.rb +65 -64
- data/lib/jopenssl23/openssl/digest.rb +1 -1
- data/lib/jopenssl23/openssl/pkey.rb +22 -34
- data/lib/jopenssl23/openssl/ssl.rb +187 -121
- data/lib/jopenssl23/openssl/x509.rb +7 -1
- data/lib/openssl/bn.rb +1 -3
- data/lib/openssl/buffering.rb +1 -3
- data/lib/openssl/cipher.rb +1 -3
- data/lib/openssl/config.rb +10 -4
- data/lib/openssl/digest.rb +1 -3
- data/lib/openssl/pkcs12.rb +1 -3
- data/lib/openssl/pkcs5.rb +22 -0
- data/lib/openssl/ssl-internal.rb +1 -3
- data/lib/openssl/ssl.rb +1 -3
- data/lib/openssl/x509-internal.rb +1 -3
- data/lib/openssl/x509.rb +1 -3
- data/pom.xml +12 -60
- metadata +4 -10
- data/integration/1.47/pom.xml +0 -15
- data/integration/1.48/pom.xml +0 -15
- data/integration/1.49/pom.xml +0 -15
- data/integration/1.50/pom.xml +0 -15
- data/integration/Mavenfile +0 -57
- data/integration/pom.xml +0 -122
- data/lib/jopenssl24.rb +0 -112
- data/lib/openssl/pkcs7.rb +0 -5
data/lib/jopenssl24.rb
DELETED
@@ -1,112 +0,0 @@
|
|
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
|