X-Git-Url: https://git.rapsys.eu/acme/blobdiff_plain/b34ae2e0fe3b3107e465b3d2940b753c199aac17..ea6cf63c91a3b7482193c9c7faf8a169fcdd05ea:/gencert?ds=inline diff --git a/gencert b/gencert index 85e6f69..d7d178c 100755 --- a/gencert +++ b/gencert @@ -10,8 +10,11 @@ use acme; # Load POSIX use POSIX qw(EXIT_SUCCESS EXIT_FAILURE); -#XXX: debug -use Data::Dumper; +# Init prod +my $prod = 0; + +# Strip and enable prod +@ARGV = map { if ($_ eq '-p') { $prod = 1; (); } else { $_; } } @ARGV; # Show usage if (scalar(@ARGV) < 2) { @@ -23,7 +26,7 @@ if (scalar(@ARGV) < 2) { my $acme = acme->new(shift @ARGV, @ARGV); # Prepare environement -$acme->prepare(); +$acme->prepare($prod); # Generate required keys $acme->genKeys(); @@ -32,13 +35,13 @@ $acme->genKeys(); $acme->genCsr(); # Directory -$acme->directory(); +$acme->directory($prod); # Register $acme->register(); # Authorize -$acme->authorize(); +$acme->authorize($prod); # Issue $acme->issue();