summaryrefslogtreecommitdiff
path: root/tests/cert-tests/pkcs7
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2015-06-02 14:26:20 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2015-06-02 14:26:20 +0200
commit144df74e4d7577c74a984381d13301786d893e0f (patch)
tree09b2c2a25423ca6ad3952746550edc3039cfc0b5 /tests/cert-tests/pkcs7
parentb57d5d39a928d17da2637411e6bebf5c0396115e (diff)
downloadgnutls-144df74e4d7577c74a984381d13301786d893e0f.tar.gz
tests: check PKCS #7 structure signature generation
Diffstat (limited to 'tests/cert-tests/pkcs7')
-rwxr-xr-xtests/cert-tests/pkcs739
1 files changed, 39 insertions, 0 deletions
diff --git a/tests/cert-tests/pkcs7 b/tests/cert-tests/pkcs7
index 4868e9b489..71ccf8c1a2 100755
--- a/tests/cert-tests/pkcs7
+++ b/tests/cert-tests/pkcs7
@@ -112,6 +112,45 @@ if test "$?" != "0"; then
exit 1
fi
+# Test signing
+FILE=signing
+$VALGRIND $CERTTOOL --p7-sign --load-privkey $srcdir/../../doc/credentials/x509/key-rsa.pem --load-certificate $srcdir/../../doc/credentials/x509/cert-rsa.pem --infile pkcs7-detached.txt >$OUTFILE
+rc=$?
+
+if test "$rc" != "0"; then
+ echo "$FILE: PKCS7 struct signing failed"
+ exit $rc
+fi
+
+FILE=signing-verify
+$VALGRIND $CERTTOOL --p7-verify --load-certificate $srcdir/../../doc/credentials/x509/cert-rsa.pem <$OUTFILE
+rc=$?
+
+if test "$rc" != "0"; then
+ echo "$FILE: PKCS7 struct signing failed"
+ exit $rc
+fi
+
+
+FILE=signing-detached
+$VALGRIND $CERTTOOL --p7-detached-sign --load-privkey $srcdir/../../doc/credentials/x509/key-rsa.pem --load-certificate $srcdir/../../doc/credentials/x509/cert-rsa.pem --infile pkcs7-detached.txt >$OUTFILE
+rc=$?
+
+if test "$rc" != "0"; then
+ echo "$FILE: PKCS7 struct signing failed"
+ exit $rc
+fi
+
+FILE=signing-detached-verify
+$VALGRIND $CERTTOOL --p7-verify --load-certificate $srcdir/../../doc/credentials/x509/cert-rsa.pem --load-data pkcs7-detached.txt <$OUTFILE
+rc=$?
+
+if test "$rc" != "0"; then
+ echo "$FILE: PKCS7 struct signing failed"
+ exit $rc
+fi
+
+
rm -f $OUTFILE
rm -f $OUTFILE2