ovpn-key 0.7.1 → 0.7.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/ovpn-key +5 -4
- 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: 9fde0a6063ccfbd4a7f51ee4d0749ce791999dda0c4d4b5254d21c4de821a1d7
|
4
|
+
data.tar.gz: 54d1af5174381b59453545900ecd56d90d8aef8f240c4bd5738393e03374cbeb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f979223351319b4b440c27ded450507a8d13f5a3092fdd7af26150b92cb81ea52911bb729589b0bb50f9c5fe6f22e84bed1f9f88964a88fe3958a6fa1d1e46ef
|
7
|
+
data.tar.gz: e5b87efe66c151a90fa3abf209c848c08615f22a6df090c07a3337bb4002fdcb903c5dd652234966b672b1994a13e6f4246af219722c017aa3d4ac8fbfcfc66f
|
data/bin/ovpn-key
CHANGED
@@ -20,7 +20,7 @@ OptionParser.new do |opts|
|
|
20
20
|
options[:generate_ca] = v
|
21
21
|
end
|
22
22
|
opts.on("--dh", "Generate a DH keyfile (dh.pem)") do |v|
|
23
|
-
# it's safe to
|
23
|
+
# it's safe to overwrite this file
|
24
24
|
options[:generate_dh] = v
|
25
25
|
end
|
26
26
|
opts.on("--server [name]", "Generate a server key (defaults to 'server')") do |v|
|
@@ -54,7 +54,7 @@ if options[:generate_client] and options[:generate_zip]
|
|
54
54
|
# I assume that user likely wants one of them and is confused with usage
|
55
55
|
abort "There can be only one: --client or --zip"
|
56
56
|
end
|
57
|
-
File.umask 0077
|
57
|
+
umask = File.umask 0077
|
58
58
|
|
59
59
|
if options[:init]
|
60
60
|
unless options[:init] == '.'
|
@@ -68,9 +68,9 @@ if options[:init]
|
|
68
68
|
puts "Created file: #{file}"
|
69
69
|
end
|
70
70
|
}
|
71
|
-
elsif !File.exist?
|
71
|
+
elsif !File.exist? APP_CONF
|
72
72
|
begin
|
73
|
-
rc = YAML.load_file(File.expand_path
|
73
|
+
rc = YAML.load_file(File.expand_path "~/.#{APP_CONF}")
|
74
74
|
rescue Errno::ENOENT
|
75
75
|
# no configuration file in home directory is not an error
|
76
76
|
end
|
@@ -118,6 +118,7 @@ if options[:generate_zip]
|
|
118
118
|
|
119
119
|
zip_file = File.join(File.expand_path(ZIP_DIR), "#{File.basename ovpn_file, '.ovpn'}.tblk.zip")
|
120
120
|
File.delete(zip_file) if File.exist?(zip_file)
|
121
|
+
File.umask umask
|
121
122
|
Zip::File.open(zip_file, Zip::File::CREATE) do |zip|
|
122
123
|
zip.get_output_stream(ovpn_file) {|f|
|
123
124
|
File.open(ovpn_file).each {|line| f.write line}
|
data/lib/version.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
::Version = '0.7.
|
1
|
+
::Version = '0.7.2'
|
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.2
|
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-
|
11
|
+
date: 2018-09-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubyzip
|