summaryrefslogtreecommitdiffstats
path: root/crypto/openssl/test/tpkcs7
diff options
context:
space:
mode:
authorkris <kris@FreeBSD.org>2000-01-10 06:22:05 +0000
committerkris <kris@FreeBSD.org>2000-01-10 06:22:05 +0000
commit2e467dc342d6641955ef59a1a671ff929444d45b (patch)
treeb5683ff3d44c93978826763313683673904c6bd9 /crypto/openssl/test/tpkcs7
parente829abb179a8846d90fb31e1bcab4ea0aec4590f (diff)
downloadFreeBSD-src-2e467dc342d6641955ef59a1a671ff929444d45b.zip
FreeBSD-src-2e467dc342d6641955ef59a1a671ff929444d45b.tar.gz
Initial import of OpenSSL 0.9.4, sans IDEA and RSA code for patent
infringement reasons.
Diffstat (limited to 'crypto/openssl/test/tpkcs7')
-rw-r--r--crypto/openssl/test/tpkcs751
1 files changed, 51 insertions, 0 deletions
diff --git a/crypto/openssl/test/tpkcs7 b/crypto/openssl/test/tpkcs7
new file mode 100644
index 0000000..15bbba4
--- /dev/null
+++ b/crypto/openssl/test/tpkcs7
@@ -0,0 +1,51 @@
+#!/bin/sh
+
+PATH=../apps:$PATH
+export PATH
+
+cmd='../apps/openssl pkcs7'
+
+if [ "$1"x != "x" ]; then
+ t=$1
+else
+ t=testp7.pem
+fi
+
+echo testing pkcs7 conversions
+cp $t fff.p
+
+echo "p -> d"
+$cmd -in fff.p -inform p -outform d >f.d
+if [ $? != 0 ]; then exit 1; fi
+echo "p -> p"
+$cmd -in fff.p -inform p -outform p >f.p
+if [ $? != 0 ]; then exit 1; fi
+
+echo "d -> d"
+$cmd -in f.d -inform d -outform d >ff.d1
+if [ $? != 0 ]; then exit 1; fi
+echo "p -> d"
+$cmd -in f.p -inform p -outform d >ff.d3
+if [ $? != 0 ]; then exit 1; fi
+
+echo "d -> p"
+$cmd -in f.d -inform d -outform p >ff.p1
+if [ $? != 0 ]; then exit 1; fi
+echo "p -> p"
+$cmd -in f.p -inform p -outform p >ff.p3
+if [ $? != 0 ]; then exit 1; fi
+
+cmp fff.p f.p
+if [ $? != 0 ]; then exit 1; fi
+cmp fff.p ff.p1
+if [ $? != 0 ]; then exit 1; fi
+cmp fff.p ff.p3
+if [ $? != 0 ]; then exit 1; fi
+
+cmp f.p ff.p1
+if [ $? != 0 ]; then exit 1; fi
+cmp f.p ff.p3
+if [ $? != 0 ]; then exit 1; fi
+
+/bin/rm -f f.* ff.* fff.*
+exit 0
OpenPOWER on IntegriCloud