added 'der' encoding recognize
This commit is contained in:
parent
f046396eb4
commit
6ccdec2764
|
@ -35,7 +35,11 @@ if [ -n "${certdest}" ]; then
|
|||
certpath="$(printf "%s" "${certdest}" | cut -d':' -f1)"
|
||||
|
||||
if [ -f "${certpath}" ]; then
|
||||
certdata=$(cat "${certpath}")
|
||||
if grep -q 'BEGIN CERTIFICATE' "${certpath}"; then
|
||||
certdata=$(openssl x509 -inform pem -in "${certpath}")
|
||||
else
|
||||
certdata=$(openssl x509 -inform der -in "${certpath}")
|
||||
fi
|
||||
|
||||
else
|
||||
certport="$(printf "%s" "${certdest}" | cut -d':' -f2 -s)"
|
||||
|
|
Loading…
Reference in New Issue
Block a user