echo "$start $end"
pushd $2.ca > /dev/null
if [[ "$2" == "root" && "$1" == root.* ]]; then
- signkey="-selfsign"
+ signkey="-selfsign"
else
- signkey="-cert key.crt"
+ signkey="-cert key.crt"
fi
openssl ca $signkey -keyfile key.key -in "$BASE/$1.csr" -out "$BASE/$1.crt" -batch -config "$BASE/../selfsign.config" -extfile "$BASE/$3" $start $end
popd > /dev/null
echo "Signed"
}
+findLibfaketime() {
+ for candidate in /usr/lib/faketime/libfaketime.so.1 /usr/lib/*/faketime/libfaketime.so.1; do
+ if [[ -f "$candidate" ]]; then
+ printf '%s\n' "$candidate"
+ return
+ fi
+ done
+ printf >&2 'error: no libfaketime found\n'
+ exit 1 # unfortunately, this will only exit the $() subshell
+}
+