From c04f0301990567ecc7c3c077a49f357d2f139eb8 Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos Date: Sun, 10 Mar 2019 13:59:32 +0100 Subject: tests: verify that 'certtool -i --outder' does not output text A common regression in the past, was certtool outputting text while writing raw DER data. Ensure that the certificate-info option does not regress. Resolves: #627 Signed-off-by: Nikos Mavrogiannopoulos --- tests/cert-tests/certtool | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/cert-tests/certtool b/tests/cert-tests/certtool index 5f1276e60e..90e26049a9 100755 --- a/tests/cert-tests/certtool +++ b/tests/cert-tests/certtool @@ -132,6 +132,20 @@ if test "${id}" != "c4880390506a849cd2d8289fb8aea8c189e635aff1054faba58658a0f107 exit 1 fi +# Test whether certtool --outder doesn't output the informational text data + +${VALGRIND} "${CERTTOOL}" -i --infile "${srcdir}/data/funny-spacing.pem" --outder --outfile ${TMPFILE1} +if test $? != 0;then + echo "cert output to DER failed" + exit 1 +fi + +grep 'Version:' ${TMPFILE1} +if test $? = 0;then + echo "found text info in DER certificate" + exit 1 +fi + rm -f ${TMPFILE1} ${TMPFILE2} export TZ="UTC" -- cgit v1.2.1