6950931: test fails on windows sun/security/tools/jarsigner/crl.sh
authorweijun
Tue, 01 Jun 2010 10:52:42 +0800
changeset 5628 69ccc826b016
parent 5627 e636ac7a63a4
child 5629 41a5aa28250e
child 5772 030ac5c2e62c
6950931: test fails on windows sun/security/tools/jarsigner/crl.sh Reviewed-by: wetmore, xuelei
jdk/test/sun/security/tools/jarsigner/crl.sh
--- a/jdk/test/sun/security/tools/jarsigner/crl.sh	Fri May 28 12:10:14 2010 -0700
+++ b/jdk/test/sun/security/tools/jarsigner/crl.sh	Tue Jun 01 10:52:42 2010 +0800
@@ -22,8 +22,8 @@
 #
 
 # @test
-# @bug 6890876
-# @summary jarsigner can add CRL info into signed jar
+# @bug 6890876 6950931
+# @summary jarsigner can add CRL info into signed jar (updated)
 #
 
 if [ "${TESTJAVA}" = "" ] ; then
@@ -53,7 +53,7 @@
 JAR=$TESTJAVA${FS}bin${FS}jar
 JARSIGNER=$TESTJAVA${FS}bin${FS}jarsigner
 
-rm $KS $JFILE
+rm $KS $JFILE 2> /dev/null
 
 # Generates some crl files, each containing two entries
 
@@ -63,8 +63,9 @@
 $KT -alias b -dname CN=b -keyalg rsa -genkey -validity 300
 $KT -alias b -gencrl -id 5:1 -id 6:2 -file crl3
 
+$TESTJAVA${FS}bin${FS}jrunscript -e 'println(new File("crl1").toURI())' > uri
 $KT -alias c -dname CN=c -keyalg rsa -genkey -validity 300 \
-    -ext crl=uri:file://`pwd`/crl1
+    -ext crl=uri:`cat uri`
 
 echo A > A
 
@@ -80,9 +81,9 @@
 
 $JAR cvf $JFILE A
 $JARSIGNER -keystore $KS -storepass changeit $JFILE a \
-        -crl crl1 -crl crl2 || exit 1
+        -crl crl1 -crl crl2 || exit 2
 $JARSIGNER -keystore $KS -storepass changeit $JFILE b \
-        -crl crl3 -crl crl2 || exit 1
+        -crl crl3 -crl crl2 || exit 3
 $JARSIGNER -keystore $KS -verify -debug -strict $JFILE || exit 3
 $KT -printcert -jarfile $JFILE | grep CRLs || exit 4
 CRLCOUNT=`$KT -printcert -jarfile $JFILE | grep SerialNumber | wc -l`