summaryrefslogtreecommitdiff
path: root/tests/cert-tests/template-test
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2012-11-21 22:10:25 +0100
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2012-11-21 22:12:24 +0100
commit45bce4b8726edb9773c016125401500e7cace021 (patch)
tree222e818b7a409be69e61e05e0bdf522381b1d878 /tests/cert-tests/template-test
parentfcd18567c570671284cd06b2f6e68e77df7e9268 (diff)
downloadgnutls-45bce4b8726edb9773c016125401500e7cace021.tar.gz
Added test on UTF-8 certificate generation.
Diffstat (limited to 'tests/cert-tests/template-test')
-rwxr-xr-xtests/cert-tests/template-test18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/cert-tests/template-test b/tests/cert-tests/template-test
index 75f6fab1fb..f1d87ca095 100755
--- a/tests/cert-tests/template-test
+++ b/tests/cert-tests/template-test
@@ -43,11 +43,29 @@ datefudge "2007-04-22" \
diff $srcdir/template-test.pem tmp-tt.pem
rc=$?
+# We're done.
+if test "$rc" != "0"; then
+ echo "Test 1 failed"
+ exit $rc
+fi
+
rm -f tmp-tt.pem
+datefudge "2007-04-22" \
+ $CERTTOOL --generate-self-signed \
+ --load-privkey $srcdir/template-test.key \
+ --template $srcdir/template-utf8.tmpl \
+ --outfile tmp-tt.pem 2>/dev/null
+
+diff $srcdir/template-utf8.pem tmp-tt.pem
+rc=$?
+
# We're done.
if test "$rc" != "0"; then
+ echo "Test 2 (UTF8) failed"
exit $rc
fi
+rm -f tmp-tt.pem
+
exit 0