Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wildcard certificate support with CloudFlare DNS #916

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ function ascending_wildcard_locations {
# - *.example.com
local domain="${1:?}"
local first_label
regex="^[[:alnum:]_\-]+(\.[[:alpha:]]+)?$"
regex="^(\*\.)?[[:alnum:]_\-]+(\.[[:alpha:]]+)?$"
until [[ "$domain" =~ $regex ]]; do
first_label="${domain%%.*}"
domain="${domain/${first_label}./}"
Expand All @@ -73,7 +73,7 @@ function descending_wildcard_locations {
# - foo.*
local domain="${1:?}"
local last_label
regex="^[[:alnum:]_\-]+$"
regex="^(\*\.)?[[:alnum:]_\-]+$"
until [[ "$domain" =~ $regex ]]; do
last_label="${domain##*.}"
domain="${domain/.${last_label}/}"
Expand Down
2 changes: 1 addition & 1 deletion app/letsencrypt_service
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ function update_cert {

# CLI parameters array used for --issue
local -a params_issue_arr
params_issue_arr+=(--webroot /usr/share/nginx/html)
[[ -z "${CF_Token}" ]] && params_issue_arr+=(--webroot /usr/share/nginx/html) || params_issue_arr+=(--dns dns_cf)

local -n cert_keysize="LETSENCRYPT_${cid}_KEYSIZE"
if [[ -z "$cert_keysize" ]] || \
Expand Down