summaryrefslogtreecommitdiff
path: root/tests/pkcs12-decode
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2014-08-10 11:24:15 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2014-08-10 12:08:13 +0200
commit61fbee093ad5c8e0907dd72362a6e3d098507b33 (patch)
treeefecf315454c01c97054f7701b3f7889892f4f5b /tests/pkcs12-decode
parentf5b5f4dc9c1d12803246f35af2a37cfa587db6dc (diff)
downloadgnutls-61fbee093ad5c8e0907dd72362a6e3d098507b33.tar.gz
tests: test the decoding of a PKCS #12 structure with SHA256 MAC
Diffstat (limited to 'tests/pkcs12-decode')
-rw-r--r--tests/pkcs12-decode/Makefile.am2
-rwxr-xr-xtests/pkcs12-decode/pkcs128
-rw-r--r--tests/pkcs12-decode/sha256.p12bin0 -> 1411 bytes
3 files changed, 9 insertions, 1 deletions
diff --git a/tests/pkcs12-decode/Makefile.am b/tests/pkcs12-decode/Makefile.am
index 3ccaa1cd8c..7180256ec9 100644
--- a/tests/pkcs12-decode/Makefile.am
+++ b/tests/pkcs12-decode/Makefile.am
@@ -20,7 +20,7 @@
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
EXTRA_DIST = client.p12 noclient.p12 unclient.p12 pkcs12_2certs.p12 \
- pkcs12_5certs.p12 test-null.p12 cert-ca.p12
+ pkcs12_5certs.p12 test-null.p12 cert-ca.p12 sha256.p12
dist_check_SCRIPTS = pkcs12
diff --git a/tests/pkcs12-decode/pkcs12 b/tests/pkcs12-decode/pkcs12
index a32f642f41..0aa77468b6 100755
--- a/tests/pkcs12-decode/pkcs12
+++ b/tests/pkcs12-decode/pkcs12
@@ -58,6 +58,14 @@ if test $rc != 0; then
ret=1
fi
+file=sha256.p12
+$CERTTOOL --p12-info --inder --password 1234 --infile $srcdir/$file >/dev/null 2>&1
+rc=$?
+if test $rc != 0; then
+ echo "PKCS12 FATAL $file"
+ ret=1
+fi
+
# test whether we can encode a certificate and a key
$CERTTOOL --to-p12 --password 1234 --p12-name "my-key" --load-certificate $srcdir/../certs/cert-ecc256.pem --load-privkey $srcdir/../certs/ecc256.pem --outder --outfile out.p12 >/dev/null 2>&1
rc=$?
diff --git a/tests/pkcs12-decode/sha256.p12 b/tests/pkcs12-decode/sha256.p12
new file mode 100644
index 0000000000..f6779a1731
--- /dev/null
+++ b/tests/pkcs12-decode/sha256.p12
Binary files differ