summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDaiki Ueno <dueno@redhat.com>2017-09-14 16:12:33 +0200
committerDaiki Ueno <dueno@redhat.com>2017-09-14 16:12:33 +0200
commitf400d00addfddab469d7e8d4761dd63ccb26c793 (patch)
treeeda67318c55e3101c559301ed85a6cc57fbe600e /tests
parent7774834e2f6024c22c69c1572ab036a4a7f244bc (diff)
downloadnss-hg-f400d00addfddab469d7e8d4761dd63ccb26c793.tar.gz
Bug 1399867, tests: Add test for reading PKCS #12 files created with old NSS, r=rrelyea
Diffstat (limited to 'tests')
-rw-r--r--tests/tools/TestOldCA.p12bin0 -> 2588 bytes
-rw-r--r--tests/tools/tools.sh13
2 files changed, 13 insertions, 0 deletions
diff --git a/tests/tools/TestOldCA.p12 b/tests/tools/TestOldCA.p12
new file mode 100644
index 000000000..40d5671b9
--- /dev/null
+++ b/tests/tools/TestOldCA.p12
Binary files differ
diff --git a/tests/tools/tools.sh b/tests/tools/tools.sh
index 4eb71cfd9..788209ff7 100644
--- a/tests/tools/tools.sh
+++ b/tests/tools/tools.sh
@@ -102,6 +102,8 @@ tools_init()
cp ${ALICEDIR}/* ${SIGNDIR}/
mkdir -p ${TOOLSDIR}/html
cp ${QADIR}/tools/sign*.html ${TOOLSDIR}/html
+ mkdir -p ${TOOLSDIR}/data
+ cp ${QADIR}/tools/TestOldCA.p12 ${TOOLSDIR}/data
cd ${TOOLSDIR}
}
@@ -417,6 +419,16 @@ tools_p12_export_list_import_with_default_ciphers()
check_tmpfile
}
+tools_p12_import_old_files()
+{
+ echo "$SCRIPTNAME: Importing CA cert & key created with NSS 3.21 --------------"
+ echo "pk12util -i TestOldCA.p12 -d ${P_R_COPYDIR} -k ${R_PWFILE} -w ${R_PWFILE}"
+ ${BINDIR}/pk12util -i ${TOOLSDIR}/data/TestOldCA.p12 -d ${P_R_COPYDIR} -k ${R_PWFILE} -w ${R_PWFILE} 2>&1
+ ret=$?
+ html_msg $ret 0 "Importing CA cert & key created with NSS 3.21"
+ check_tmpfile
+}
+
############################## tools_p12 ###############################
# local shell function to test basic functionality of pk12util
########################################################################
@@ -428,6 +440,7 @@ tools_p12()
tools_p12_export_list_import_all_pkcs12v2pbe_ciphers
tools_p12_export_with_none_ciphers
tools_p12_export_with_invalid_ciphers
+ tools_p12_import_old_files
}
############################## tools_sign ##############################