Compare commits

..

No commits in common. "6ccdec2764796938f0aa0766f8738dbf483dc232" and "37699c642778bc0d4d920bbf6c5688e26c1a967f" have entirely different histories.

2 changed files with 6 additions and 10 deletions

View File

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

View File

@ -35,11 +35,7 @@ if [ -n "${certdest}" ]; then
certpath="$(printf "%s" "${certdest}" | cut -d':' -f1)" certpath="$(printf "%s" "${certdest}" | cut -d':' -f1)"
if [ -f "${certpath}" ]; then if [ -f "${certpath}" ]; then
if grep -q 'BEGIN CERTIFICATE' "${certpath}"; then certdata=$(cat "${certpath}")
certdata=$(openssl x509 -inform pem -in "${certpath}")
else
certdata=$(openssl x509 -inform der -in "${certpath}")
fi
else else
certport="$(printf "%s" "${certdest}" | cut -d':' -f2 -s)" certport="$(printf "%s" "${certdest}" | cut -d':' -f2 -s)"