1diff --git a/analyze.py b/analyze.py
2index bb62af8..e929253 100755
3--- a/analyze.py
4+++ b/analyze.py
5@@ -418,13 +418,7 @@ def build_ciphers_lists(opensslbin):
6
7 # use system openssl if not on linux 64
8 if not opensslbin:
9- if platform.system() == 'Linux' and platform.architecture()[0] == '64bit':
10- opensslbin = mypath + '/openssl'
11- elif platform.system() == 'Darwin' and platform.architecture()[0] == '64bit':
12- opensslbin = mypath + '/openssl-darwin64'
13- else:
14- opensslbin='openssl'
15- print("warning: analyze.py is using system's openssl, which may limit the tested ciphers and recommendations")
16+ opensslbin = "@OPENSSLBIN@"
17
18 logging.debug('Loading all ciphers: ' + allC)
19 all_ciphers = subprocess.Popen([opensslbin, 'ciphers', allC],
20diff --git a/cipherscan b/cipherscan
21index 236b34f..a240d13 100755
22--- a/cipherscan
23+++ b/cipherscan
24@@ -30,43 +30,12 @@ if [[ -n $NOAUTODETECT ]]; then
25 else
26 case "$(uname -s)" in
27 Darwin)
28- opensslbin_name="openssl-darwin64"
29-
30- READLINKBIN=$(which greadlink 2>/dev/null)
31- if [[ -z $READLINKBIN ]]; then
32- echo "greadlink not found. (try: brew install coreutils)" 1>&2
33- exit 1
34- fi
35- TIMEOUTBIN=$(which gtimeout 2>/dev/null)
36- if [[ -z $TIMEOUTBIN ]]; then
37- echo "gtimeout not found. (try: brew install coreutils)" 1>&2
38- exit 1
39- fi
40+ READLINKBIN="@READLINKBIN@"
41+ TIMEOUTBIN="@TIMEOUTBIN@"
42 ;;
43 *)
44- opensslbin_name="openssl"
45-
46- # test that readlink or greadlink (darwin) are present
47- READLINKBIN="$(which readlink)"
48-
49- if [[ -z $READLINKBIN ]]; then
50- READLINKBIN="$(which greadlink)"
51- if [[ -z $READLINKBIN ]]; then
52- echo "neither readlink nor greadlink are present. install coreutils with {apt-get,yum,brew} install coreutils" 1>&2
53- exit 1
54- fi
55- fi
56-
57- # test that timeout or gtimeout (darwin) are present
58- TIMEOUTBIN="$(which timeout)"
59-
60- if [[ -z $TIMEOUTBIN ]]; then
61- TIMEOUTBIN="$(which gtimeout)"
62- if [[ -z $TIMEOUTBIN ]]; then
63- echo "neither timeout nor gtimeout are present. install coreutils with {apt-get,yum,brew} install coreutils" 1>&2
64- exit 1
65- fi
66- fi
67+ READLINKBIN="@READLINKBIN@"
68+ TIMEOUTBIN="@TIMEOUTBIN@"
69
70 # Check for busybox, which has different arguments
71 TIMEOUTOUTPUT="$($TIMEOUTBIN --help 2>&1)"
72@@ -1944,20 +1913,7 @@ do
73 done
74
75 if [[ -z $OPENSSLBIN ]]; then
76- readlink_result=$("$READLINKBIN" -f "$0")
77- if [[ -z $readlink_result ]]; then
78- echo "$READLINKBIN -f $0 failed, aborting." 1>&2
79- exit 1
80- fi
81- REALPATH=$(dirname "$readlink_result")
82- if [[ -z $REALPATH ]]; then
83- echo "dirname $REALPATH failed, aborting." 1>&2
84- exit 1
85- fi
86- OPENSSLBIN="${REALPATH}/${opensslbin_name}"
87- if ! [[ -x "${OPENSSLBIN}" ]]; then
88- OPENSSLBIN="$(which openssl)" # fallback to generic openssl
89- fi
90+ OPENSSLBIN="@OPENSSLBIN@"
91 fi
92 # use custom config file to enable GOST ciphers
93 if [[ -e $DIRNAMEPATH/openssl.cnf ]]; then