|
@@ -40,6 +40,12 @@ fi
|
|
|
CASE8=$dflt
|
|
|
CASE9=$dflt
|
|
|
CASE10=$dflt
|
|
|
+ CASE11A=$dflt
|
|
|
+ CASE11B=$dflt
|
|
|
+ CASE11C=$dflt
|
|
|
+ CASE11D=$dflt
|
|
|
+ CASE11E=$dflt
|
|
|
+ CASE11F=$dflt
|
|
|
|
|
|
if [ $# -ge 1 ]; then
|
|
|
eval "CASE${1}"=1
|
|
@@ -363,6 +369,109 @@ echo "==== Case 10 ok"
|
|
|
|
|
|
fi
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+if [ "$CASE11A" = 1 ]; then
|
|
|
+
|
|
|
+ME="${DATA_DIR}/case11a"
|
|
|
+
|
|
|
+mkdir -p "${ME}/keys"
|
|
|
+
|
|
|
+${TOR} --DataDirectory "${ME}" --passphrase-fd 1 > "${ME}/stdout" && die "Successfully started with passphrase-fd but no keygen?" || true
|
|
|
+
|
|
|
+grep "passphrase-fd specified without --keygen" "${ME}/stdout" >/dev/null || die "Tor didn't declare that there was a problem with the arguments."
|
|
|
+
|
|
|
+echo "==== Case 11A ok"
|
|
|
+
|
|
|
+fi
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+if [ "$CASE11B" = 1 ]; then
|
|
|
+
|
|
|
+ME="${DATA_DIR}/case11b"
|
|
|
+
|
|
|
+mkdir -p "${ME}/keys"
|
|
|
+
|
|
|
+${TOR} --DataDirectory "${ME}" --no-passphrase > "${ME}/stdout" && die "Successfully started with no-passphrase but no keygen?" || true
|
|
|
+
|
|
|
+grep "no-passphrase specified without --keygen" "${ME}/stdout" >/dev/null || die "Tor didn't declare that there was a problem with the arguments."
|
|
|
+
|
|
|
+echo "==== Case 11B ok"
|
|
|
+
|
|
|
+fi
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+if [ "$CASE11C" = 1 ]; then
|
|
|
+
|
|
|
+ME="${DATA_DIR}/case11C"
|
|
|
+
|
|
|
+mkdir -p "${ME}/keys"
|
|
|
+
|
|
|
+${TOR} --DataDirectory "${ME}" --newpass > "${ME}/stdout" && die "Successfully started with newpass but no keygen?" || true
|
|
|
+
|
|
|
+grep "newpass specified without --keygen" "${ME}/stdout" >/dev/null || die "Tor didn't declare that there was a problem with the arguments."
|
|
|
+
|
|
|
+echo "==== Case 11C ok"
|
|
|
+
|
|
|
+fi
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+if [ "$CASE11D" = 1 ]; then
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ echo "==== Case 11D skipped"
|
|
|
+
|
|
|
+fi
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+if [ "$CASE11E" = 1 ]; then
|
|
|
+
|
|
|
+ME="${DATA_DIR}/case11E"
|
|
|
+
|
|
|
+mkdir -p "${ME}/keys"
|
|
|
+
|
|
|
+${TOR} --DataDirectory "${ME}" --keygen --passphrase-fd ewigeblumenkraft > "${ME}/stdout" && die "Successfully started with bogus passphrase-fd?" || true
|
|
|
+
|
|
|
+grep "Invalid --passphrase-fd value" "${ME}/stdout" >/dev/null || die "Tor didn't declare that there was a problem with the arguments."
|
|
|
+
|
|
|
+echo "==== Case 11E ok"
|
|
|
+
|
|
|
+fi
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+if [ "$CASE11F" = 1 ]; then
|
|
|
+
|
|
|
+ME="${DATA_DIR}/case11F"
|
|
|
+
|
|
|
+mkdir -p "${ME}/keys"
|
|
|
+
|
|
|
+${TOR} --DataDirectory "${ME}" --keygen --passphrase-fd 1 --no-passphrase > "${ME}/stdout" && die "Successfully started with bogus passphrase-fd combination?" || true
|
|
|
+
|
|
|
+grep "no-passphrase specified with --passphrase-fd" "${ME}/stdout" >/dev/null || die "Tor didn't declare that there was a problem with the arguments."
|
|
|
+
|
|
|
+echo "==== Case 11F ok"
|
|
|
+
|
|
|
+fi
|
|
|
+
|
|
|
|
|
|
|
|
|
|