Bug 382775: Backed out last patch.
authorslavomir.katuscak%sun.com
Tue, 17 Jul 2007 09:12:45 +0000
changeset 7943 a8aa1c5e873744717ff5df81d4e4487f562dc190
parent 7942 a5c42e3c82d05bc1d0276f381c924a1220b94378
child 7944 9e7039c41aa4d6af127412bd7827e09cbef357d3
push idunknown
push userunknown
push dateunknown
bugs382775
Bug 382775: Backed out last patch.
security/nss/tests/fips/fips.sh
--- a/security/nss/tests/fips/fips.sh
+++ b/security/nss/tests/fips/fips.sh
@@ -133,101 +133,52 @@ fips_140()
 
   echo "$SCRIPTNAME: Export the certificate as a DER-encoded file ------"
   echo "certutil -d ${P_R_FIPSDIR} -L -n ${FIPSCERTNICK} -r -o fips140.crt"
   certutil -d ${P_R_FIPSDIR} -L -n ${FIPSCERTNICK} -r -o fips140.crt 2>&1
   html_msg $? 0 "Export the certificate as a DER (certutil -L -r)" "."
 
   echo "$SCRIPTNAME: List the FIPS module certificates -----------------"
   echo "certutil -d ${P_R_FIPSDIR} -L"
-  certs=`certutil -d ${P_R_FIPSDIR} -L 2>&1`
-  ret=$?
-  if [ ! "${certs}" ]; then
-    ret=255
-  fi
-  html_msg $ret 0 "List the FIPS module certificates (certutil -L)" "."
-
+  certutil -d ${P_R_FIPSDIR} -L 2>&1
+  html_msg $? 0 "List the FIPS module certificates (certutil -L)" "."
 
   echo "$SCRIPTNAME: Delete the certificate and key from the FIPS module"
   echo "certutil -d ${P_R_FIPSDIR} -F -n ${FIPSCERTNICK} -f ${R_FIPSPWFILE}"
   certutil -d ${P_R_FIPSDIR} -F -n ${FIPSCERTNICK} -f ${R_FIPSPWFILE} 2>&1
-  html_msg $? 0 "Delete the certificate and key from the FIPS module (certutil -F)" "."
+  html_msg $? 0 "Delete the certificate and key from the FIPS module (certutil -D)" "."
+
 
   echo "$SCRIPTNAME: List the FIPS module certificates -----------------"
   echo "certutil -d ${P_R_FIPSDIR} -L"
-  certs=`certutil -d ${P_R_FIPSDIR} -L 2>&1`
-  ret=$?
-  if [ "${certs}" ]; then
-    ret=255
-  fi
-  html_msg $ret 0 "List the FIPS module certificates (certutil -L)" "."
+  certutil -d ${P_R_FIPSDIR} -L 2>&1
+  html_msg $? 0 "List the FIPS module certificates (certutil -L)" "."
 
   echo "$SCRIPTNAME: List the FIPS module keys."
   echo "certutil -d ${P_R_FIPSDIR} -K -f ${R_FIPSPWFILE}"
   certutil -d ${P_R_FIPSDIR} -K -f ${R_FIPSPWFILE} 2>&1
   # certutil -K now returns a failure if no keys are found. This verifies that
   # our delete succeded.
   html_msg $? 255 "List the FIPS module keys (certutil -K)" "."
 
-
   echo "$SCRIPTNAME: Import the certificate and key from the PKCS#12 file"
   echo "pk12util -d ${P_R_FIPSDIR} -i fips140.p12 -w ${R_FIPSP12PWFILE} -k ${R_FIPSPWFILE}"
   pk12util -d ${P_R_FIPSDIR} -i fips140.p12 -w ${R_FIPSP12PWFILE} -k ${R_FIPSPWFILE} 2>&1
   html_msg $? 0 "Import the certificate and key from the PKCS#12 file (pk12util -i)" "."
 
   echo "$SCRIPTNAME: List the FIPS module certificates -----------------"
   echo "certutil -d ${P_R_FIPSDIR} -L"
