summaryrefslogtreecommitdiff
path: root/tests/cert-tests
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2017-04-04 12:52:14 +0200
committerNikos Mavrogiannopoulos <nmav@redhat.com>2017-04-04 15:23:34 +0200
commit0f234b05a6667ff36c7c576f7e256832d81ad376 (patch)
tree60419870db8fa32c68ff27c5a865febe32d688ce /tests/cert-tests
parent2ee8be983d0aff5a904035148c1b431c98f28b4f (diff)
downloadgnutls-0f234b05a6667ff36c7c576f7e256832d81ad376.tar.gz
tests: add unit test for PKCS#12 with file that uses SHA512 for MAC
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Diffstat (limited to 'tests/cert-tests')
-rw-r--r--tests/cert-tests/Makefile.am2
-rw-r--r--tests/cert-tests/data/mac-sha512.p12bin0 -> 2488 bytes
-rwxr-xr-xtests/cert-tests/pkcs122
3 files changed, 2 insertions, 2 deletions
diff --git a/tests/cert-tests/Makefile.am b/tests/cert-tests/Makefile.am
index 8ac7de2a20..521bf89339 100644
--- a/tests/cert-tests/Makefile.am
+++ b/tests/cert-tests/Makefile.am
@@ -70,7 +70,7 @@ EXTRA_DIST = data/ca-no-pathlen.pem data/no-ca-or-pathlen.pem data/aki-cert.pem
data/chain-with-critical-on-intermediate.pem data/chain-with-critical-on-endcert.pem \
templates/crit-extensions.tmpl data/crit-extensions.pem data/x509-with-zero-version.pem \
data/key-corpus-rc2-1.p12 data/key-corpus-rc2-2.p12 data/key-corpus-rc2-3.p12 \
- data/key-corpus-rc2-1.p12.out data/no-salt.p12
+ data/key-corpus-rc2-1.p12.out data/no-salt.p12 data/mac-sha512.p12
dist_check_SCRIPTS = pathlen aki certtool invalid-sig email \
pkcs7 pkcs7-broken-sigs privkey-import name-constraints certtool-long-cn crl provable-privkey \
diff --git a/tests/cert-tests/data/mac-sha512.p12 b/tests/cert-tests/data/mac-sha512.p12
new file mode 100644
index 0000000000..6a5a7f0985
--- /dev/null
+++ b/tests/cert-tests/data/mac-sha512.p12
Binary files differ
diff --git a/tests/cert-tests/pkcs12 b/tests/cert-tests/pkcs12
index c06a250272..a1639c0c7f 100755
--- a/tests/cert-tests/pkcs12
+++ b/tests/cert-tests/pkcs12
@@ -45,7 +45,7 @@ TMPFILE_PEM=pkcs12.$$.pem.tmp
DEBUG="1"
-for p12 in "no-salt.p12 Red%20Hat%20Enterprise%20Linux%207.4" "cert-with-crl.p12 password" "client.p12 foobar" "openssl.p12 CaudFocwijRupogDoicsApfiHadManUgNa" "noclient.p12" "unclient.p12" "pkcs12_2certs.p12"; do
+for p12 in "no-salt.p12 Red%20Hat%20Enterprise%20Linux%207.4" "mac-sha512.p12 Red%20Hat%20Enterprise%20Linux%207.4" "cert-with-crl.p12 password" "client.p12 foobar" "openssl.p12 CaudFocwijRupogDoicsApfiHadManUgNa" "noclient.p12" "unclient.p12" "pkcs12_2certs.p12"; do
set -- ${p12}
file="$1"
passwd=$(echo $2|sed 's/%20/ /g')