certie 0.0.4 → 0.0.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/certie.rb +6 -7
  3. metadata +6 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1a3c56f3a3837a12b682a1f2ff1afe8259c32f62ee6e34873f3ca77a2c503849
4
- data.tar.gz: e19b2ea7b7a3fa9fe158ea17dbd3972a7fa9cc731b2d88660ce87f69c369646f
3
+ metadata.gz: 44aaa693768a8ded233b16049a5fc3d3d2aaf5ba356d6dab736354e702619ed2
4
+ data.tar.gz: ff05530e2f35673871e7f056882692d323dd266ca34bcf201240777072e10dc2
5
5
  SHA512:
6
- metadata.gz: 5027aa317621f51cf8838b67e62c137f52b9382811ecc3745a05021b92a00e6fae977daae625e5a147987b297ed318da810f9f2f2cd41e959e28725aebbac242
7
- data.tar.gz: 4c381be9da66e76aa331ed8e5fb70f33374609d585a508a424223e520ce86fef596357aa1f7a9b0f2c589cb2df1188f0a7b7979593adb10677f8dbff2ba4a278
6
+ metadata.gz: 7edc34343ffd7d39edee5877863f160c706f0b6560c6ef1b26dd47a30c385a71e06815b6c3663ee3b79d93e3c20522bfe767bb30ab0f1cd32734fecba4534df2
7
+ data.tar.gz: 8a2d4e1df09ca87792d120c635afcb281911df49d3393f854682ab9e5d962831fa5756e2ad360e0f55a23b872dac815eb384d1c755192d45f7d6840c303e4c1a
@@ -1,4 +1,3 @@
1
-
2
1
  require 'openssl'
3
2
 
4
3
  class CertificateWrapper
@@ -99,10 +98,13 @@ class CertificateWrapper
99
98
  end
100
99
  end
101
100
 
102
- # TODO: Find an alternative to invoking OpenSSL and cat - OpenSSL v2.2.0 seems to have private_to_pem in OpenSSL::PKey
103
- `openssl pkcs8 -topk8 -inform pem -in "#{cn}.rsa" -out "#{cn}.key" -nocrypt`
101
+ # An alternative to invoking OpenSSL and cat - OpenSSL v2.2.0 has private_to_pem in OpenSSL::PKey
102
+ # `openssl pkcs8 -topk8 -inform pem -in "#{cn}.rsa" -out "#{cn}.key" -nocrypt`
103
+ File.open "#{cn}.key", 'wb' do |myfile|
104
+ myfile.print(key.private_to_pem)
105
+ end
104
106
 
105
- # TODO: Test replacement of the system call cat with file_cat
107
+ # Replaced system call cat with file_cat method
106
108
  # `cat "#{cn}.cert" "#{cn}.key" > "#{cn}.pem"`
107
109
  file_cat "#{cn}.pem", ["#{cn}.cert", "#{cn}.key"]
108
110
  end
@@ -122,6 +124,3 @@ class CertificateWrapper
122
124
  create_certificate cn
123
125
  end
124
126
  end
125
-
126
- # key = OpenSSL::PKey::RSA.new 2048
127
- # puts key.private_to_pem
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: certie
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Katkam Nitin Reddy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-09-07 00:00:00.000000000 Z
11
+ date: 2020-11-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: openssl
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: 2.2.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0'
26
+ version: 2.2.0
27
27
  description:
28
28
  email:
29
29
  executables: