letsencrypt-cli 0.1.4 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +6 -4
- data/lib/letsencrypt/cli/acme_wrapper.rb +2 -1
- data/lib/letsencrypt/cli/app.rb +2 -2
- data/lib/letsencrypt/cli/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3f7a750f6deb043455b510a86acc9947e8e92bc7
|
4
|
+
data.tar.gz: bdd835c1eb3bc356806fb8a475d4731b1ea42656
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 614b040125f605d32eeb0dd2856afe570c05c794d73f8d8d41b52ad82d3e566244ba8b543f3b9e34d1e09a99720d43b9a83e23c701800be48ebe34d78f252f02
|
7
|
+
data.tar.gz: 4d4edba4bd600d393da8353c9270207006d50fb0bc7e1e45fe139fad4be25ba431a8aa51a5a11e257345417567ca590c3491c9aa7b79f39adf46974c32654b4f
|
data/README.md
CHANGED
@@ -19,7 +19,7 @@ ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-linux]
|
|
19
19
|
$ gem install letsencrypt-cli
|
20
20
|
|
21
21
|
$ letsencrypt-cli --version
|
22
|
-
0.
|
22
|
+
0.2.0
|
23
23
|
```
|
24
24
|
|
25
25
|
### Troubleshooting Ruby version
|
@@ -54,7 +54,7 @@ Another way, e.g. on Ubuntu 14.04 might be to use the [Brightbox ppa](https://ww
|
|
54
54
|
|
55
55
|
## Usage
|
56
56
|
|
57
|
-
Specify ``-t`` to use Letsencrypt test server. Without it, all requests are called against the production server, that might have
|
57
|
+
Specify ``-t`` to use Letsencrypt test server. Without it, all requests are called against the production server, that might have some more strict rate limiting. If you are just toying around, add the -t flag.
|
58
58
|
|
59
59
|
```bash
|
60
60
|
# show all commands
|
@@ -82,8 +82,10 @@ letsencrypt-cli help cert
|
|
82
82
|
letsencrypt-cli cert -t example.com www.example.com somdir.example.com
|
83
83
|
# will create key.pem fullchain.pem chain.pem and cert.pem in current directory
|
84
84
|
|
85
|
-
# checks validation date of given certificate.
|
86
|
-
#
|
85
|
+
# checks validation date of given certificate.
|
86
|
+
# Exists non-zero if:
|
87
|
+
# * not exists (exit 1)
|
88
|
+
# * will expire in more than 30 days (exit code 2)
|
87
89
|
letsencrypt-cli check --days-valid 30 cert.pem
|
88
90
|
```
|
89
91
|
|
@@ -114,7 +114,7 @@ class AcmeWrapper
|
|
114
114
|
if renew_on > Date.today
|
115
115
|
log "Certificate '#{@options[:certificate_path]}' still valid till #{cert.not_after.to_date}.", :warn
|
116
116
|
log "Won't renew until #{renew_on} (#{@options[:days_valid]} days before)", :warn
|
117
|
-
exit
|
117
|
+
exit 2
|
118
118
|
end
|
119
119
|
end
|
120
120
|
end
|
@@ -139,6 +139,7 @@ class AcmeWrapper
|
|
139
139
|
log "creating new private key to #{file_path}..."
|
140
140
|
private_key = OpenSSL::PKey::RSA.new(length)
|
141
141
|
File.write(file_path, private_key.to_s)
|
142
|
+
File.chmod(0400, file_path)
|
142
143
|
private_key
|
143
144
|
end
|
144
145
|
end
|
data/lib/letsencrypt/cli/app.rb
CHANGED
@@ -71,7 +71,7 @@ module Letsencrypt
|
|
71
71
|
end
|
72
72
|
end
|
73
73
|
|
74
|
-
desc "manage DOMAINS", "meta command that will: check if cert already exists / still valid (exits zero if nothing todo) + authorize given domains + issue certificate for given domains"
|
74
|
+
desc "manage DOMAINS", "meta command that will: check if cert already exists / still valid (exits zero if nothing todo, exits 2 if certificate is still valid) + authorize given domains + issue certificate for given domains"
|
75
75
|
method_option :key_length, desc: "Length of private key", default: 2048, type: :numeric
|
76
76
|
method_option :days_valid, desc: "If the --certificate-path already exists, only create new stuff, if that certificate isn't valid for less than the given number of days", default: 30, type: :numeric
|
77
77
|
method_option :webroot_path, desc: "Path to mapped .well-known/acme-challenge folder (no subdirs will be created)", aliases: '-w', required: true
|
@@ -86,7 +86,7 @@ module Letsencrypt
|
|
86
86
|
:chain_path => File.join(key_dir, 'chain.pem'),
|
87
87
|
)
|
88
88
|
if wrapper.check_certificate(@options[:certificate_path])
|
89
|
-
exit
|
89
|
+
exit 2
|
90
90
|
end
|
91
91
|
authorize(*domains)
|
92
92
|
cert(*domains)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: letsencrypt-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stefan Wienert
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-12-
|
11
|
+
date: 2015-12-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: acme-client
|