Commit 620d0c19 authored by Leigh B. Stoller's avatar Leigh B. Stoller

Fix up the date parsing for CRL expired field so that it does not

go into the DB as null.
parent 7de25b9a
#!/usr/bin/perl -wT
#
# EMULAB-COPYRIGHT
# Copyright (c) 2008 University of Utah and the Flux Group.
# Copyright (c) 2008-2009 University of Utah and the Flux Group.
# All rights reserved.
#
package GeniCertificate;
......@@ -413,9 +413,11 @@ sub StoreCRL($$$)
$expires =~ s/^nextupdate=//i;
my $safe_cert = DBQuoteSpecial($string);
my $safe_expires = DBQuoteSpecial($expires);
my $dateconvert = "DATE_SUB(STR_TO_DATE($safe_expires, ".
"'%b %e %T %Y'), INTERVAL 1 DAY)";
DBQueryWarn("replace into geni_crls set ".
" uuid='$uuid', created=now(), expires=$safe_expires, ".
" uuid='$uuid', created=now(), expires=$dateconvert, ".
" cert=$safe_cert")
or return -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