15 lines
196 B
Bash
Executable file
15 lines
196 B
Bash
Executable file
#!/bin/bash
|
|
|
|
if [[ -z $1 ]] ; then
|
|
echo "usage: $0 <file.crt>"
|
|
exit 1
|
|
fi
|
|
|
|
FILE=$1
|
|
|
|
if [[ ! -f $FILE ]] ; then
|
|
echo "File $FILE does not exist"
|
|
exit 2
|
|
fi
|
|
|
|
openssl x509 -in $FILE -noout -pubkey
|