Skip to content

Commit 80748b9

Browse files
authored
Quick Patch
1 parent b244c76 commit 80748b9

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

acme.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5846,15 +5846,14 @@ list_profiles() {
58465846
_l_server_name="$(_getCAShortName "$_l_server_url")"
58475847
_info "Fetching profiles from $_l_server_name ($_l_server_url)..."
58485848

5849-
# _initAPI fetches the directory, so we just need to parse its response.
58505849
response=$(_get "$_l_server_url" "" 10)
58515850
if [ "$?" != "0" ]; then
58525851
_err "Failed to connect to CA directory: $_l_server_url"
58535852
return 1
58545853
fi
58555854

5856-
# Isolate the profiles object using the script's regex tool
5857-
profiles_json=$(echo "$response" | _egrep_o '"profiles" *: *\{[^\}]*\}')
5855+
normalized_response=$(echo "$response" | _normalizeJson)
5856+
profiles_json=$(echo "$normalized_response" | _egrep_o '"profiles" *: *\{[^\}]*\}')
58585857

58595858
if [ -z "$profiles_json" ]; then
58605859
_info "The CA '$_l_server_name' does not publish certificate profiles via its directory endpoint."

0 commit comments

Comments
 (0)