Commit 8a9cb724 authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

Remove temporary file.

parent 3650e27f
#!/usr/bin/perl -wT
#
# GENIPUBLIC-COPYRIGHT
# Copyright (c) 2008-2011 University of Utah and the Flux Group.
# Copyright (c) 2008-2012 University of Utah and the Flux Group.
# All rights reserved.
#
package GeniCredential;
......@@ -708,10 +708,11 @@ sub Sign($$)
# a certificate object in the DB.
#
my $certificate;
my $certfile;
if (ref($how)) {
# This will auto delete too.
my $certfile = $how->certfile() || $how->WriteToFile(1);
$certfile = $how->certfile() || $how->WriteToFile(1);
if (!defined($certfile)) {
print STDERR "Could not write $how to temp file\n";
return -1;
......@@ -756,6 +757,8 @@ sub Sign($$)
}
$self->{'string'} = $credential;
unlink($filename);
unlink($certfile)
if (defined($certfile) && -e $certfile);
return 0;
}
......
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