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:
parent
e8cd6c9807
commit
7a29079efd
@ -1,5 +1,9 @@
|
|||||||
Easy-RSA 3 ChangeLog
|
Easy-RSA 3 ChangeLog
|
||||||
|
|
||||||
|
3.0.4 (TBD)
|
||||||
|
* Remove use of egrep (#154)
|
||||||
|
|
||||||
|
|
||||||
3.0.3 (2017-08-22)
|
3.0.3 (2017-08-22)
|
||||||
* Include mktemp windows binary
|
* Include mktemp windows binary
|
||||||
* copy CSR extensions into signed certificate
|
* copy CSR extensions into signed certificate
|
||||||
|
|||||||
@ -942,7 +942,7 @@ default_server_san() {
|
|||||||
"$EASYRSA_OPENSSL" req -in "$path" -noout -subject -nameopt sep_multiline |
|
"$EASYRSA_OPENSSL" req -in "$path" -noout -subject -nameopt sep_multiline |
|
||||||
awk -F'=' '/^ *CN=/{print $2}'
|
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
|
if [ $? -eq 0 ]; then
|
||||||
print "subjectAltName = IP:$cn"
|
print "subjectAltName = IP:$cn"
|
||||||
else
|
else
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user