Bug 444308: Fixed certs validity in IOPR tests. r=alexei
authorslavomir.katuscak%sun.com
Thu, 10 Jul 2008 10:22:11 +0000
changeset 8667 0753de988b0bbd04eab664a19cad180d9e524e0e
parent 8666 79c751cfae2a42d5662d912bb739eb7746848968
child 8668 14a5536aafde0558afe24a5660d42536c0637b35
push idunknown
push userunknown
push dateunknown
reviewersalexei
bugs444308
Bug 444308: Fixed certs validity in IOPR tests. r=alexei
security/nss/tests/iopr/cert_iopr.sh
--- a/security/nss/tests/iopr/cert_iopr.sh
+++ b/security/nss/tests/iopr/cert_iopr.sh
@@ -284,21 +284,25 @@ download_install_certs() {
             CERTNAME=$HOSTADDR
             
             CU_ACTION="Generate Cert Request for $CERTNAME (ws: $host)"
             CU_SUBJECT="CN=$CERTNAME, E=${CERTNAME}@bogus.com, O=BOGUS NSS, \
                         L=Mountain View, ST=California, C=US"
             certu -R -d "${sslServerDir}" -f "${R_PWFILE}" -z "${R_NOISE_FILE}"\
                 -o $sslServerDir/req 2>&1
             tmpFiles="$tmpFiles $sslServerDir/req"
-            
-            
+
+            # NOTE:
+            # For possible time synchronization problems (bug 444308) we generate
+            # certificates valid also some time in past (-w -1)
+
             CU_ACTION="Sign ${CERTNAME}'s Request (ws: $host)"
-            certu -C -c "$caCertName" -m `date +"%s"` -v 60 -d "${caDir}" \
-                -i  ${sslServerDir}/req -o $caDir/${CERTNAME}.cert \
+            certu -C -c "$caCertName" -m `date +"%s"` -v 60 -w -1 \
+                -d "${caDir}" \
+                -i ${sslServerDir}/req -o $caDir/${CERTNAME}.cert \
                 -f "${R_PWFILE}" 2>&1
             
             importFile $sslServerDir $caDir/$CERTNAME.cert $CERTNAME ",,"
             RET=$?
             if [ $RET -ne 0 ]; then
                 html_failed "Fail to import $CERTNAME cert to server\
                              DB(ws: $host)" 
                 return $RET