mirror of
https://github.com/plantroon/acme.sh.git
synced 2024-11-09 16:01:46 +00:00
fix showcsr https://github.com/Neilpang/acme.sh/issues/1968
This commit is contained in:
parent
6fdd2f40ed
commit
2b9ebd6662
9
acme.sh
9
acme.sh
@ -1134,12 +1134,17 @@ _readSubjectAltNamesFromCSR() {
|
|||||||
|
|
||||||
if _contains "$_dnsAltnames," "DNS:$_csrsubj,"; then
|
if _contains "$_dnsAltnames," "DNS:$_csrsubj,"; then
|
||||||
_debug "AltNames contains subject"
|
_debug "AltNames contains subject"
|
||||||
_dnsAltnames="$(printf "%s" "$_dnsAltnames," | sed "s/DNS:$_csrsubj,//g")"
|
_excapedAlgnames="$(echo "$_dnsAltnames" | tr '*' '#')"
|
||||||
|
_debug _excapedAlgnames "$_excapedAlgnames"
|
||||||
|
_escapedSubject="$(echo "$_csrsubj" | tr '*' '#')"
|
||||||
|
_debug _escapedSubject "$_escapedSubject"
|
||||||
|
_dnsAltnames="$(echo "$_excapedAlgnames," | sed "s/DNS:$_escapedSubject,//g" | tr '#' '*' | sed "s/,\$//g")"
|
||||||
|
_debug _dnsAltnames "$_dnsAltnames"
|
||||||
else
|
else
|
||||||
_debug "AltNames doesn't contain subject"
|
_debug "AltNames doesn't contain subject"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
printf "%s" "$_dnsAltnames" | sed "s/DNS://g"
|
echo "$_dnsAltnames" | sed "s/DNS://g"
|
||||||
}
|
}
|
||||||
|
|
||||||
#_csrfile
|
#_csrfile
|
||||||
|
Loading…
Reference in New Issue
Block a user