certie 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/certie.rb +6 -7
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 44aaa693768a8ded233b16049a5fc3d3d2aaf5ba356d6dab736354e702619ed2
|
4
|
+
data.tar.gz: ff05530e2f35673871e7f056882692d323dd266ca34bcf201240777072e10dc2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7edc34343ffd7d39edee5877863f160c706f0b6560c6ef1b26dd47a30c385a71e06815b6c3663ee3b79d93e3c20522bfe767bb30ab0f1cd32734fecba4534df2
|
7
|
+
data.tar.gz: 8a2d4e1df09ca87792d120c635afcb281911df49d3393f854682ab9e5d962831fa5756e2ad360e0f55a23b872dac815eb384d1c755192d45f7d6840c303e4c1a
|
data/lib/certie.rb
CHANGED
@@ -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
|
-
#
|
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
|
-
#
|
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
|
+
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-
|
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:
|
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:
|
26
|
+
version: 2.2.0
|
27
27
|
description:
|
28
28
|
email:
|
29
29
|
executables:
|