Skip to content
Snippets Groups Projects
Commit dee2fde6 authored by Gabriel Moreau's avatar Gabriel Moreau
Browse files

Stupid, grep without file

parent bc63090e
No related branches found
No related tags found
No related merge requests found
Pipeline #144559 passed
......@@ -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
;;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment