X-Git-Url: https://git.rapsys.eu/acme/blobdiff_plain/98649bccc6a08c193cfbbbdc61b61a41808bbe13..0abcb904c6649a7b4698cf141392497a41f7b5ce:/gencert 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();