Commit b9470101 authored by Robert Ricci's avatar Robert Ricci

Implement the read-cert-from-file function

parent a9c2caef
......@@ -123,8 +123,6 @@ if ($opt{u}) {
$target_urn = GeniHRN::Generate( $OURDOMAIN, "user", "$opt{u}" );
}
print "Looking up '$target_urn'\n";
my $user = GeniUser->Lookup($target_urn,1);
if (!defined($user)) { die "Unable to lookup user $opt{u}\n"; }
......@@ -139,7 +137,10 @@ if ($opt{u}) {
while (<FILE>) { $owner_cert .= $_; }
close FILE;
die "Not yet implemented!\n";
$cert = GeniCertificate->LoadFromString($owner_cert);
if (!$cert) {
die "Unable to read certificate from $opt{c}\n";
}
}
......@@ -158,8 +159,6 @@ if ($opt{e}) {
#
my $target_cm_string = GeniHRN::Generate( $OURDOMAIN, "authority", "cm" );
print "'$target_cm_string'\n";
my $val = CreateCredential($cert,$target_cm_string,$num_days,$expire_days);
print $val;
......
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