Skip to content

Commit

Permalink
Bug 1399867, tests: Add test for reading PKCS #12 files created with …
Browse files Browse the repository at this point in the history
…old NSS, r=rrelyea
  • Loading branch information
ueno committed Sep 14, 2017
1 parent 7519c77 commit 519d970
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
Binary file added tests/tools/TestOldCA.p12
Binary file not shown.
13 changes: 13 additions & 0 deletions tests/tools/tools.sh
Expand Up @@ -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}
}
Expand Down Expand Up @@ -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
########################################################################
Expand All @@ -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 ##############################
Expand Down

0 comments on commit 519d970

Please sign in to comment.