- \?) echo keygen [-h hostname for cert] [-y years to issue cert] [-e entityID to embed in cert]
+ \?) echo "keygen [-o output directory (default .)] [-u username to own keypair] [-g owning groupname] [-h hostname for cert] [-y years to issue cert] [-e entityID to embed in cert]"
exit 1;;
esac
done
exit 1;;
esac
done
+if [ -z "$OUT" ] ; then
+ OUT=.
+fi
if [ -n "$FORCE" ] ; then
if [ -n "$FORCE" ] ; then
- rm sp-key.pem sp-cert.pem
+ rm $OUT/sp-key.pem $OUT/sp-cert.pem
fi
fi
-if [ -s sp-key.pem -o -s sp-cert.pem ] ; then
+if [ -s $OUT/sp-key.pem -o -s $OUT/sp-cert.pem ] ; then
if [ -z "$BATCH" ] ; then
if [ -z "$BATCH" ] ; then
- echo The files sp-key.pem and/or sp-cert.pem already exist!
+ echo The files $OUT/sp-key.pem and/or $OUT/sp-cert.pem already exist!
echo Use -f option to force recreation of keypair.
exit 2
fi
echo Use -f option to force recreation of keypair.