Use grep -E instead of egrep

This commit is contained in:
a1346054
2022-09-12 20:12:28 +00:00
parent b3c49b584d
commit 4712c48597
5 changed files with 11 additions and 11 deletions

View File

@ -181,7 +181,7 @@ starttls_line0() {
debugme echo "... received result: "
cat $reply
if [ -n "$2" ]; then
if egrep -q "$2" $reply; then
if grep -Eq "$2" $reply; then
debugme echo "---> reply matched \"$2\""
[ $DEBUG -eq 0 ] && rm $reply
return 0

View File

@ -297,8 +297,8 @@ check_revocation() {
openssl ocsp $CA_BUNDLE_CMD $addissuer -cert $TMPDIR/level$1.crt -url $ocsp_uri -header HOST $ocsp_hostheader &>$TMPDIR/ocsp-response$1.txt
#tmpdir_escaped=`echo $TMPDIR | sed 's/\//\\\//g'`
#cat $TMPDIR/ocsp-response.txt | egrep -v "^WARNING: no nonce|^Response Verify Failure|OCSP_basic_verify" | sed 's/'"${tmpdir_escaped}"'//'
cat $TMPDIR/ocsp-response$1.txt | egrep -v "^WARNING: no nonce|^Response Verify Failure|OCSP_basic_verify" | sed 's/^.*level/level/'
#cat $TMPDIR/ocsp-response.txt | grep -Ev "^WARNING: no nonce|^Response Verify Failure|OCSP_basic_verify" | sed 's/'"${tmpdir_escaped}"'//'
cat $TMPDIR/ocsp-response$1.txt | grep -Ev "^WARNING: no nonce|^Response Verify Failure|OCSP_basic_verify" | sed 's/^.*level/level/'
if grep -q "level$1.crt.*good" $TMPDIR/ocsp-response$1.txt ; then
green "not revoked (OK)\c"
else

View File

@ -159,7 +159,7 @@ starttls_line0() {
debugme echo "... received result: "
cat $reply
if [ -n "$2" ]; then
if egrep -q "$2" $reply; then
if grep -Eq "$2" $reply; then
debugme echo "---> reply matched \"$2\""
[ $DEBUG -eq 0 ] && rm $reply
return 0

View File

@ -9,13 +9,13 @@ echo "####################### session ID ######################"
openssl s_client -connect $1:443 -servername $1 -bugs -no_ssl2 -no_ticket -sess_out /tmp/ssl_s </dev/null &>/dev/null
echo "--------------------------------------------------------"
openssl s_client -connect $1:443 -servername $1 -bugs -no_ssl2 -no_ticket -sess_in /tmp/ssl_s </dev/null 2>/dev/null | egrep "New|Reused|SSL handshake has read"
openssl s_client -connect $1:443 -servername $1 -bugs -no_ssl2 -no_ticket -sess_in /tmp/ssl_s </dev/null 2>/dev/null | grep -E "New|Reused|SSL handshake has read"
echo "--------------------------------------------------------"
echo "####################### session ticket ######################"
openssl s_client -connect $1:443 -servername $1 -bugs -no_ssl2 -sess_out /tmp/ssl_s </dev/null &>/dev/null
echo "--------------------------------------------------------"
openssl s_client -connect $1:443 -servername $1 -bugs -no_ssl2 -sess_in /tmp/ssl_s </dev/null 2>/dev/null| egrep "New|Reused|SSL handshake has read"
openssl s_client -connect $1:443 -servername $1 -bugs -no_ssl2 -sess_in /tmp/ssl_s </dev/null 2>/dev/null | grep -E "New|Reused|SSL handshake has read"
echo