Commit f106b25e authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

When updating a cert, allow new URL to given on the command line.

parent 4a4fd836
...@@ -13,13 +13,14 @@ use Getopt::Std; ...@@ -13,13 +13,14 @@ use Getopt::Std;
# #
sub usage() sub usage()
{ {
print STDERR "Usage: $0 [-o output_file] <certfile>\n"; print STDERR "Usage: $0 [-o output_file] [-u url] <certfile>\n";
exit(-1); exit(-1);
} }
my $optlist = "i:o:"; my $optlist = "i:o:u:";
my $ascm = 0; my $ascm = 0;
my $outfile; my $outfile;
my $tmpfile; my $tmpfile;
my $url;
# Configure ... # Configure ...
my $TB = "@prefix@"; my $TB = "@prefix@";
...@@ -54,6 +55,9 @@ if (! getopts($optlist, \%options)) { ...@@ -54,6 +55,9 @@ if (! getopts($optlist, \%options)) {
if (defined($options{"o"})) { if (defined($options{"o"})) {
$outfile = 1; $outfile = 1;
} }
if (defined($options{"u"})) {
$url = $options{"u"};
}
usage() usage()
if (@ARGV != 1); if (@ARGV != 1);
my $infile = $ARGV[0]; my $infile = $ARGV[0];
...@@ -75,9 +79,9 @@ my $keyfile = $certificate->WriteKeyToFile() or ...@@ -75,9 +79,9 @@ my $keyfile = $certificate->WriteKeyToFile() or
my $urn = $certificate->urn(); my $urn = $certificate->urn();
my $uuid = $certificate->uuid(); my $uuid = $certificate->uuid();
my $url = $certificate->URL();
my $hrn = $certificate->hrn(); my $hrn = $certificate->hrn();
my $arg = "-o "; my $arg = "-o ";
$url = $certificate->URL() if (!defined($url));
if (defined($outfile)) { if (defined($outfile)) {
$arg .= $outfile; $arg .= $outfile;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment