[CA] BuyPass: Add check for CA account and request email if necessary
This commit is contained in:
parent
707589c2f4
commit
aaf48648b4
|
@ -17,6 +17,19 @@ if [[ "${CMD_PARAMS}" =~ "--buypass" ]]; then
|
|||
BUYPASS=1;
|
||||
fi
|
||||
|
||||
# BuyPass requires a valid email to be registered
|
||||
# before we issue certificates.
|
||||
if [[ $BUYPASS -eq 1 ]]; then
|
||||
CA_DIR="${ACME_DIR}/ca/api.buypass.com";
|
||||
|
||||
if [[ ! -d "${CA_DIR}" ]]; then
|
||||
echo "${ECHO_PREFIX} Account email for BuyPass CA (required)?"
|
||||
read ACCOUNT_EMAIL
|
||||
|
||||
eval "${ACME} --server https://api.buypass.com/acme/directory --register-account --accountemail '${ACCOUNT_EMAIL}'"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Create directory if it exists, make sure permissions are as strict as possible.
|
||||
echo "${ECHO_PREFIX} Creating base certificate directory: ${BASE}"
|
||||
mkdir -p $BASE
|
||||
|
|
Loading…
Reference in New Issue