ovpn-key 0.7.3 → 0.7.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/bin/ovpn-key +2 -1
- data/defaults/openssl.ini +0 -1
- data/defaults/ovpn-key.yml +1 -0
- data/lib/functions.rb +3 -3
- data/lib/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 315b12aaa3f38b10e0c6d190f56eb6715efeb8b702c6427eb10ee51c6fd56246
|
4
|
+
data.tar.gz: 14586944d2f1b9b388198e6e05c8bc2347fe706c7aa065539e61bbc0588c3bd5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bde20521e7bcce945590fb9d04cba55e71b64ffab36c950341dd94f0b36cbd366d5e8437fa7fb2716ea4f1724331a829be36336c558d7b5dc5d076d9463278fb
|
7
|
+
data.tar.gz: 15197a504f944248d85e865e0262c1c4283c2c56a9d683f22a9411e2185570c4f05b260278b43323d6b6676851619ec619040be21b7777d079b6801923959c3d
|
data/README.md
CHANGED
@@ -32,10 +32,10 @@ If you're brave, [let me know](https://github.com/chillum/ovpn-key/issues), wher
|
|
32
32
|
3. `ovpn-key --ca --dh --server --nopass`
|
33
33
|
4. `ovpn-key --client somebody [--nopass]`
|
34
34
|
5. `ovpn-key --revoke somebody`
|
35
|
-
6.
|
35
|
+
6. `ovpn-key --static` (generates `ta.key`)
|
36
|
+
7. add a file with `.ovpn` extension to the directory
|
36
37
|
it should contain every setting except for `cert` and `key`
|
37
|
-
|
38
|
-
8. `ovpn-key --static` (generates `ta.key`)
|
38
|
+
8. `ovpn-key --zip somebody-else [--nopass]`
|
39
39
|
|
40
40
|
### Configuration
|
41
41
|
|
data/bin/ovpn-key
CHANGED
@@ -91,11 +91,12 @@ OPENVPN = settings['openvpn'] || 'openvpn'
|
|
91
91
|
OPENSSL = settings['openssl'] || 'openssl'
|
92
92
|
KEY_SIZE = settings['key_size'] || 2048
|
93
93
|
ENCRYPT = settings['encrypt'] || 'aes128'
|
94
|
+
CA_DAYS = settings['ca_days'] || 3650
|
94
95
|
CN_CA = settings['ca_name'] || 'Certification Authority'
|
95
96
|
REQ = settings['details']
|
96
97
|
|
97
98
|
if options[:generate_ca]
|
98
|
-
gen_key('ca',
|
99
|
+
gen_key('ca', options[:no_password])
|
99
100
|
sign_key('ca', 'ca', CN_CA)
|
100
101
|
gen_crl
|
101
102
|
end
|
data/defaults/openssl.ini
CHANGED
data/defaults/ovpn-key.yml
CHANGED
data/lib/functions.rb
CHANGED
@@ -14,11 +14,11 @@ def exe cmd
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def gen_and_sign type, certname, no_password
|
17
|
-
gen_key(
|
17
|
+
gen_key(certname, no_password)
|
18
18
|
sign_key(type, certname, certname)
|
19
19
|
end
|
20
20
|
|
21
|
-
def gen_key
|
21
|
+
def gen_key certname, no_password
|
22
22
|
if no_password
|
23
23
|
exe "#{OPENSSL} genrsa -out '#{certname}.key' #{KEY_SIZE}"
|
24
24
|
else
|
@@ -28,7 +28,7 @@ end
|
|
28
28
|
|
29
29
|
def sign_key type, certname, cn
|
30
30
|
if certname == 'ca'
|
31
|
-
exe "#{OPENSSL} req -new -x509 -key '#{certname}.key' -out '#{certname}.crt' -config #{SSL_CONF} -subj '/CN=#{cn}#{REQ}' -extensions ext.#{type}"
|
31
|
+
exe "#{OPENSSL} req -new -x509 -key '#{certname}.key' -out '#{certname}.crt' -config #{SSL_CONF} -subj '/CN=#{cn}#{REQ}' -extensions ext.#{type} -days #{CA_DAYS}"
|
32
32
|
else
|
33
33
|
exe "#{OPENSSL} req -new -key '#{certname}.key' -out '#{certname}.csr' -config #{SSL_CONF} -subj '/CN=#{cn}#{REQ}' -extensions ext.#{type}"
|
34
34
|
exe "#{OPENSSL} ca -in '#{certname}.csr' -out '#{certname}.crt' -config #{SSL_CONF} -extensions ext.#{type} -batch"
|
data/lib/version.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
::Version = '0.7.
|
1
|
+
::Version = '0.7.4'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ovpn-key
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vasily Korytov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-12-
|
11
|
+
date: 2018-12-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubyzip
|