Commit 43b2c87e authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

Little tweaks to make sure that CRLs are deleted when

removing a SA from the ClearingHouse.
parent 6198efe1
#!/usr/bin/perl -wT
#
# 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.
#
package GeniCertificate;
......@@ -587,6 +587,21 @@ sub StoreCRL($$$)
return 0;
}
#
# Remove a CRL.
#
sub DeleteCRL($$)
{
my ($class, $authority) = @_;
my $uuid = $authority->uuid();
DBQueryWarn("delete from geni_crls where uuid='$uuid'")
or return -1;
return 0;
}
############################################################################
#
# Wrapper for local users.
......
#!/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;
......@@ -66,6 +66,7 @@ elsif ($authority->type() eq "sa") {
if (GeniUser->DeleteAll($authority) != 0) {
fatal("Could not delete users for $authority");
}
GeniCertificate->DeleteCRL($authority);
}
elsif ($authority->type() eq "ses") {
# Nothing to do.
......@@ -73,6 +74,7 @@ elsif ($authority->type() eq "ses") {
else {
fatal("Do not know how to delete $authority");
}
if ($authority->Delete() != 0) {
fatal("Could not delete components for $authority");
}
......
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