ovpnmcgen.rb 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog +7 -2
- data/README.md +11 -0
- data/features/gen_configfile.feature +29 -0
- data/lib/ovpnmcgen/config.rb +0 -2
- data/lib/ovpnmcgen/version.rb +1 -1
- data/lib/ovpnmcgen.rb +4 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6ef44c3fa31e42f64bd986012e60ee32cb6ebb2f
|
4
|
+
data.tar.gz: 66afa4c68f2d00f6d2b502402ade0397cf5981d8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3f4ba7bb60994c9cd443617b0ec24d5e8ebef7b53dd3cf28aae74475f12ca12c01dad9d2954bd199868272cabadc1170b906ef26307625b613f08090e64ccf09
|
7
|
+
data.tar.gz: 3a3f40a2d17f28f25683e37d51a15c732937768b5d8a540c44c996740d445b44ae66b0a98c72d2893fc59508706451d50e5e70566196f244fc8eec57b12ed7dd
|
data/ChangeLog
CHANGED
@@ -1,6 +1,11 @@
|
|
1
|
-
= 0.4.
|
1
|
+
= 0.4.1 / 2014-05-07
|
2
|
+
* Bugfix: SSIDs specified as a string in configfile now correctly output
|
3
|
+
as arrays. (#a9e638)
|
4
|
+
|
5
|
+
= 0.4.0 / 2014-05-07
|
2
6
|
* VoD rules in `--[un]trusted-ssids` to also use `InterfaceTypeMatch`.
|
3
|
-
* Added support for configuration persistance, via ENV or
|
7
|
+
* Added support for configuration persistance, via ENV or
|
8
|
+
~/.ovpnmcgen.rb.yml or `--config` flag.
|
4
9
|
|
5
10
|
= 0.3.0 / 2014-05-04
|
6
11
|
* Documentation updates.
|
data/README.md
CHANGED
@@ -70,6 +70,17 @@ Option flags can be set using environment variables or placed into a YAML format
|
|
70
70
|
|
71
71
|
Note: Only for YAML configuration files and environment variables, flags with hyphens (-) are replaced with underscores (_), i.e. `--trusted-ssids safe` should be `trusted_ssids: safe`.
|
72
72
|
|
73
|
+
Sample:
|
74
|
+
|
75
|
+
```
|
76
|
+
untrusted_ssids: [dangerous1, dangerous2]
|
77
|
+
trusted_ssids: [trust]
|
78
|
+
host: vpn.example.com
|
79
|
+
cafile: /etc/openvpn/ca.crt
|
80
|
+
tafile: /etc/openvpn/ta.key
|
81
|
+
url_probe: https://vpn.example.com/canVPN.php
|
82
|
+
```
|
83
|
+
|
73
84
|
### Security Levels
|
74
85
|
|
75
86
|
There are three different security levels to choose from, 'paranoid', 'high' (default), and 'medium'. The algorithm illustrated above is for 'high'.
|
@@ -35,6 +35,35 @@ Feature: Generate Functionality with Configuration File
|
|
35
35
|
Then the output should contain "error: "
|
36
36
|
And the output should not contain "error: Host"
|
37
37
|
|
38
|
+
Scenario: Single SSIDs specified should appear as an array in the output.
|
39
|
+
Given a file named ".ovpnmcgen.rb.yml" with:
|
40
|
+
"""
|
41
|
+
trusted_ssids: trust
|
42
|
+
"""
|
43
|
+
When I run `ovpnmcgen.rb g --host aruba.cucumber.org --cafile ca.crt --p12file p12file.p12 cucumber aruba`
|
44
|
+
Then the output should match:
|
45
|
+
"""
|
46
|
+
<key>SSIDMatch</key>
|
47
|
+
\s*<array>
|
48
|
+
\s*<string>trust</string>
|
49
|
+
\s*</array>
|
50
|
+
"""
|
51
|
+
|
52
|
+
Scenario: Multiple SSIDs specified should appear as an array in the output.
|
53
|
+
Given a file named ".ovpnmcgen.rb.yml" with:
|
54
|
+
"""
|
55
|
+
trusted_ssids: [trust1, trust2]
|
56
|
+
"""
|
57
|
+
When I run `ovpnmcgen.rb g --host aruba.cucumber.org --cafile ca.crt --p12file p12file.p12 cucumber aruba`
|
58
|
+
Then the output should match:
|
59
|
+
"""
|
60
|
+
<key>SSIDMatch</key>
|
61
|
+
\s*<array>
|
62
|
+
\s*<string>trust1</string>
|
63
|
+
\s*<string>trust2</string>
|
64
|
+
\s*</array>
|
65
|
+
"""
|
66
|
+
|
38
67
|
Scenario: Flags should override configuration file options.
|
39
68
|
Given a file named ".ovpnmcgen.rb.yml" with:
|
40
69
|
"""
|
data/lib/ovpnmcgen/config.rb
CHANGED
data/lib/ovpnmcgen/version.rb
CHANGED
data/lib/ovpnmcgen.rb
CHANGED
@@ -18,6 +18,10 @@ module Ovpnmcgen
|
|
18
18
|
trusted_ssids = inputs[:trusted_ssids] || false
|
19
19
|
untrusted_ssids = inputs[:untrusted_ssids] || false
|
20
20
|
|
21
|
+
# Ensure [un]trusted_ssids are Arrays.
|
22
|
+
trusted_ssids = Array(trusted_ssids) if trusted_ssids
|
23
|
+
untrusted_ssids = Array(untrusted_ssids) if untrusted_ssids
|
24
|
+
|
21
25
|
begin
|
22
26
|
ca_cert = File.readlines(inputs[:cafile]).map { |x| x.chomp }.join('\n')
|
23
27
|
rescue Errno::ENOENT
|