Alternative way of lsc construction
authorZdeněk Šustr <sustr4@cesnet.cz>
Fri, 24 Feb 2012 14:12:17 +0000 (14:12 +0000)
committerZdeněk Šustr <sustr4@cesnet.cz>
Fri, 24 Feb 2012 14:12:17 +0000 (14:12 +0000)
org.glite.testsuites.ctb/gridsite/tests/gridsite-test-all.sh

index 23676cd..03dc337 100755 (executable)
@@ -395,14 +395,16 @@ EOF
                do
                        if [ -f $vomsfile ]; then
                                VOMSHOSTONLY=`cat $vomsfile | awk '{ print $2 }' | sed 's/"//g'`
-                               VOMSHOST=`cat $vomsfile | awk '{ print $2 ":" $3; }' | sed 's/"//g'`
-                               VONAME=`cat $vomsfile | awk '{ print $1 }' | sed 's/"//g'`
-                               openssl s_client -connect $VOMSHOST 2>&1 | grep "^depth" | sed 's/^depth=//' | sort -r -n > $VOMSHOSTONLY.$$.DNs.txt
-                               VOMSCERT=`tail -n 1 $VOMSHOSTONLY.$$.DNs.txt | sed -r 's/^[0-9]+\s+//'`
-                               VOMSCA=`grep -E "^1[ \t]" $VOMSHOSTONLY.$$.DNs.txt | sed -r 's/^[0-9]+\s+//'`
+#                              VOMSHOST=`cat $vomsfile | awk '{ print $2 ":" $3; }' | sed 's/"//g'`
+#                              VONAME=`cat $vomsfile | awk '{ print $1 }' | sed 's/"//g'`
+#                              openssl s_client -connect $VOMSHOST 2>&1 | grep "^depth" | sed 's/^depth=//' | sort -r -n > $VOMSHOSTONLY.$$.DNs.txt
+#                              VOMSCERT=`tail -n 1 $VOMSHOSTONLY.$$.DNs.txt | sed -r 's/^[0-9]+\s+//'`
+#                              VOMSCA=`grep -E "^1[ \t]" $VOMSHOSTONLY.$$.DNs.txt | sed -r 's/^[0-9]+\s+//'`
 
                                mkdir -p /etc/grid-security/vomsdir/$VONAME
-                               printf "$VOMSCERT\n$VOMSCA\n" > /etc/grid-security/vomsdir/$VONAME/$VOMSHOSTONLY.lsc
+#                              printf "$VOMSCERT\n$VOMSCA\n" > /etc/grid-security/vomsdir/$VONAME/$VOMSHOSTONLY.lsc
+
+                               voms-proxy-info -all | grep -A 100 "extension information" | grep -E "^subject|^issuer" | awk '{ print $3 }' > /etc/grid-security/vomsdir/$VONAME/$VOMSHOSTONLY.lsc
                                echo Generated /etc/grid-security/vomsdir/$VONAME/$VOMSHOSTONLY.lsc
 
                                rm $VOMSHOSTONLY.$$.DNs.txt