diff --git a/certcheck b/certcheck
index 275e49c475551ccb60e89862c5241651371c2990..ffc08390e26d9d4de280659b19705a091817a214 100755
--- a/certcheck
+++ b/certcheck
@@ -5,7 +5,7 @@
 export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin
 export LANG=C
 
-export VERSION=0.3.5
+export VERSION=0.3.6
 
 function usage() {
    cat <<END_USAGE
@@ -107,10 +107,10 @@ case "${action}" in
 
    text|txt)
       [ -s "${CRT}" ] || say_warning "missing ${CRT}"
-      grep -q -- '-----BEGIN PRIVATE KEY-----' && say_warning "give the public and not the private key!"
-      grep -q -- '-----BEGIN CERTIFICATE-----' || say_warning "your key is not in PEM format!"
+      grep -q -- '-----BEGIN PRIVATE KEY-----' "${CRT}" && say_warning 'give the public and not the private key!'
+      grep -q -- '-----BEGIN CERTIFICATE-----' "${CRT}" || say_warning "your key isn't in PEM format!"
       openssl x509 -noout -text -in "${CRT}" \
-         | egrep '(Subject|Not Before|Not After[[:space:]]|DNS|Issuer):' \
+         | grep -E '(Subject|Not Before|Not After[[:space:]]|DNS|Issuer):' \
          | sed -e 's/^\s*//g;' \
          | sort -r
       ;;