From: Akos Frohner Date: Tue, 29 Aug 2006 16:04:31 +0000 (+0000) Subject: Generating an invalid VOMS certificate -- i.e. the issuer certificate is missing... X-Git-Tag: glite-security-test-utils_R_1_6_0~1 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=a5b39ed69979c72ea1d2933317eee9301ac741e7;p=glite-security-test-utils.git Generating an invalid VOMS certificate -- i.e. the issuer certificate is missing from VOMSDIR --- diff --git a/bin/generate-test-certificates.sh b/bin/generate-test-certificates.sh index 4bc202b..8e2f2fe 100755 --- a/bin/generate-test-certificates.sh +++ b/bin/generate-test-certificates.sh @@ -349,7 +349,12 @@ function create_some { # generate extra client certificates if [ -n "$EXTRACERTS" ]; then echo "Generating '$EXTRACERTS' extra certs" - for i in $(seq -f '%02g' 1 $EXTRACERTS); do + extra_ids=$(seq -f '%02g' 1 $EXTRACERTS) + if [ "$VOMS" = 'yes' ]; then + # 'wv' stands for Wrong Voms certificate + extra_ids="$extra_ids wv" + fi + for i in $extra_ids; do create_cert $CERT_DIR/${catype}_client$i "$LOGNAME client$i" client $DAYS done fi @@ -392,7 +397,7 @@ EOF # copy extra certificates if [ -n "$EXTRACERTS" ]; then echo "Copying '$EXTRACERTS' extra certs" - for i in $(seq -f '%02g' 1 $EXTRACERTS); do + for i in $extra_ids; do cp -f $CERT_DIR/${catype}_client$i.cert home/usercert$i.pem cp -f $CERT_DIR/${catype}_client$i.priv home/userkey$i.pem # set the correct permissions for globus... @@ -412,11 +417,16 @@ EOF # and some basics for the extra certs if [ -n "$EXTRACERTS" ]; then echo "Generating '$EXTRACERTS' vomsified extra certs" - for i in $(seq -f '%02g' 1 $EXTRACERTS); do + for i in $extra_ids; do create_voms home/voms$i-acme.pem \ -cert home/usercert$i.pem -key home/userkey$i.pem \ /org.acme done + + # There is an extra certificate, with supposed to be wrong + # VOMS attributes: we need to remove the issuer certificate + # from vomsdir to make it happen. + rm grid-security/vomsdir/usercertwv.pem fi fi