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

Lots of cleanup.

parent fa6d09b2
#!/usr/bin/perl -w
#
# GENIPUBLIC-COPYRIGHT
# Copyright (c) 2009 University of Utah and the Flux Group.
# Copyright (c) 2009-2010 University of Utah and the Flux Group.
# All rights reserved.
#
use strict;
......@@ -60,13 +60,14 @@ require GeniRegistry;
#
# The RPC context for this script is as the CH
#
my $EMULAB_PEMFILE = "@prefix@/etc/genich.pem";
my $certificate = GeniCertificate->LoadFromFile($EMULAB_PEMFILE);
my $certificate = GeniRegistry::ClearingHouse->GetCertificate();
if (!defined($certificate)) {
fatal("Could not load certificate from $EMULAB_PEMFILE");
fatal("Could not load ClearingHouse certificate");
}
Genixmlrpc->SetContext(Genixmlrpc->Context($certificate));
print $certificate->uuid() . "\n";
my $authority = GeniAuthority->Lookup($certificate->uuid());
if (!defined($authority)) {
fatal("Could not find local authority object");
......@@ -80,8 +81,7 @@ if (!defined($credential)) {
}
print "Got the credential back. Resolving ourself ...\n";
my $clearinghouse = GeniRegistry::Client->Create($authority,
undef, $credential);
my $clearinghouse = GeniRegistry::Client->Create($authority);
if (!defined($clearinghouse)) {
fatal("Could not create a clearinghouse client object");
}
......
Supports Markdown
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