# 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
# 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...
# 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