Added openssl-inspect-file.

Pascal J. Bourguignon [2018-03-25 00:09]
Added openssl-inspect-file.
Filename
openssl-inspect-file
diff --git a/openssl-inspect-file b/openssl-inspect-file
new file mode 100755
index 0000000..69b82ae
--- /dev/null
+++ b/openssl-inspect-file
@@ -0,0 +1,10 @@
+#!/bin/bash
+set -eu
+for file ; do
+    echo "==== $file"
+    if file -L "$file"|grep -qs certificate ; then
+        openssl x509 -noout -text -in "$file" -inform perm
+    else
+        openssl rsa  -noout -text -in "$file"
+    fi
+done
ViewGit