File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # frozen_string_literal: false
2+
3+ module OpenSSL
4+
5+ module PKey
6+
7+ class DH
8+
9+ def set_key ( pub_key , priv_key )
10+ self . public_key = pub_key
11+ self . priv_key = priv_key
12+ self
13+ end
14+
15+ def set_pqg ( p , q , g )
16+ self . p = p
17+ if respond_to? ( :q )
18+ self . q = q
19+ else # TODO self.q = q
20+ OpenSSL . warn "JRuby-OpenSSL does not support setting q param on #{ inspect } " if q
21+ end
22+ self . g = g
23+ self
24+ end
25+
26+ end
27+
28+ class DSA
29+
30+ def set_key ( pub_key , priv_key )
31+ self . public_key = pub_key
32+ self . priv_key = priv_key
33+ self
34+ end
35+
36+ def set_pqg ( p , q , g )
37+ self . p = p
38+ self . q = q
39+ self . g = g
40+ self
41+ end
42+
43+ end
44+
45+ class RSA
46+
47+ def set_key ( n , e , d )
48+ self . n = n
49+ self . e = e
50+ self . d = d
51+ self
52+ end
53+
54+ def set_factors ( p , q )
55+ self . p = p
56+ self . q = q
57+ self
58+ end
59+
60+ def set_crt_params ( dmp1 , dmq1 , iqmp )
61+ self . dmp1 = dmp1
62+ self . dmq1 = dmq1
63+ self . iqmp = iqmp
64+ self
65+ end
66+
67+ end
68+
69+ end
70+
71+ end
Original file line number Diff line number Diff line change 3232
3333if RUBY_VERSION > '2.3'
3434 load 'jopenssl23/openssl.rb'
35- load 'jopenssl24 .rb' if RUBY_VERSION >= '2.4 '
35+ load 'jopenssl/_compat23 .rb'
3636elsif RUBY_VERSION > '2.2'
3737 load 'jopenssl22/openssl.rb'
3838elsif RUBY_VERSION > '2.1'
You can’t perform that action at this time.
0 commit comments