diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2016-03-08 15:10:07 +0100 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2016-03-08 15:15:19 +0100 |
commit | 66b675c338479678b6e3f52d67551d97d5b28afa (patch) | |
tree | a2a89bba8c87367a6030eda63cf4f92c317e8f42 | |
parent | b8555c09e80ec6211fbdbfc03de0e5fa401768e6 (diff) | |
download | gnutls-66b675c338479678b6e3f52d67551d97d5b28afa.tar.gz |
tests: testpkcs11: the test will always fail in code path failures
-rwxr-xr-x | tests/suite/testpkcs11.sh | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/tests/suite/testpkcs11.sh b/tests/suite/testpkcs11.sh index 3b9c45085a..619270e4f4 100755 --- a/tests/suite/testpkcs11.sh +++ b/tests/suite/testpkcs11.sh @@ -166,11 +166,10 @@ generate_temp_rsa_privkey () { echo -n "* Generating RSA private key ("${bits}")... " ${P11TOOL} ${ADDITIONAL_PARAM} --login --label temp-rsa-"${bits}" --generate-rsa --bits "${bits}" "${token}" --outfile tmp-client.pub >>"${TMPFILE}" 2>&1 if test $? = 0; then - RETCODE=0 echo ok else echo failed - RETCODE=1 + exit 1 fi # if test ${RETCODE} = 0; then @@ -199,11 +198,10 @@ generate_temp_dsa_privkey () { echo -n "* Generating DSA private key ("${bits}")... " ${P11TOOL} ${ADDITIONAL_PARAM} --login --label temp-dsa-"${bits}" --generate-dsa --bits "${bits}" "${token}" --outfile tmp-client.pub >>"${TMPFILE}" 2>&1 if test $? = 0; then - RETCODE=0 echo ok else echo failed - RETCODE=1 + exit 1 fi } @@ -314,11 +312,10 @@ generate_temp_ecc_privkey () { echo -n "* Generating ECC private key (${bits})... " ${P11TOOL} ${ADDITIONAL_PARAM} --login --label "temp-ecc-${bits}" --generate-ecc --bits "${bits}" "${token}" --outfile tmp-client.pub >>"${TMPFILE}" 2>&1 if test $? = 0; then - RETCODE=0 echo ok else echo failed - RETCODE=1 + exit 1 fi } @@ -342,18 +339,16 @@ import_privkey () { "${CERTTOOL}" ${CERTTOOL_PARAM} --generate-privkey "${gen_option}" --pkcs8 --password= --outfile "${outfile}" >>"${TMPFILE}" 2>&1 if test $? != 0; then - RETCODE=1 echo failed - return + exit 1 fi ${P11TOOL} ${ADDITIONAL_PARAM} --login --write --label "${prefix}-${bits}" --load-privkey "${outfile}" "${token}" >>"${TMPFILE}" 2>&1 if test $? = 0; then - RETCODE=0 echo ok else echo failed - RETCODE=1 + exit 1 fi } |