diff --git a/README.rst b/README.rst index b9982ad5e26f32b8bf7af763adc5b6cbb296fcd2..0077337afadfffd301293d469f53002bbd170c06 100644 --- a/README.rst +++ b/README.rst @@ -47,7 +47,7 @@ Example config -------------- :: - # This file is sourced by the shell script program, so comments start with # + # This file is sourced by ssl-ca, so comments start with # # and usual shell evaluation and variables can be used. # No setting is mandatory and missing setting will be left blank or the # default value will be used. diff --git a/ssl-ca b/ssl-ca index 8d1c3ca579089909059ec7297874dc7122bfc2b4..0b68b1eb5de68ddede36a4e7129b7f75d1520ce1 100755 --- a/ssl-ca +++ b/ssl-ca @@ -1,21 +1,45 @@ #!/bin/sh -e -usage () -{ +default_config=\ +"# This file is sourced by the shell script program, so comments start with # +# and usual shell evaluation and variables can be used. +# No setting is mandatory and missing setting will be left blank or the +# default value will be used. +keysize=2048 +keytype='rsa' +cipher='aes256' +days=365 +countrycode='US' +state='Somewhere' +locality='Some other place.' +orgname='Acme' +orgunit='Widgets' +email='hostmaster@example.com'" + +usage () { + cat /dev/null } -init () -{ +init () { + if [ -a "$1" ] + then + echo "$1 already exists." + exit 1 + fi + mkdir "$1" + mkdir "$1/certs" + mkdir "$1/keys" + echo "$default_config" > config } -sign_key () -{ +sign_key () { + cat /dev/null } -gen_key () -{ +gen_key () { + cat /dev/null } -ca_gen () -{ +ca_gen () { + cat /dev/null }