From 7b7fef56170b5c323327507e61c6de8427ba082d Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Tue, 27 Sep 2016 10:29:53 +0100 Subject: [PATCH] Bug 1162897, Tweak SSL tests to exercise PKCS#11 URI matching, r=rrelyea --- tests/ssl/ssl.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tests/ssl/ssl.sh b/tests/ssl/ssl.sh index 972cd07caa..944849ad38 100755 --- a/tests/ssl/ssl.sh +++ b/tests/ssl/ssl.sh @@ -1038,7 +1038,14 @@ ssl_run_all() ORIG_P_R_SERVERDIR=$P_R_SERVERDIR ORIG_P_R_CLIENTDIR=$P_R_CLIENTDIR - USER_NICKNAME=TestUser + # Exercise PKCS#11 URI parsing. The token actually changes its name + # in FIPS mode, so cope with that. Note there's also semicolon in here + # but it doesn't need escaping/quoting; the shell copes. + if [ "${CLIENT_MODE}" = "fips" ]; then + USER_NICKNAME="pkcs11:token=NSS%20FIPS%20140-2%20Certificate%20DB;object=TestUser" + else + USER_NICKNAME="pkcs11:token=NSS%20Certificate%20DB;object=TestUser" + fi NORM_EXT="" cd ${CLIENTDIR} @@ -1051,7 +1058,8 @@ ssl_run_all() P_R_SERVERDIR=$P_R_EXT_SERVERDIR P_R_CLIENTDIR=$P_R_EXT_CLIENTDIR - USER_NICKNAME=ExtendedSSLUser + # A different URI test; specify CKA_LABEL but not the token. + USER_NICKNAME="pkcs11:object=ExtendedSSLUser" NORM_EXT="Extended Test" cd ${CLIENTDIR}