Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

-signCA got parameters -file -out -name -policy

-signCA's behaiviour can now be modified with -file=<filename> to change
from the default input file, -out=<filename> to move the default output
filename, -name=<prefix> modifies the default filenames for input and
output where they are unspecified, -policy=<section> determines which
policy to use and defaults to policy_anything when unspecified.
  • Loading branch information...
commit 607d1679fd4459542def1462ce9a1ed00d557cf0 1 parent de5735b
CarbonLifeForm authored December 13, 2011

Showing 1 changed file with 19 additions and 3 deletions. Show diff stats Hide diff stats

  1. 22  CA.sh
22  CA.sh
@@ -274,12 +274,28 @@ case $1 in
274 274
     RET=$?
275 275
     cat $outfile
276 276
     echo "Signed certificate is in $outfile"
277  
-    unset polset infile fileprefix outfile
  277
+    unset polset infile fileprefix outfile ext
278 278
     ;;
279 279
 -signCA)
280  
-    $CA -policy policy_anything -out newcert.pem -extensions v3_ca -infiles newreq.pem
  280
+    until (is_mode $2) 
  281
+    do
  282
+	shift
  283
+	case $1 in
  284
+	    -policy=*) polset="${1#-*=}"
  285
+		;;
  286
+	    -out=*) outfile="${1#-*=}"
  287
+		;;
  288
+	    -file=*) infile="${1#-*=}"
  289
+		;;
  290
+	    -name=*) fileprefix="${1#-*=}"
  291
+		;;
  292
+	esac
  293
+    done
  294
+
  295
+    $CA -policy ${polset:-policy_anything} -out ${outfile:=${fileprefix:-new}cert.pem} -extensions v3_ca -infiles ${infile:-${fileprefix:-new}req.pem}
281 296
     RET=$?
282  
-    echo "Signed CA certificate is in newcert.pem"
  297
+    echo "Signed CA certificate is in $outfile"
  298
+    unset polset outfile infile fileprefix
283 299
     ;;
284 300
 -signcert)
285 301
     echo "Cert passphrase will be requested twice - bug?"

0 notes on commit 607d167

Please sign in to comment.
Something went wrong with that request. Please try again.