diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2015-06-17 11:19:10 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2015-06-17 11:34:09 +0200 |
commit | 5b3230ffc472903ba49614afe85c3e576a1b6b9b (patch) | |
tree | 312397b7516fd4d755e8aed405fe0c32ddad1144 /tests/cert-tests/template-test | |
parent | 5834822b17eb1d7f33ce29cbe265e39d91e3b9ef (diff) | |
download | gnutls-5b3230ffc472903ba49614afe85c3e576a1b6b9b.tar.gz |
tests: verify that we generate dates with UTCTime prior to 2050
Also that we generate dates with GeneralizedTime format after 2050.
Diffstat (limited to 'tests/cert-tests/template-test')
-rwxr-xr-x | tests/cert-tests/template-test | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/cert-tests/template-test b/tests/cert-tests/template-test index e31f7631ac..c810db94e7 100755 --- a/tests/cert-tests/template-test +++ b/tests/cert-tests/template-test @@ -230,5 +230,32 @@ fi rm -f tmp-tt.pem +# Test the GeneralizedTime support +rc=1 +counter=1 + +while [ "$rc" != "0" -a $counter -le 3 ] +do + +datefudge "2051-04-22" \ + $CERTTOOL --generate-self-signed \ + --load-privkey $srcdir/template-test.key \ + --template $srcdir/template-generalized.tmpl \ + --outfile tmp-tt.pem 2>/dev/null + +diff $srcdir/template-generalized.pem tmp-tt.pem >/dev/null 2>&1 +rc=$? +test $rc != 0 && sleep 3 +counter=`expr $counter + 1` +done + +# We're done. +if test "$rc" != "0"; then + echo "Test 8 (generalizedTime) failed" + exit $rc +fi + +rm -f tmp-tt.pem + exit 0 |