summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xhook4
-rwxr-xr-xnannycam8
2 files changed, 8 insertions, 4 deletions
diff --git a/hook b/hook
index cf5ef0d6df0..9f3e71a19c4 100755
--- a/hook
+++ b/hook
@@ -17,9 +17,9 @@ run_hook () { (
fi
# Invoke the nannycam script
- NANNYCAM="/usr/lib/nannycam/nannycam"
+ NANNYCAM="$(pwd)/nannycam"
if [ ! -f "$NANNYCAM" ]; then
- NANNYCAM="$(pwd)/nannycam"
+ NANNYCAM="/usr/lib/nannycam/nannycam"
fi
source $NANNYCAM \
diff --git a/nannycam b/nannycam
index 95d7c63c98c..d66875149a6 100755
--- a/nannycam
+++ b/nannycam
@@ -62,8 +62,12 @@ fi
check_mbr && check_mbr_gap && check_efi_stub || hash_mismatch
DATE_TIME="$(date +%s)"
-echo -n "$DATE_TIME" \
- | openssl pkeyutl -inkey "$AUTH_KEY_FILE" -sign \
+PREFIX="D${DATE_TIME}S"
+(
+ echo -n "$PREFIX"
+ echo -n "$DATE_TIME" \
+ | openssl dgst -"$HASH_ALG" -sign "$AUTH_KEY_FILE"
+) \
| qrencode -8 $QR_OPTS
echo "$DATE_TIME"