-
Notifications
You must be signed in to change notification settings - Fork 0
/
git-bisect.sh
executable file
·45 lines (39 loc) · 980 Bytes
/
git-bisect.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/bash
set -euxo pipefail
STATUS=0
OPENSSL_DIR="/home/jaruga/git/openssl2"
OPENSSL_INSTALL_DIR="${OPENSSL_DIR}/dest"
PROGRAM_DIR="/home/jaruga/git/report-openssl-fips-ed25519"
pushd "${OPENSSL_DIR}"
git clean -fdx
# See <https://github.com/openssl/openssl/blob/master/INSTALL.md>.
./Configure \
--prefix="${OPENSSL_INSTALL_DIR}" \
--libdir=lib \
shared \
enable-fips \
enable-trace \
-O0 -g3
# -O0 -g3 -ggdb3 -gdwarf-5
make "-j$(nproc)"
make install
popd
pushd "${PROGRAM_DIR}"
rm -f ed25519
gcc \
-I "${OPENSSL_DIR}/dest/include/" \
-L "${OPENSSL_DIR}/dest/lib/" \
-O0 -g3 -ggdb3 -gdwarf-5 \
-o ed25519 ed25519.c -lcrypto
if ! OPENSSL_CONF="${PROGRAM_DIR}/openssl_fips.cnf" \
OPENSSL_CONF_INCLUDE="${OPENSSL_INSTALL_DIR}/ssl" \
OPENSSL_MODULES="${OPENSSL_INSTALL_DIR}/lib/ossl-modules" \
LD_LIBRARY_PATH="${OPENSSL_INSTALL_DIR}/lib" \
./ed25519 ed25519_pub.pem; then
echo "not ok."
STATUS=1
else
echo "ok."
fi
popd
exit "${STATUS}"