Commit 51970d9a authored by Gary Wong's avatar Gary Wong
Browse files

Allow registration of slice embedding services with the clearinghouse.

parent 3a726fca
......@@ -310,7 +310,7 @@ sub Register($)
my $info = $argref->{'info'};
my $type = $argref->{'type'};
if (! (defined($type) && ($type =~ /^(SA|MA|CM|Component|Slice|User)$/i))){
if (! (defined($type) && ($type =~ /^(SA|MA|CM|SES|Component|Slice|User)$/i))){
return GeniResponse->MalformedArgsResponse();
}
$type = lc($type);
......@@ -523,7 +523,7 @@ sub Register($)
}
return GeniResponse->Create(GENIRESPONSE_SUCCESS);
}
if ($type eq "cm" || $type eq "sa") {
if ($type eq "cm" || $type eq "sa" || $type eq "ses") {
#
# Check for an existing authority.
#
......
......@@ -499,13 +499,12 @@ my $sescert = GeniCertificate->LoadFromFile($SESCERT);
if (!defined($sescert)) {
fatal("Could not load certificate from $SESCERT\n");
}
# Maybe we want to register random services (like the SES) with
# the clearing house. Maybe not. But it can't currently cope with
# SES registries in any case, so leave this commented out for now.
#print "Registering SES cert at the clearinghouse.\n";
#if ($clearinghouse->Register("SES", $sescert->cert())) {
# fatal("Could not register SES cert at the clearinghouse");
#}
# Don't treat SES registration failure as a fatal error quite yet, until
# we're certain that server-side support exists everywhere.
print "Registering SES cert at the clearinghouse.\n";
if ($clearinghouse->Register("SES", $sescert->cert())) {
print("Warning: could not register SES cert at the clearinghouse\n");
}
#
# Local SiteVars to hold the UUIDs.
......
#
# Add an "ses" entry in the authority type enum.
#
use strict;
use GeniDB;
sub DoUpdate($$$)
{
my ($dbhandle, $dbname, $version) = @_;
DBSetDefault($dbhandle);
DBQueryFatal( "ALTER TABLE `geni_authorities` " .
"MODIFY `type` enum( 'sa', 'ma', 'ch', 'cm', 'ses' ) " .
"NOT NULL DEFAULT 'sa'" );
return 0;
}
1;
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