author | Alberto Bertogli
<albertito@blitiri.com.ar> 2024-03-09 10:39:17 UTC |
committer | Alberto Bertogli
<albertito@blitiri.com.ar> 2024-03-09 13:04:25 UTC |
parent | 3be7cd5160d28405bbcb1ac5d28b61caf0f91236 |
test/util/lib.sh | +2 | -3 |
diff --git a/test/util/lib.sh b/test/util/lib.sh index 5ed52bc..c373dd4 100644 --- a/test/util/lib.sh +++ b/test/util/lib.sh @@ -195,11 +195,10 @@ function generate_certs_for() { # Generating certs is takes time and slows the tests down, so we keep # a little cache that is common to all tests. CACHEDIR="${TBASE}/../.generate_certs_cache" - mkdir -p "${CACHEDIR}" + mkdir -p "${CACHEDIR}/$1/" touch -d "10 minutes ago" "${CACHEDIR}/.reference" - if [ "${CACHEDIR}/$1/" -ot "${CACHEDIR}/.reference" ]; then + if [ "${CACHEDIR}/$1/privkey.pem" -ot "${CACHEDIR}/.reference" ]; then # Cache miss (either was not there, or was too old). - mkdir -p "${CACHEDIR}/$1/" ( cd "${CACHEDIR}/$1/" || exit 1 generate_cert -ca -validfor=1h -host="$1"