Commit Graph
4 Commits
Author SHA1 Message Date
Markus Germeier 3dbbb461f1 generate a new private key for each csr if the user wishes so 2015-12-06 16:27:15 +01:00
Markus Germeier 76a37834be fixed logic to check status from our challenge
the old code had a problem and would interpret a challenge that
returned "pending" and then "invalid" as valid.

This code actually has another problem. The RFC defines:

"status (optional, string):  The status of this authorization.
 Possible values are: "pending", "valid", and "invalid".  If this
 field is missing, then the default value is "pending"."

So actually the correct way to implement this would be:

while [[ -z "${status}" ]] || [[ "${status}" = "pending" ]]; do

But without further checks this might lead to an endless loop. So this
is "good enough(tm)". ;)
2015-12-06 15:51:38 +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