mirror of
https://github.com/acmesh-official/acme.sh.git
synced 2025-12-24 12:14:23 +08:00
Quick Patch
This commit is contained in:
5
acme.sh
5
acme.sh
@@ -5846,15 +5846,14 @@ list_profiles() {
|
|||||||
_l_server_name="$(_getCAShortName "$_l_server_url")"
|
_l_server_name="$(_getCAShortName "$_l_server_url")"
|
||||||
_info "Fetching profiles from $_l_server_name ($_l_server_url)..."
|
_info "Fetching profiles from $_l_server_name ($_l_server_url)..."
|
||||||
|
|
||||||
# _initAPI fetches the directory, so we just need to parse its response.
|
|
||||||
response=$(_get "$_l_server_url" "" 10)
|
response=$(_get "$_l_server_url" "" 10)
|
||||||
if [ "$?" != "0" ]; then
|
if [ "$?" != "0" ]; then
|
||||||
_err "Failed to connect to CA directory: $_l_server_url"
|
_err "Failed to connect to CA directory: $_l_server_url"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Isolate the profiles object using the script's regex tool
|
normalized_response=$(echo "$response" | _normalizeJson)
|
||||||
profiles_json=$(echo "$response" | _egrep_o '"profiles" *: *\{[^\}]*\}')
|
profiles_json=$(echo "$normalized_response" | _egrep_o '"profiles" *: *\{[^\}]*\}')
|
||||||
|
|
||||||
if [ -z "$profiles_json" ]; then
|
if [ -z "$profiles_json" ]; then
|
||||||
_info "The CA '$_l_server_name' does not publish certificate profiles via its directory endpoint."
|
_info "The CA '$_l_server_name' does not publish certificate profiles via its directory endpoint."
|
||||||
|
|||||||
Reference in New Issue
Block a user