Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Acme.Sh
Commits
51be15f6
Unverified
Commit
51be15f6
authored
May 12, 2023
by
neil
Committed by
GitHub
May 12, 2023
Browse files
Merge pull request #4150 from defnull/patch-sectigo-wildcard
fix: Challenge not skipped for pre-validated wildcard domain orders
parents
110e25e7
09569790
Changes
1
Show whitespace changes
Inline
Side-by-side
acme.sh
View file @
51be15f6
...
@@ -4684,19 +4684,18 @@ $_authorizations_map"
...
@@ -4684,19 +4684,18 @@ $_authorizations_map"
thumbprint
=
"
$(
__calc_account_thumbprint
)
"
thumbprint
=
"
$(
__calc_account_thumbprint
)
"
fi
fi
entry="$(echo "$response" | _egrep_o '[^\{]*"type":"'$vtype'"[^\}]*')"
_debug entry "$entry"
keyauthorization
=
""
keyauthorization
=
""
if [ -z "$entry" ]; then
if ! _startswith "$d" '*.'; then
_debug "Not a wildcard domain, lets check whether the validation is already valid."
if
echo
"
$response
"
|
grep
'"status":"valid"'
>
/dev/null 2>&1
;
then
if
echo
"
$response
"
|
grep
'"status":"valid"'
>
/dev/null 2>&1
;
then
_debug
"
$d
is already valid."
_debug
"
$d
is already valid."
keyauthorization
=
"
$STATE_VERIFIED
"
keyauthorization
=
"
$STATE_VERIFIED
"
_debug keyauthorization
"
$keyauthorization
"
_debug keyauthorization
"
$keyauthorization
"
fi
fi
fi
if [ -z "$keyauthorization" ]; then
entry
=
"
$(
echo
"
$response
"
| _egrep_o
'[^\{]*"type":"'
$vtype
'"[^\}]*'
)
"
_debug entry
"
$entry
"
if
[
-z
"
$keyauthorization
"
-a
-z
"
$entry
"
]
;
then
_err
"Error, can not get domain token entry
$d
for
$vtype
"
_err
"Error, can not get domain token entry
$d
for
$vtype
"
_supported_vtypes
=
"
$(
echo
"
$response
"
| _egrep_o
"
\"
challenges
\"
:
\[
[^]]*]"
|
tr
'{'
"
\n
"
|
grep type
|
cut
-d
'"'
-f
4 |
tr
"
\n
"
' '
)
"
_supported_vtypes
=
"
$(
echo
"
$response
"
| _egrep_o
"
\"
challenges
\"
:
\[
[^]]*]"
|
tr
'{'
"
\n
"
|
grep type
|
cut
-d
'"'
-f
4 |
tr
"
\n
"
' '
)
"
if
[
"
$_supported_vtypes
"
]
;
then
if
[
"
$_supported_vtypes
"
]
;
then
...
@@ -4706,7 +4705,6 @@ $_authorizations_map"
...
@@ -4706,7 +4705,6 @@ $_authorizations_map"
_on_issue_err
"
$_post_hook
"
_on_issue_err
"
$_post_hook
"
return
1
return
1
fi
fi
fi
if
[
-z
"
$keyauthorization
"
]
;
then
if
[
-z
"
$keyauthorization
"
]
;
then
token
=
"
$(
echo
"
$entry
"
| _egrep_o
'"token":"[^"]*'
|
cut
-d
:
-f
2 |
tr
-d
'"'
)
"
token
=
"
$(
echo
"
$entry
"
| _egrep_o
'"token":"[^"]*'
|
cut
-d
:
-f
2 |
tr
-d
'"'
)
"
...
@@ -4731,12 +4729,6 @@ $_authorizations_map"
...
@@ -4731,12 +4729,6 @@ $_authorizations_map"
fi
fi
keyauthorization
=
"
$token
.
$thumbprint
"
keyauthorization
=
"
$token
.
$thumbprint
"
_debug keyauthorization
"
$keyauthorization
"
_debug keyauthorization
"
$keyauthorization
"
if printf "%s" "$response" | grep '"status":"valid"' >/dev/null 2>&1; then
_debug "$d is already verified."
keyauthorization="$STATE_VERIFIED"
_debug keyauthorization "$keyauthorization"
fi
fi
fi
dvlist
=
"
$d$sep$keyauthorization$sep$uri$sep$vtype$sep$_currentRoot
"
dvlist
=
"
$d$sep$keyauthorization$sep$uri$sep$vtype$sep$_currentRoot
"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment