#!/bin/sh -e
bad=0
-curl --max-time 60 --verbose "$1" >/dev/null 2>state/curl-out || bad=1
+curl --range 0-100 --max-time 60 --verbose "$1" >/dev/null 2>state/curl-out || bad=1
grep -q "subject:.*CN=$2" state/curl-out || bad=1
if [ "$bad" -eq 1 ] ; then
cat state/curl-out