Replace egrep with grep -E

This is an alternative to the proposed patch in #154 and is easier to
read than the change.

Closes #154.

Signed-off-by: Eric F Crist <ecrist@secure-computing.net>
This commit is contained in:
Eric F Crist committed 2017-12-07 18:56:20 -06:00
1 parent e8cd6c9807
commit 7a29079efd
2 files changed
+5 -1

No files matched your search

+4
View File
@@ -1,5 +1,9 @@
Easy-RSA 3 ChangeLog
3.0.4 (TBD)
* Remove use of egrep (#154)
3.0.3 (2017-08-22)
* Include mktemp windows binary
* copy CSR extensions into signed certificate
+1 -1
View File
@@ -942,7 +942,7 @@ default_server_san() {
"$EASYRSA_OPENSSL" req -in "$path" -noout -subject -nameopt sep_multiline |
awk -F'=' '/^ *CN=/{print $2}'
)
echo "$cn" | egrep -q '^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$'
echo "$cn" | grep -E -q '^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$'
if [ $? -eq 0 ]; then
print "subjectAltName = IP:$cn"
else