letsencrypt_webfaction 2.0.1 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/.rubocop.yml +5 -5
- data/CHANGELOG.md +4 -0
- data/README.md +3 -1
- data/config.defaults.yml +1 -1
- data/letsencrypt_webfaction.gemspec +0 -2
- data/lib/letsencrypt_webfaction.rb +1 -1
- data/lib/letsencrypt_webfaction/args_parser.rb +1 -1
- data/lib/letsencrypt_webfaction/domain_validator.rb +8 -6
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 42e083a1af389265e34c4cf101642a5f8cd6c540
|
4
|
+
data.tar.gz: 49284cd35d75161182e0cd3339425151a7c902f6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 16454306b99d75d1ebb393e21945d2778ff771374e83955509b1852c5dca09a5a338256509c98b191b96e0bd514b1a2fa3ff2ac5900095e603f8e39e043fa7e8
|
7
|
+
data.tar.gz: 93872050bf6e81c6948fac2fc762757b9331fdc2db061d117162cc1c360971087441bf37b19988eb3ea1f8b4f007a7a2cec27f9a432e278d3214dd33b2bf7dbd
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/.rubocop.yml
CHANGED
@@ -18,7 +18,7 @@ Metrics/BlockLength:
|
|
18
18
|
- 'spec/**/*'
|
19
19
|
|
20
20
|
# I'm not pulling in a library, or forcing Ruby 2.3+
|
21
|
-
|
21
|
+
Layout/IndentHeredoc:
|
22
22
|
Enabled: false
|
23
23
|
|
24
24
|
# Extra cops:
|
@@ -28,13 +28,13 @@ Style/AutoResourceCleanup:
|
|
28
28
|
Enabled: true
|
29
29
|
|
30
30
|
# Standardize multi-line params.
|
31
|
-
|
31
|
+
Layout/FirstArrayElementLineBreak:
|
32
32
|
Enabled: true
|
33
|
-
|
33
|
+
Layout/FirstHashElementLineBreak:
|
34
34
|
Enabled: true
|
35
|
-
|
35
|
+
Layout/FirstMethodArgumentLineBreak:
|
36
36
|
Enabled: true
|
37
|
-
|
37
|
+
Layout/FirstMethodParameterLineBreak:
|
38
38
|
Enabled: true
|
39
39
|
|
40
40
|
# Encourage using public_send to prove that you actually want to bypass visibility.
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
v2.1.0
|
2
|
+
|
3
|
+
* Allow multiple public directories to be used. The authorization responses will be duplicated across all of them, allowing a single cert to serve multiple applications. Fixes #96 (thanks @lsemprini for the suggestion!)
|
4
|
+
|
1
5
|
v2.0.1
|
2
6
|
|
3
7
|
* Check WebFaction credentials before issuing cert.
|
data/README.md
CHANGED
@@ -116,6 +116,8 @@ The basic parameters are as follows:
|
|
116
116
|
|
117
117
|
In some cases (such as with some Node.js or Python applications), you may need to create this folder. See [here](https://github.com/will-in-wi/letsencrypt-webfaction/issues/24) for an example of this workaround.
|
118
118
|
|
119
|
+
You can specify multiple public directories in this option, separated by commas. This is useful when you want to create a single certificate that serves multiple domains that happen to be backed by multiple different public directories. During Let's Encrypt's http01 challenge-response, letsencrypt-webfaction will copy all the challenge files for all domains into all the public directories. Let's Encrypt supports up to 100 domains per certificate, and they discuss the pros and cons of the multiple-domain technique here: https://letsencrypt.org/docs/integration-guide/
|
120
|
+
|
119
121
|
* `--username`
|
120
122
|
|
121
123
|
The username you use to log into the Webfaction control panel. Needed along with the password to upload your cert to their API.
|
@@ -143,7 +145,7 @@ To test certificate issuance, consider using the [LetsEncrypt staging server](ht
|
|
143
145
|
|
144
146
|
A test command could thus be something like the following:
|
145
147
|
|
146
|
-
$ letsencrypt_webfaction --letsencrypt_account_email you@youremail.com --domains yourdomain.com,www.yourdomain.com --public ~/webapps/yourapp/wordpress/ --endpoint https://acme-staging.api.letsencrypt.org/
|
148
|
+
$ letsencrypt_webfaction --letsencrypt_account_email you@youremail.com --domains yourdomain.com,www.yourdomain.com --public ~/webapps/yourapp/wordpress/ --username <webfaction-username> --password <webfaction-password> --endpoint https://acme-staging.api.letsencrypt.org/
|
147
149
|
|
148
150
|
|
149
151
|
### Operation
|
data/config.defaults.yml
CHANGED
@@ -2,7 +2,7 @@ key_size: 4096
|
|
2
2
|
# We need an ACME server to talk to, see github.com/letsencrypt/boulder
|
3
3
|
endpoint: 'https://acme-v01.api.letsencrypt.org/'
|
4
4
|
domains: []
|
5
|
-
public:
|
5
|
+
public: []
|
6
6
|
output_dir: '~/le_certs/'
|
7
7
|
letsencrypt_account_email: ''
|
8
8
|
api_url: 'https://api.webfaction.com/'
|
@@ -18,7 +18,7 @@ module LetsencryptWebfaction
|
|
18
18
|
Field::IntegerField.new(:key_size, 'Size of private key (e.g. 4096)', [DefinedValuesValidator.new(VALID_KEY_SIZES)]),
|
19
19
|
Field.new(:endpoint, 'ACME endpoint (e.g. https://acme-v01.api.letsencrypt.org/)', [StringValidator.new]),
|
20
20
|
Field::ListField.new(:domains, 'Comma separated list of domains. The first one will be the common name.', [ArrayValidator.new]),
|
21
|
-
Field.new(:public, '
|
21
|
+
Field::ListField.new(:public, 'Locations on the filesystem served by the desired sites (e.g. "~/webapps/myapp/public_html,~/webapps/myapp1/public_html")', [ArrayValidator.new]),
|
22
22
|
Field.new(:output_dir, 'Location on the filesystem to which the certs will be saved.', [StringValidator.new]),
|
23
23
|
Field.new(:letsencrypt_account_email, 'The email address associated with your account.', [StringValidator.new]),
|
24
24
|
Field.new(:api_url, 'The URL to the Webfaction API.', [StringValidator.new]),
|
@@ -2,10 +2,10 @@ require 'fileutils'
|
|
2
2
|
|
3
3
|
module LetsencryptWebfaction
|
4
4
|
class DomainValidator
|
5
|
-
def initialize(domains, client,
|
5
|
+
def initialize(domains, client, public_dirs)
|
6
6
|
@domains = domains
|
7
7
|
@client = client
|
8
|
-
@
|
8
|
+
@public_dirs = public_dirs.map { |dir| File.expand_path(dir) }
|
9
9
|
end
|
10
10
|
|
11
11
|
def validate!
|
@@ -38,11 +38,13 @@ module LetsencryptWebfaction
|
|
38
38
|
|
39
39
|
def write_files!
|
40
40
|
challenges.each do |challenge|
|
41
|
-
|
42
|
-
|
41
|
+
@public_dirs.each do |public_dir|
|
42
|
+
# Save the file. We'll create a public directory to serve it from, and we'll creating the challenge directory.
|
43
|
+
FileUtils.mkdir_p(File.join(public_dir, File.dirname(challenge.filename)))
|
43
44
|
|
44
|
-
|
45
|
-
|
45
|
+
# Then writing the file
|
46
|
+
File.write(File.join(public_dir, challenge.filename), challenge.file_content)
|
47
|
+
end
|
46
48
|
end
|
47
49
|
end
|
48
50
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: letsencrypt_webfaction
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- William Johnston
|
@@ -30,7 +30,7 @@ cert_chain:
|
|
30
30
|
Bgn1/q+P8H+/qkt6w5h8UzWYyXRlEjWvSJEjkNU0C05GQ0w0GFiqd62CgQty5xpa
|
31
31
|
7M3NhWEjOZHE18Ro4Vy9CQCJxUasYC4JUMMQ9tQBW+vYIgHfBn0+xlw=
|
32
32
|
-----END CERTIFICATE-----
|
33
|
-
date: 2017-
|
33
|
+
date: 2017-09-28 00:00:00.000000000 Z
|
34
34
|
dependencies:
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: acme-client
|
metadata.gz.sig
CHANGED
Binary file
|