Skip to content
Snippets Groups Projects
Commit 5fc2e70f authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

Update to current; had suffered bitrot.

parent 3f334c26
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/perl -w
#
# GENIPUBLIC-COPYRIGHT
# Copyright (c) 2008-2009 University of Utah and the Flux Group.
# Copyright (c) 2008-2010 University of Utah and the Flux Group.
# All rights reserved.
#
use strict;
......@@ -12,17 +12,33 @@ use Data::Dumper;
# Configure variables
#
my $TB = "@prefix@";
my $SACERT = "$TB/etc/genisa.pem";
# Geni libraries.
use lib "@prefix@/lib";
use Genixmlrpc;
use GeniCertificate;
my $cert = shift(@ARGV);
my $server = shift(@ARGV);
my $method = shift(@ARGV);
#
# Load the SA cert to act as caller context.
#
my $certificate = GeniCertificate->LoadFromFile($cert);
if (!defined($certificate)) {
print STDERR "*** Could not load certificate from $SACERT\n";
exit(1);
}
my $context = Genixmlrpc->Context($certificate);
if (!defined($context)) {
print STDERR "*** Could not create context to talk to clearinghouse\n";
exit(1);
}
my $response =
Genixmlrpc::CallMethodHTTP("https://$server/protogeni/xmlrpc", undef,
$method, @ARGV);
Genixmlrpc::CallMethod($server, $context, $method, @ARGV);
print Dumper($response);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment