|
|
|
@ -621,7 +621,7 @@ check_config() { # check the config files for all obvious errors |
|
|
|
fi |
|
|
|
|
|
|
|
dn=0 |
|
|
|
tmplist=$(mktemp 2>/dev/null || mktemp -t getssl) |
|
|
|
tmplist=$(mktemp 2>/dev/null || mktemp -t getssl.XXXXXX) || error_exit "mktemp failed" |
|
|
|
for d in "${alldomains[@]}"; do # loop over domains (dn is domain number) |
|
|
|
debug "checking domain $d" |
|
|
|
if [[ "$(grep "^${d}$" "$tmplist")" = "$d" ]]; then |
|
|
|
@ -695,7 +695,10 @@ check_config() { # check the config files for all obvious errors |
|
|
|
} |
|
|
|
|
|
|
|
check_getssl_upgrade() { # check if a more recent version of code is available available |
|
|
|
TEMP_UPGRADE_FILE="$(mktemp 2>/dev/null || mktemp -t getssl)" |
|
|
|
TEMP_UPGRADE_FILE="$(mktemp 2>/dev/null || mktemp -t getssl.XXXXXX)" |
|
|
|
if [ "$TEMP_UPGRADE_FILE" == "" ]; then |
|
|
|
error_exit "mktemp failed" |
|
|
|
fi |
|
|
|
curl --user-agent "$CURL_USERAGENT" --silent "$CODE_LOCATION" --output "$TEMP_UPGRADE_FILE" |
|
|
|
errcode=$? |
|
|
|
if [[ $errcode -eq 60 ]]; then |
|
|
|
@ -918,7 +921,7 @@ create_csr() { # create a csr using a given key (if it doesn't already exist) |
|
|
|
if [[ ! -s "$csr_file" ]] || [[ "$_RECREATE_CSR" == "1" ]]; then |
|
|
|
info "creating domain csr - $csr_file" |
|
|
|
# create a temporary config file, for portability. |
|
|
|
tmp_conf=$(mktemp 2>/dev/null || mktemp -t getssl) |
|
|
|
tmp_conf=$(mktemp 2>/dev/null || mktemp -t getssl) || error_exit "mktemp failed" |
|
|
|
cat "$SSLCONF" > "$tmp_conf" |
|
|
|
printf "[SAN]\n%s" "$SANLIST" >> "$tmp_conf" |
|
|
|
# add OCSP Must-Staple to the domain csr |
|
|
|
@ -1928,7 +1931,7 @@ revoke_certificate() { # revoke a certificate |
|
|
|
ACCOUNT_KEY="$REVOKE_KEY" |
|
|
|
# need to set the revoke key as "account_key" since it's used in send_signed_request. |
|
|
|
get_signing_params "$REVOKE_KEY" |
|
|
|
TEMP_DIR=$(mktemp -d 2>/dev/null || mktemp -d -t getssl) |
|
|
|
TEMP_DIR=$(mktemp -d 2>/dev/null || mktemp -d -t getssl) || error_exit "mktemp failed" |
|
|
|
debug "revoking from $URL_revoke" |
|
|
|
rcertdata=$(sed '1d;$d' "$REVOKE_CERT" | tr -d "\r\n" | tr '/+' '_-' | tr -d '= ') |
|
|
|
send_signed_request "$URL_revoke" "{\"certificate\": \"$rcertdata\",\"reason\": $REVOKE_REASON}" |
|
|
|
|