-
-
Notifications
You must be signed in to change notification settings - Fork 719
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from lukas2511/master
Update to latest from fork
- Loading branch information
Showing
17 changed files
with
592 additions
and
178 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
private_key.pem | ||
private_key.json | ||
domains.txt | ||
config.sh | ||
config | ||
hook.sh | ||
certs/* | ||
archive/* | ||
accounts/* | ||
.acme-challenges/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Change Log | ||
This file contains a log of major changes in letsencrypt.sh | ||
|
||
## [x.x.x] - xxxx-xx-xx | ||
## Changed | ||
- Config is now named `config` instead of `config.sh`! | ||
- Location of domains.txt is now configurable via DOMAINS_TXT config variable | ||
- Location of certs directory is now configurable via CERTDIR config variable | ||
- signcsr command now also outputs chain certificate | ||
- Location of account-key(s) changed | ||
|
||
## Added | ||
- Added option to add CSR-flag indicating OCSP stapling to be mandatory | ||
- Initial support for configuration on per-certificate base | ||
- Support for per-CA account keys and custom config for output cert directory, license, etc. | ||
|
||
## Fixed | ||
- letsencrypt.sh no longer stores account keys from invalid registrations | ||
|
||
## [0.2.0] - 2016-05-22 | ||
### Changed | ||
- PRIVATE_KEY config parameter has been renamed to ACCOUNT_KEY to avoid confusion with certificate keys | ||
- deploy_cert hook now also has the certificates timestamp as standalone parameter | ||
- Temporary files are now identifiable (template: letsencrypt.sh-XXXXXX) | ||
- Private keys are now regenerated by default | ||
|
||
### Added | ||
- Added documentation to repository | ||
|
||
### Fixed | ||
- Fixed bug with uppercase names in domains.txt (script now converts everything to lowercase) | ||
- mktemp no longer uses the deprecated `-t` parameter. | ||
- Compatibility with "pretty" json | ||
|
||
## [0.1.0] - 2016-03-25 | ||
### Changed | ||
- This is the first numbered version of letsencrypt.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
### dns-01 challenge | ||
|
||
This script also supports the new `dns-01`-type verification. This type of verification requires you to be able to create a specific `TXT` DNS record for each hostname included in the certificate. | ||
|
||
You need a hook script that deploys the challenge to your DNS server! | ||
|
||
The hook script (indicated in the config file or the --hook/-k command line argument) gets four arguments: an operation name (clean_challenge, deploy_challenge, or deploy_cert) and some operands for that. For deploy_challenge $2 is the domain name for which the certificate is required, $3 is a "challenge token" (which is not needed for dns-01), and $4 is a token which needs to be inserted in a TXT record for the domain. | ||
|
||
Typically, you will need to split the subdomain name in two, the subdomain name and the domain name separately. For example, for "my.example.com", you'll need "my" and "example.com" separately. You then have to prefix "_acme-challenge." before the subdomain name, as in "_acme-challenge.my" and set a TXT record for that on the domain (e.g. "example.com") which has the value supplied in $4 | ||
|
||
``` | ||
_acme-challenge IN TXT $4 | ||
_acme-challenge.my IN TXT $4 | ||
``` | ||
|
||
That could be done manually (as most providers don't have a DNS API), by having your hook script echo $1, $2 and $4 and then wait (read -s -r -e < /dev/tty) - give it a little time to get into their DNS system. Usually providers give you a boxes to put "_acme-challenge.my" and the token value in, and a dropdown to choose the record type, TXT. | ||
|
||
Or when you do have a DNS API, pass the details accordingly to achieve the same thing. | ||
|
||
You can delete the TXT record when called with operation clean_challenge, when $2 is also the domain name. | ||
|
||
Here are some examples: [Examples for DNS-01 hooks](https://github.com/lukas2511/letsencrypt.sh/wiki/Examples-for-DNS-01-hooks) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
### domains.txt | ||
|
||
letsencrypt.sh uses the file `domains.txt` as configuration for which certificates should be requested. | ||
|
||
The file should have the following format: | ||
|
||
```text | ||
example.com www.example.com | ||
example.net www.example.net wiki.example.net | ||
``` | ||
|
||
This states that there should be two certificates `example.com` and `example.net`, | ||
with the other domains in the corresponding line being their alternative names. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
### Elliptic Curve Cryptography (ECC) | ||
|
||
This script also supports certificates with Elliptic Curve public keys! | ||
Be aware that at the moment this is not available on the production servers from letsencrypt. | ||
Please read https://community.letsencrypt.org/t/ecdsa-testing-on-staging/8809/ for the current state of ECC support. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# HOOK_CHAIN | ||
|
||
If you want to deploy (and clean) all challenges for a single certificate in one hook call you can use `HOOK_CHAIN=yes` in your config. | ||
|
||
Calls to your hook script change in a way that instead of having only X parameters on deploy_challenge and clean_challenge it will have Y*X parameters, | ||
where Y is the number of domains in your cert, and you'll have to iterate over a set of X parameters at a time in your hook script. | ||
|
||
See below for an example on how the calls change: | ||
|
||
### HOOK_CHAIN="no" (default behaviour) | ||
``` | ||
# INFO: Using main config file /etc/letsencrypt.sh/config | ||
Processing lukas.im with alternative names: www.lukas.im | ||
+ Checking domain name(s) of existing cert... unchanged. | ||
+ Checking expire date of existing cert... | ||
+ Valid till Jul 7 20:54:00 2016 GMT (Longer than 30 days). Ignoring because renew was forced! | ||
+ Signing domains... | ||
+ Generating private key... | ||
+ Generating signing request... | ||
+ Requesting challenge for lukas.im... | ||
+ Requesting challenge for www.lukas.im... | ||
HOOK: deploy_challenge lukas.im blablabla blablabla.supersecure | ||
+ Responding to challenge for lukas.im... | ||
HOOK: clean_challenge lukas.im blablabla blablabla.supersecure | ||
+ Challenge is valid! | ||
HOOK: deploy_challenge www.lukas.im blublublu blublublu.supersecure | ||
+ Responding to challenge for www.lukas.im... | ||
HOOK: clean_challenge www.lukas.im blublublu blublublu.supersecure | ||
+ Challenge is valid! | ||
+ Requesting certificate... | ||
+ Checking certificate... | ||
+ Done! | ||
+ Creating fullchain.pem... | ||
HOOK: deploy_cert lukas.im /etc/letsencrypt.sh/certs/lukas.im/privkey.pem /etc/letsencrypt.sh/certs/lukas.im/cert.pem /etc/letsencrypt.sh/certs/lukas.im/fullchain.pem /etc/letsencrypt.sh/certs/lukas.im/chain.pem 1460152442 | ||
+ Done! | ||
``` | ||
|
||
### HOOK_CHAIN="yes" | ||
``` | ||
# INFO: Using main config file /etc/letsencrypt.sh/config | ||
Processing lukas.im with alternative names: www.lukas.im | ||
+ Checking domain name(s) of existing cert... unchanged. | ||
+ Checking expire date of existing cert... | ||
+ Valid till Jul 7 20:52:00 2016 GMT (Longer than 30 days). Ignoring because renew was forced! | ||
+ Signing domains... | ||
+ Generating private key... | ||
+ Generating signing request... | ||
+ Requesting challenge for lukas.im... | ||
+ Requesting challenge for www.lukas.im... | ||
HOOK: deploy_challenge lukas.im blablabla blablabla.supersecure www.lukas.im blublublu blublublu.supersecure | ||
+ Responding to challenge for lukas.im... | ||
+ Challenge is valid! | ||
+ Responding to challenge for www.lukas.im... | ||
+ Challenge is valid! | ||
HOOK: clean_challenge lukas.im blablabla blablabla.supersecure www.lukas.im blublublu blublublu.supersecure | ||
+ Requesting certificate... | ||
+ Checking certificate... | ||
+ Done! | ||
+ Creating fullchain.pem... | ||
HOOK: deploy_cert lukas.im /etc/letsencrypt.sh/certs/lukas.im/privkey.pem /etc/letsencrypt.sh/certs/lukas.im/cert.pem /etc/letsencrypt.sh/certs/lukas.im/fullchain.pem /etc/letsencrypt.sh/certs/lukas.im/chain.pem 1460152408 | ||
+ Done! | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Import | ||
|
||
If you want to import existing keys from the official letsencrypt client have a look at [Import from official letsencrypt client](https://github.com/lukas2511/letsencrypt.sh/wiki/Import-from-official-letsencrypt-client). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Config on per-certificate base | ||
|
||
letsencrypt.sh allows a few configuration variables to be set on a per-certificate base. | ||
|
||
To use this feature create a `config` file in the certificates output directory (e.g. `certs/example.org/config`). | ||
|
||
Currently supported options: | ||
|
||
- PRIVATE_KEY_RENEW | ||
- KEY_ALGO | ||
- KEYSIZE | ||
- OCSP_MUST_STAPLE | ||
- CHALLENGETYPE | ||
- HOOK | ||
- HOOK_CHAIN | ||
- WELLKNOWN | ||
- OPENSSL_CNF | ||
- RENEW_DAYS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Staging | ||
|
||
Let’s Encrypt has stringent rate limits in place during the public beta period. | ||
|
||
If you start testing using the production endpoint (which is the default), | ||
you will quickly hit these limits and find yourself locked out. | ||
|
||
To avoid this, please set the CA property to the Let’s Encrypt staging server URL in your config file: | ||
|
||
```bash | ||
CA="https://acme-staging.api.letsencrypt.org/directory" | ||
``` | ||
|
||
Please keep in mind that at the time of writing this letsencrypt.sh doesn't have support for registration management, | ||
so if you change CA you'll have to move your `private_key.pem` (and, if you care, `private_key.json`) out of the way. |
Oops, something went wrong.