X-Git-Url: http://dolda2000.com/gitweb/?p=utils.git;a=blobdiff_plain;f=certreq;fp=certreq;h=74e0dd7dab5c98d389ad8b714548a4db292cb3a9;hp=142644eb3ec4814a8660f4bda93d0b5c1de47d72;hb=1b3618666413f62448f5e63e13503f704c214516;hpb=66179d530da783f984a0fedc72be566d639957cd diff --git a/certreq b/certreq index 142644e..74e0dd7 100755 --- a/certreq +++ b/certreq @@ -10,13 +10,13 @@ commajoin() { } usage() { - echo "usage: certreq [-h] [-a ALTNAMES] SUBJECT KEYFILE" + echo "usage: certreq [-h] [-a ALTNAMES] [-C] SUBJECT KEYFILE" echo ' SUBJECT is of the form `/PART1=VALUE1/PART2=VALUE2/...'\' echo ' ALTNAMES is of the form `DNS:name1,DNS:name,...'\' } declare -A reqexts config -while getopts ha: OPT; do +while getopts hCa: OPT; do case "$OPT" in h) usage @@ -27,6 +27,13 @@ while getopts ha: OPT; do config[SAN]=1 config_SAN=("${config_SAN[@]}" "subjectAltName=$OPTARG") ;; + C) + reqexts[NON_SELF_CA]=1 + config[NON_SELF_CA]=1 + config_NON_SELF_CA=("${config_NONE_SELF_CA[@]}" + "basicConstraints = critical,CA:true" + "keyUsage = cRLSign, keyCertSign") + ;; esac done shift $((OPTIND - 1))