Compare commits
2 Commits
37699c6427
...
6ccdec2764
Author | SHA1 | Date | |
---|---|---|---|
6ccdec2764 | |||
f046396eb4 |
10
README.md
10
README.md
|
@ -2,11 +2,11 @@
|
|||
|
||||
Small tools needed to solve immediate tasks independently or as part of a project
|
||||
|
||||
* [`build-python`.sh](https://git.hmp.today/pavel.muhortov/utils#build-python-sh)
|
||||
* [`cert-info`.sh](https://git.hmp.today/pavel.muhortov/utils#cert-info-sh)
|
||||
* [`ds18b20-over-ssh`.sh](https://git.hmp.today/pavel.muhortov/utils#ds18b20-over-ssh-sh)
|
||||
* [`sendmail`.py](https://git.hmp.today/pavel.muhortov/utils#sendmail-py)
|
||||
* [`simplewc`.py](https://git.hmp.today/pavel.muhortov/utils#simplewc-py)
|
||||
* [`build-python`.sh](https://git.hmp.today/pavel.muhortov/utils#build-pythonsh)
|
||||
* [`cert-info`.sh](https://git.hmp.today/pavel.muhortov/utils#cert-infosh)
|
||||
* [`ds18b20-over-ssh`.sh](https://git.hmp.today/pavel.muhortov/utils#ds18b20-over-sshsh)
|
||||
* [`sendmail`.py](https://git.hmp.today/pavel.muhortov/utils#sendmailpy)
|
||||
* [`simplewc`.py](https://git.hmp.today/pavel.muhortov/utils#simplewcpy)
|
||||
|
||||
____
|
||||
|
||||
|
|
|
@ -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