Correct grep regex for POSIX compatibility
Issue brought up by Michael Gmelin in FreeBSD bug: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=263812 The \d patter is not POSIX, instead :digit: or [0-9] should be used. Opted for the latter. Resolves #556 from freebsd/freebsd-ports@8e0b9d2 Signed-off-by: Eric F Crist <ecrist@secure-computing.net>
This commit is contained in:
parent
ecc7cb72d1
commit
d428d53a8b
@ -2343,7 +2343,7 @@ default_server_san() {
|
||||
awk -F'=' '/^ *CN=/{print $2}'
|
||||
)"
|
||||
|
||||
if echo "$cn" | grep -E -q '^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$'; then
|
||||
if echo "$cn" | grep -E -q '^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$'; then
|
||||
print "subjectAltName = IP:$cn"
|
||||
else
|
||||
print "subjectAltName = DNS:$cn"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user