From c3467c97602fd81af77a2fdbb9040ba14421ff87 Mon Sep 17 00:00:00 2001 From: gustavo panizzo Date: Tue, 7 Apr 2020 10:45:09 +0200 Subject: [PATCH] warn macos users about the need to install openssl --- sshenc.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sshenc.sh b/sshenc.sh index 4867342..1c08988 100755 --- a/sshenc.sh +++ b/sshenc.sh @@ -49,6 +49,18 @@ temp_file_key="$(mktemp "$temp_dir/$me.XXXXXX.key")" temp_file="$(mktemp "$temp_dir/$me.XXXXXX.cypher")" trap cleanup EXIT +uname=$(uname -s 2>/dev/null) + +case "${uname}x" in + Darwinx) + openssl_path=$(command -v openssl 2>/dev/null) + if [ "${openssl_path}x" = "/usr/bin/opensslx" ]; then + echo >&2 "You need openssl 1.1.1 installed and in the \$PATH" + exit 1 + fi + ;; +esac + # retrieve ssh keys from github OLDMASK=$(umask) umask 0266