|
@ -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 |
|
|