letsencrypt_webfaction 3.0.1 → 3.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 +1 -1
- data/.travis.yml +0 -1
- data/CHANGELOG.md +12 -0
- data/Gemfile +1 -0
- data/README.md +8 -2
- data/docs/upgrading.md +1 -1
- data/letsencrypt_webfaction.gemspec +1 -1
- data/lib/letsencrypt_webfaction.rb +1 -1
- data/lib/letsencrypt_webfaction/application.rb +2 -0
- data/lib/letsencrypt_webfaction/application/init.rb +1 -0
- data/lib/letsencrypt_webfaction/application/run.rb +43 -9
- data/lib/letsencrypt_webfaction/application/version.rb +11 -0
- data/templates/letsencrypt_webfaction.toml +1 -1
- metadata +4 -3
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1e3b0f98bf6ed31d880f2bb5f71ebde9eee5f4bfc4ea953321ec1abb94521078
|
4
|
+
data.tar.gz: d0528f7489385550750003ca33f49bd8c86ce6298d7ccaa74f269050ad8e7cc9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9ee90ba6301aec0e5a0da927864a1023ef3fe8f9142f62314fd3c3430d7513f46a92e61f8ec99c85566384ec417ab3dd22ecff1482177f8b0602d1545749d12c
|
7
|
+
data.tar.gz: a40f0e3351ec79fd7eb65d1abdbc4e7e54a9bef850f316843fdf1d938f5fd5eba895546f576324bac42b6ece2917f12c8511383e20e01ef5f885abd366862ec1
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/.rubocop.yml
CHANGED
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,15 @@
|
|
1
|
+
Unreleased
|
2
|
+
|
3
|
+
* Your change here!
|
4
|
+
|
5
|
+
v3.1.0
|
6
|
+
|
7
|
+
* Set config file permissions to 600 on creation.
|
8
|
+
* Output version number with `--version` flag. Fixes [#139](https://github.com/will-in-wi/letsencrypt-webfaction/issues/139)
|
9
|
+
* Drop support for Ruby 2.1. It's unsupported upstream and third party libraries are dropping support. Feel free to file a ticket if you need this for some reason.
|
10
|
+
* Restore ability to define custom configuration files paths. Fixes [#136](https://github.com/will-in-wi/letsencrypt-webfaction/issues/136)
|
11
|
+
* [#144](https://github.com/will-in-wi/letsencrypt-webfaction/pull/144) - Tiny fix so that "default" does what it says on the tin. Thanks to @nootrope for raising this UX issue!
|
12
|
+
|
1
13
|
v3.0.1
|
2
14
|
|
3
15
|
* Improves messaging when requesting validation fails
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -67,9 +67,15 @@ After saving `~/.bash_profile`, run the command `source $HOME/.bash_profile` to
|
|
67
67
|
|
68
68
|
Run `letsencrypt_webfaction init` to generate a registration cert and the config file. Open the config file `nano -w ~/letsencrypt_webfaction.toml` and edit to reflect your configuration.
|
69
69
|
|
70
|
-
Now, you are ready to run `letsencrypt_webfaction run` from your SSH session to get certificates.
|
70
|
+
Now, you are ready to run `letsencrypt_webfaction run` from your SSH session to get certificates. Note that by default the config file `letsencrypt_webfaction.toml` is pointed at the LetsEncrypt staging endpoint (the line that says: `endpoint = "https://acme-staging.api.letsencrypt.org/"`); meaning you will only get "test" certificates installed while using the stage endpoint. To issue live certificates you will need to comment out default line, and uncomment the production endpoint line (the line that says: `endpoint = "https://acme-v01.api.letsencrypt.org/" # Production`).
|
71
71
|
|
72
|
-
|
72
|
+
When you have tested with staging, you can remove the certificate from WebFaction control panel (make sure no webapps are using it first) and re-run with the production endpoint.
|
73
|
+
|
74
|
+
After you run this command, you will see new certificates in the webfaction admin panel (under `Domains / Websites`, then `SSL certificates`), with the names you have provided (ie, the `name = ` variable in the `letsencrypt_webfaction.toml` config file). You need to change your application to point to this certificate after the certificate has been issued. This change will take some time for Webfaction to deploy before you will be able to successfully connect with the `https` version of your site. After a short period, Webfaction will copy your generated certficates into the directory `/home/yourusername/certificates/`. Future runs of this command will update the existing certificate entry and not require a change in the admin panel.
|
75
|
+
|
76
|
+
Once you can connect to your site via `https` you might have broken images and CSS files. Such "[mixed content](https://support.cloudflare.com/hc/en-us/articles/200170476-How-do-I-fix-the-SSL-Mixed-Content-Error-Message-)" will need to be fixed: make sure any references to embeded content from your site uses `https` rather than `http`.
|
77
|
+
|
78
|
+
Finally, if you would like the `http` site to redirect to your `https`, follow the [Webfaction guidance](https://docs.webfaction.com/software/static.html#redirecting-from-http-to-https).
|
73
79
|
|
74
80
|
## Usage
|
75
81
|
|
data/docs/upgrading.md
CHANGED
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
|
|
25
25
|
spec.cert_chain = ['certs/will_in_wi.pem']
|
26
26
|
spec.signing_key = File.expand_path('~/.ssh/gem-private_key.pem') if $PROGRAM_NAME.end_with?('gem')
|
27
27
|
|
28
|
-
spec.required_ruby_version = '>= 2.
|
28
|
+
spec.required_ruby_version = '>= 2.2.0'
|
29
29
|
|
30
30
|
spec.add_runtime_dependency 'acme-client', '~> 1.0'
|
31
31
|
spec.add_runtime_dependency 'toml-rb', '~> 1.1'
|
@@ -1,11 +1,13 @@
|
|
1
1
|
require 'letsencrypt_webfaction/application/init'
|
2
2
|
require 'letsencrypt_webfaction/application/run'
|
3
|
+
require 'letsencrypt_webfaction/application/version'
|
3
4
|
|
4
5
|
module LetsencryptWebfaction
|
5
6
|
module Application
|
6
7
|
SUPPORTED_COMMANDS = {
|
7
8
|
'init' => LetsencryptWebfaction::Application::Init,
|
8
9
|
'run' => LetsencryptWebfaction::Application::Run,
|
10
|
+
'--version' => LetsencryptWebfaction::Application::Version,
|
9
11
|
}.freeze
|
10
12
|
|
11
13
|
V2_COMMANDS = %i[key_size endpoint domains public letsencrypt_account_email api_url username password servername cert_name].freeze
|
@@ -6,6 +6,7 @@ require 'letsencrypt_webfaction/logger_output'
|
|
6
6
|
|
7
7
|
require 'acme-client'
|
8
8
|
require 'optparse'
|
9
|
+
require 'pathname'
|
9
10
|
|
10
11
|
module LetsencryptWebfaction
|
11
12
|
module Application
|
@@ -13,15 +14,11 @@ module LetsencryptWebfaction
|
|
13
14
|
RENEWAL_DELTA = 14 # days
|
14
15
|
|
15
16
|
def initialize(args)
|
16
|
-
|
17
|
+
@config_path = DefaultConfigPath.new
|
18
|
+
parse_options(args)
|
19
|
+
@config_path.validate!
|
17
20
|
|
18
|
-
|
19
|
-
unless Options.default_options_path.exist?
|
20
|
-
$stderr.puts 'The configuration file is missing.'
|
21
|
-
$stderr.puts 'You may need to run `letsencrypt_webfaction init`'
|
22
|
-
raise AppExitError, 'config missing'
|
23
|
-
end
|
24
|
-
@options = LetsencryptWebfaction::Options.from_toml(Options.default_options_path)
|
21
|
+
@options = LetsencryptWebfaction::Options.from_toml(@config_path.path)
|
25
22
|
end
|
26
23
|
|
27
24
|
def run!
|
@@ -40,13 +37,50 @@ module LetsencryptWebfaction
|
|
40
37
|
|
41
38
|
private
|
42
39
|
|
43
|
-
|
40
|
+
class DefaultConfigPath
|
41
|
+
attr_reader :path
|
42
|
+
|
43
|
+
def initialize
|
44
|
+
@path = Options.default_options_path
|
45
|
+
end
|
46
|
+
|
47
|
+
def validate!
|
48
|
+
return true if @path.exist?
|
49
|
+
print_error
|
50
|
+
raise AppExitError, 'config missing'
|
51
|
+
end
|
52
|
+
|
53
|
+
private
|
54
|
+
|
55
|
+
def print_error
|
56
|
+
$stderr.puts 'The configuration file is missing.'
|
57
|
+
$stderr.puts 'You may need to run `letsencrypt_webfaction init`'
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
class CustomConfigPath < DefaultConfigPath
|
62
|
+
def initialize(path)
|
63
|
+
@path = Pathname.new(path)
|
64
|
+
end
|
65
|
+
|
66
|
+
private
|
67
|
+
|
68
|
+
def print_error
|
69
|
+
$stderr.puts 'The given configuration file does not exist'
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
def parse_options(args)
|
44
74
|
OptionParser.new do |opts|
|
45
75
|
opts.banner = 'Usage: letsencrypt_webfaction run [options]'
|
46
76
|
|
47
77
|
opts.on('--quiet', 'Run with minimal output (useful for cron)') do |q|
|
48
78
|
Out.quiet = q
|
49
79
|
end
|
80
|
+
|
81
|
+
opts.on('--config=CONFIG', 'Alternative configuration path') do |c|
|
82
|
+
@config_path = CustomConfigPath.new(c)
|
83
|
+
end
|
50
84
|
end.parse!(args)
|
51
85
|
end
|
52
86
|
|
@@ -40,7 +40,7 @@ public = "~/webapps/myapp/public_html"
|
|
40
40
|
# the cert common name with the dots replaced by underscores. (Optional)
|
41
41
|
# NOTE: If you change this and do not also rename it in the webfaction admin,
|
42
42
|
# a new certificate will be issued.
|
43
|
-
name = "mycertname1"
|
43
|
+
#name = "mycertname1"
|
44
44
|
|
45
45
|
# The size of the private key. 4096 is the default. You can use 2048.
|
46
46
|
#key_size = 4096
|
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: 3.0
|
4
|
+
version: 3.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- William Johnston
|
@@ -30,7 +30,7 @@ cert_chain:
|
|
30
30
|
ilYPju4QWNSvpNVhV+T7JUvAHXva3Rayfp8SKRpvX8ZpRCjvpYfgbmNxXO2ST1qb
|
31
31
|
KBba/yJfCMh+B65HfRUXBQRRDtJ2Vu8i0WmRUKenahAnpkkeVmqhWwY=
|
32
32
|
-----END CERTIFICATE-----
|
33
|
-
date: 2018-
|
33
|
+
date: 2018-08-04 00:00:00.000000000 Z
|
34
34
|
dependencies:
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: acme-client
|
@@ -95,6 +95,7 @@ files:
|
|
95
95
|
- lib/letsencrypt_webfaction/application.rb
|
96
96
|
- lib/letsencrypt_webfaction/application/init.rb
|
97
97
|
- lib/letsencrypt_webfaction/application/run.rb
|
98
|
+
- lib/letsencrypt_webfaction/application/version.rb
|
98
99
|
- lib/letsencrypt_webfaction/certificate_installer.rb
|
99
100
|
- lib/letsencrypt_webfaction/certificate_issuer.rb
|
100
101
|
- lib/letsencrypt_webfaction/domain_validator.rb
|
@@ -116,7 +117,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
116
117
|
requirements:
|
117
118
|
- - ">="
|
118
119
|
- !ruby/object:Gem::Version
|
119
|
-
version: 2.
|
120
|
+
version: 2.2.0
|
120
121
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
121
122
|
requirements:
|
122
123
|
- - ">="
|
metadata.gz.sig
CHANGED
Binary file
|