Lukas Schauer
3390080ccb
removed acme-challenges directory from git, create if needed
2015-12-06 15:41:49 +01:00
Lukas Schauer
440dc30d5e
make config.sh optional
2015-12-06 15:38:52 +01:00
Lukas Schauer
ff3dbc5819
default location for acme-challenges
2015-12-06 15:37:41 +01:00
Martin Geiseler
e300c0a173
Renew timeframe as config option
2015-12-06 15:21:20 +01:00
Martin Geiseler
5060dea068
Check expire date of existing certs
2015-12-06 15:16:36 +01:00
Markus Germeier
b7439a83d6
don't overwrite certificate files
...
In a worst case scenario the new certificate is broken and we are left
without a working certificate (or need to restore one from our backup).
This way we only need to change the symlink to the known working cert
2015-12-06 15:12:00 +01:00
Markus Germeier
5a213f5f6a
make openssl keysize configurable
2015-12-06 15:05:00 +01:00
Lukas Schauer
96d7eabed4
use "-s" to detect content in temporary curl error logfile
2015-12-06 15:01:34 +01:00
Benjamin Dos Santos
c4be4c695a
style: double quote to prevent globbing and word splitting
...
https://github.com/koalaman/shellcheck/wiki/Sc2086
2015-12-06 03:01:34 +01:00
Benjamin Dos Santos
dd5f36e536
style: [[ ... ]] is preferred over [, test and /usr/bin/[.
...
https://google.github.io/styleguide/shell.xml#Test,_%5B_and_%5B%5B
2015-12-06 02:59:02 +01:00
Lukas Schauer
16a5589b45
Merge pull request #7 from rudis/master
...
add challenge hook and minor fixes/improvements
2015-12-06 02:49:05 +01:00
Simon Ruderich
b33f128893
add HOOK_CHALLENGE option to run a command before the reponse
2015-12-06 01:26:13 +01:00
Simon Ruderich
d211fece4a
use mkdir -p to create certs/$domain/
...
Prevents an error if running for the first time in a different
directory.
2015-12-06 01:23:41 +01:00
Simon Ruderich
00a0937c1f
make license agreement configurable as LICENSE
2015-12-06 01:23:16 +01:00
Simon Ruderich
f11bb1db6e
set CA setting per default
...
letsencrypt.sh is mainly used with letsencrypt.org.
2015-12-06 01:23:16 +01:00
Simon Ruderich
1cd81e9f03
fix typo in error string
2015-12-06 01:23:16 +01:00
Simon Ruderich
730930a153
also remove tempfile for curl's stderr on error
2015-12-06 01:23:16 +01:00
Simon Ruderich
130ea6ab69
rewrap line
...
No code changes.
2015-12-06 01:23:16 +01:00
Simon Ruderich
2f9c639c2b
simplify check for empty file
2015-12-06 01:23:16 +01:00
Simon Ruderich
d6d11a75e6
quote output filename
...
Shouldn't be necessary for output from `mktemp`, but better play it
safe.
2015-12-06 01:23:16 +01:00
Lukas Schauer
2e8454b46e
use "/usr/bin/env bash" instead of "/bin/bash"
2015-12-05 22:30:00 +01:00
Lukas Schauer
c6e6030269
big portability + readability fix: use openssl base64 instead of system base64, use shasum instead of shasum, added some comments
2015-12-05 22:27:58 +01:00
Lukas Schauer
6221526df5
fixed issue #4 (multiple domains per line)
2015-12-05 22:07:03 +01:00
Lukas Schauer
20e7d9d7a7
removed perl dependency
2015-12-05 22:06:36 +01:00
Lukas Schauer
69f3e78b7e
fail in pipes too
2015-12-05 18:03:06 +01:00
Lukas Schauer
7ec1e45aa6
fixed curl error message
2015-12-05 17:42:09 +01:00
Lukas Schauer
91ce50afe2
trying to catch curl errors
2015-12-05 17:40:21 +01:00
Lukas Schauer
2b5df371a9
make challenge files world-readable
2015-12-05 16:57:04 +01:00
Lukas Schauer
f8013d9243
Merge pull request #1 from rudis/master
...
fix registration, certificate creation and minor fixes
2015-12-05 16:53:00 +01:00
Simon Ruderich
181dd0ff2a
use umask 077 to protect private keys
2015-12-05 16:38:20 +01:00
Simon Ruderich
fb1790cdfa
use set -u to catch uninitialized variables
2015-12-05 16:38:19 +01:00
Simon Ruderich
5fedf3b3ca
replace source with .
...
source searches in $PATH which should not be necessary and might be
problematic.
2015-12-05 16:38:19 +01:00
Simon Ruderich
2f3ee624c5
use [ -z .. ] instead of explicit compare with ""
2015-12-05 16:38:19 +01:00
Simon Ruderich
2d6cb75f8a
use curl -sSf to display error messages on failure
2015-12-05 16:38:19 +01:00
Simon Ruderich
4aa48d33d5
replace echo (-n) with printf
...
printf is more portable and never interprets any escape characters.
2015-12-05 16:38:19 +01:00
Simon Ruderich
a53cd91694
remove useless cat
...
Found by shellcheck.
2015-12-05 16:30:42 +01:00
Simon Ruderich
a162121416
fix typo in variable name
...
Found by shellcheck.
2015-12-05 16:30:42 +01:00
Simon Ruderich
1f65a33525
don't use assign array to string ($@ -> $*)
...
Found by shellcheck.
2015-12-05 16:30:42 +01:00
Simon Ruderich
2e9c7a8c71
add missing quotes
...
Found by shellcheck.
2015-12-05 16:30:42 +01:00
Simon Ruderich
199b70b651
replace variable with %s in printf format string
...
Found by shellcheck.
2015-12-05 16:30:42 +01:00
Simon Ruderich
9fe313d887
add hex2bin helper function
2015-12-05 16:29:55 +01:00
Simon Ruderich
fcb5a03b48
fix pubMod64 and thumbprint calculation
...
We must strip the trailing newline with `echo -n` before we pass it to
perl to convert the hex to binary, not after.
2015-12-05 16:27:30 +01:00
Lukas Schauer
abb956936c
check for errors on token retrieval
2015-12-05 03:14:23 +01:00
Lukas Schauer
537f6fb701
silent registration
2015-12-05 03:12:31 +01:00
Lukas Schauer
4778289a77
not using bash arrays anymore
2015-12-05 02:51:02 +01:00
Lukas Schauer
8221727a9f
moved some code around to allow initial registration
2015-12-05 02:43:21 +01:00
Lukas Schauer
f13eaa7f41
generate private key if non-existant
2015-12-05 02:38:51 +01:00
Lukas Schauer
61f0b7ed7a
initial commit
2015-12-05 02:31:06 +01:00