Skip to content

Commit

Permalink
Fix a test that didn't use the correct content-type
Browse files Browse the repository at this point in the history
  • Loading branch information
oyvindhagberg committed Oct 10, 2024
1 parent e3fb6eb commit 06fccab
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/test_cert_handling.sh
Original file line number Diff line number Diff line change
Expand Up @@ -192,16 +192,21 @@ if docker run --rm -v clientvar:/var --network host --entrypoint curl nivlheimcl
fi
# Test post (it will get a 403 anyway, because the nonce is missing)
docker run --rm -v clientvar:/var --network host --entrypoint curl nivlheimclient -sk --cert /var/nivlheim/my.crt --key /var/nivlheim/my.key \
-H 'Content-Type: application/x-www-form-urlencoded' \
https://localhost/cgi-bin/secure/post > $tempdir/postresult || true
if ! grep -qi "revoked" $tempdir/postresult; then
echo "Post worked even though cert was blacklisted."
echo "---------- response: -----------------"
cat $tempdir/postresult
exit 1
fi
# Test renew
docker run --rm -v clientvar:/var --network host --entrypoint curl nivlheimclient -sk --cert /var/nivlheim/my.crt --key /var/nivlheim/my.key \
https://localhost/cgi-bin/secure/renewcert > $tempdir/renewresult || true
if ! grep -qi "revoked" $tempdir/renewresult; then
echo "Renewcert worked even though cert was blacklisted."
echo "---------- response: -----------------"
cat $tempdir/renewresult
exit 1
fi

Expand Down

0 comments on commit 06fccab

Please sign in to comment.