revoke: follow symlink, exit with error on non-existing certificate file

This commit is contained in:
Markus Germeier
2015-12-16 19:30:20 +01:00
committed by Lukas Schauer
parent 0ed6a25795
commit c70180364b
2 changed files with 17 additions and 3 deletions
+3 -2
View File
@@ -182,9 +182,10 @@ _CHECK_ERRORLOG
# Revoke certificate using certificate key
_TEST "Revoking certificate..."
./letsencrypt.sh --revoke "certs/${TMP_URL}/cert.pem" --privkey "certs/${TMP_URL}/privkey.pem" > tmplog 2> errorlog || _FAIL "Script execution failed"
_CHECK_LOG "Revoking certs/${TMP_URL}/cert.pem"
REAL_CERT="$(readlink -n "certs/${TMP_URL}/cert.pem")"
_CHECK_LOG "Revoking certs/${TMP_URL}/${REAL_CERT}"
_CHECK_LOG "SUCCESS"
_CHECK_FILE "certs/${TMP_URL}/cert.pem-revoked"
_CHECK_FILE "certs/${TMP_URL}/${REAL_CERT}-revoked"
_CHECK_ERRORLOG
# All done