diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2017-04-04 11:19:23 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2017-04-04 11:19:23 +0200 |
commit | ffd3470d35f1c784931a8637d6fcd52732ca3269 (patch) | |
tree | d036d00481732c53101822c1a9940b56ba9850e3 | |
parent | a2d282ad3484a35b59953ebd38b5163ed94e7eaf (diff) | |
download | gnutls-ffd3470d35f1c784931a8637d6fcd52732ca3269.tar.gz |
tests: added unit test for PKCS#12 with file with no salt in MAC
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
-rw-r--r-- | tests/cert-tests/Makefile.am | 2 | ||||
-rw-r--r-- | tests/cert-tests/data/no-salt.p12 | bin | 0 -> 2432 bytes | |||
-rwxr-xr-x | tests/cert-tests/pkcs12 | 5 |
3 files changed, 4 insertions, 3 deletions
diff --git a/tests/cert-tests/Makefile.am b/tests/cert-tests/Makefile.am index 69647a2b23..8ac7de2a20 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/key-corpus-rc2-1.p12.out data/no-salt.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/no-salt.p12 b/tests/cert-tests/data/no-salt.p12 Binary files differnew file mode 100644 index 0000000000..37d2eb9393 --- /dev/null +++ b/tests/cert-tests/data/no-salt.p12 diff --git a/tests/cert-tests/pkcs12 b/tests/cert-tests/pkcs12 index 33958b21c0..c06a250272 100755 --- a/tests/cert-tests/pkcs12 +++ b/tests/cert-tests/pkcs12 @@ -45,10 +45,11 @@ TMPFILE_PEM=pkcs12.$$.pem.tmp DEBUG="1" -for p12 in "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" "cert-with-crl.p12 password" "client.p12 foobar" "openssl.p12 CaudFocwijRupogDoicsApfiHadManUgNa" "noclient.p12" "unclient.p12" "pkcs12_2certs.p12"; do set -- ${p12} file="$1" - passwd="$2" + passwd=$(echo $2|sed 's/%20/ /g') + if test "x$DEBUG" != "x"; then ${VALGRIND} "${CERTTOOL}" -d 99 --p12-info --inder --password "${passwd}" \ --infile "${srcdir}/data/${file}" |