From 5787ab861accd7fa4552ca88ad9723ceed940c06 Mon Sep 17 00:00:00 2001 From: Adar Nimrod <nimrod@shore.co.il> Date: Wed, 4 Nov 2015 13:33:11 +0200 Subject: [PATCH] Correct usage. --- README.rst | 2 +- ssl-ca | 44 ++++++++++++++++++++++++++++++++++---------- 2 files changed, 35 insertions(+), 11 deletions(-) diff --git a/README.rst b/README.rst index b9982ad..0077337 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 8d1c3ca..0b68b1e 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 } -- GitLab