lazy_rsa 0.3.4 → 0.3.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/lazy_rsa.rb +8 -2
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 755ac237d936d4039dfb3747d5cd08b6bcdfbd87659d43e24421c9076a85c191
4
- data.tar.gz: 2ce50dd2483a2810ab657b81f4ce007324d4aaf088713bdb2be175c0510ea7b9
3
+ metadata.gz: d733afe6ae05ae2f7323d8f291a02e6fc87dc862c47fcf98dbbc02d9840633c5
4
+ data.tar.gz: bf2677279eaacb7e01a3b108ea1d1f207ebfa45bc7fac40659c2fe5f2b7c0ec4
5
5
  SHA512:
6
- metadata.gz: 1c40648e208b53aed1ef062e02b472750f6453250ab4c9bc25e67ae993c7059375b47b7a68d798efa9710a47a6a71dd575e3520aa47816cdd90d38688d7cf6c8
7
- data.tar.gz: 547ee01457bf706399f4a850fcb98c851f5780694a5dec268f6852222e2f157c2a1f50b7f5fd6c85767eac0e8e4d89bdf073737e6696b52781d53fcf571a873b
6
+ metadata.gz: 34e13d0e31098bbdb4598f5f66d8b4f4218618f1983f0fec767f70a3414b1a9230cf70adfd1b4a4ecccd3442227ff83699078f8d9fdbcbf88d956320e5de8131
7
+ data.tar.gz: d1376fe17524a3a631f538d19190fb3888e3392f716e89215185f15588cd89c9b6726f6e9c4cfde01c67a27e66850b7364ded362cca1a8ac435e5f6f0afa9378
data/lib/lazy_rsa.rb CHANGED
@@ -31,9 +31,15 @@ module LazyRsa
31
31
 
32
32
  def build_key(e: nil, d: nil, n:)
33
33
  data_sequence = OpenSSL::ASN1::Sequence([
34
+ OpenSSL::ASN1::Integer.new(0),
34
35
  OpenSSL::ASN1::Integer(n),
35
- OpenSSL::ASN1::Integer(e),
36
- OpenSSL::ASN1::Integer(d),
36
+ e.nil? ? OpenSSL::ASN1::Integer.new(0) : OpenSSL::ASN1::Integer(e),
37
+ d.nil? ? OpenSSL::ASN1::Integer.new(0) : OpenSSL::ASN1::Integer(d),
38
+ OpenSSL::ASN1::Integer.new(0),
39
+ OpenSSL::ASN1::Integer.new(0),
40
+ OpenSSL::ASN1::Integer.new(0),
41
+ OpenSSL::ASN1::Integer.new(0),
42
+ OpenSSL::ASN1::Integer.new(0),
37
43
  ])
38
44
  asn1 = OpenSSL::ASN1::Sequence(data_sequence)
39
45
  OpenSSL::PKey::RSA.new(asn1.to_der)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lazy_rsa
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.4
4
+ version: 0.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Quaranto