mirror of
https://github.com/acmesh-official/acme.sh.git
synced 2025-06-15 20:32:44 +00:00
Solving the problem that the function '_readSubjectAltNamesFromCSR' will cause certificates to not be issued in SAN and CN with the same wildcard domain
This commit is contained in:
parent
fe30bf7d09
commit
9171bc2f55
8
acme.sh
Executable file → Normal file
8
acme.sh
Executable file → Normal file
@ -464,6 +464,12 @@ _contains() {
|
||||
echo "$_str" | grep -- "$_sub" >/dev/null 2>&1
|
||||
}
|
||||
|
||||
_contains_fixed() {
|
||||
_str="$1"
|
||||
_sub="$2"
|
||||
echo "$_str" | grep -F -- "$_sub" >/dev/null 2>&1
|
||||
}
|
||||
|
||||
_hasfield() {
|
||||
_str="$1"
|
||||
_field="$2"
|
||||
@ -1345,7 +1351,7 @@ _readSubjectAltNamesFromCSR() {
|
||||
_dnsAltnames="$(${ACME_OPENSSL_BIN:-openssl} req -noout -text -in "$_csrfile" | grep "^ *DNS:.*" | tr -d ' \n')"
|
||||
_debug _dnsAltnames "$_dnsAltnames"
|
||||
|
||||
if _contains "$_dnsAltnames," "DNS:$_csrsubj,"; then
|
||||
if _contains_fixed "$_dnsAltnames," "DNS:$_csrsubj,"; then
|
||||
_debug "AltNames contains subject"
|
||||
_excapedAlgnames="$(echo "$_dnsAltnames" | tr '*' '#')"
|
||||
_debug _excapedAlgnames "$_excapedAlgnames"
|
||||
|
Loading…
x
Reference in New Issue
Block a user