-  certs=`certutil -d ${P_R_FIPSDIR} -L 2>&1`
-  ret=$?
-  if [ ! "${certs}" ]; then
-    ret=255
-  fi
-  html_msg $ret 0 "List the FIPS module certificates (certutil -L)" "."
+  certutil -d ${P_R_FIPSDIR} -L 2>&1
+  html_msg $? 0 "List the FIPS module certificates (certutil -L)" "."
 
   echo "$SCRIPTNAME: List the FIPS module keys --------------------------"
   echo "certutil -d ${P_R_FIPSDIR} -K -f ${R_FIPSPWFILE}"
   certutil -d ${P_R_FIPSDIR} -K -f ${R_FIPSPWFILE} 2>&1
   html_msg $? 0 "List the FIPS module keys (certutil -K)" "."
 
-
-  echo "$SCRIPTNAME: Delete the certificate from the FIPS module"
-  echo "certutil -d ${P_R_FIPSDIR} -D -n ${FIPSCERTNICK}"
-  certutil -d ${P_R_FIPSDIR} -D -n ${FIPSCERTNICK} 2>&1
-  html_msg $? 0 "Delete the certificate from the FIPS module (certutil -D)" "."
-
-  echo "$SCRIPTNAME: List the FIPS module certificates -----------------"
-  echo "certutil -d ${P_R_FIPSDIR} -L"
-  certs=`certutil -d ${P_R_FIPSDIR} -L 2>&1`
-  ret=$?
-  if [ "${certs}" ]; then
-    ret=255
-  fi
-  html_msg $ret 0 "List the FIPS module certificates (certutil -L)" "."
-
-
-  echo "$SCRIPTNAME: Import the certificate and key from the PKCS#12 file"
-  echo "pk12util -d ${P_R_FIPSDIR} -i fips140.p12 -w ${R_FIPSP12PWFILE} -k ${R_FIPSPWFILE}"
-  pk12util -d ${P_R_FIPSDIR} -i fips140.p12 -w ${R_FIPSP12PWFILE} -k ${R_FIPSPWFILE} 2>&1
-  html_msg $? 0 "Import the certificate and key from the PKCS#12 file (pk12util -i)" "."
-
-  echo "$SCRIPTNAME: List the FIPS module certificates -----------------"
-  echo "certutil -d ${P_R_FIPSDIR} -L"
-  certs=`certutil -d ${P_R_FIPSDIR} -L 2>&1`
-  ret=$?
-  if [ ! "${certs}" ]; then
-    ret=255
-  fi
-  html_msg $ret 0 "List the FIPS module certificates (certutil -L)" "."
-
-  echo "$SCRIPTNAME: List the FIPS module keys --------------------------"
-  echo "certutil -d ${P_R_FIPSDIR} -K -f ${R_FIPSPWFILE}"
-  certutil -d ${P_R_FIPSDIR} -K -f ${R_FIPSPWFILE} 2>&1
-  html_msg $? 0 "List the FIPS module keys (certutil -K)" "."
-
-
   echo "$SCRIPTNAME: Run PK11MODE in FIPSMODE  -----------------"
   echo "pk11mode -d ${P_R_FIPSDIR} -p fips- -f ${R_FIPSPWFILE}"
   pk11mode -d ${P_R_FIPSDIR} -p fips- -f ${R_FIPSPWFILE}  2>&1
   html_msg $? 0 "Run PK11MODE in FIPS mode (pk11mode)" "."
 
   echo "$SCRIPTNAME: Run PK11MODE in Non FIPSMODE  -----------------"
   echo "pk11mode -d ${P_R_FIPSDIR} -p nonfips- -f ${R_FIPSPWFILE} -n"
   pk11mode -d ${P_R_FIPSDIR} -p nonfips- -f ${R_FIPSPWFILE} -n 2>&1