Commit 9f9f9965 authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

Regenerate expired encrypted certificate instead of sending email

to user; especially important for Portal users, since there is no
interface to regenerate it.
parent da12f304
......@@ -470,17 +470,12 @@ while (my $row = $query_result->fetchrow_hashref()) {
"Encrypted Certificate for $uid expires on $expires, sending mail.\n";
if (!$impotent) {
my $phrase = (time() > $stamp ? "expired" : "is going to expire");
my $user = User->Lookup($uid_idx);
$user->SendEmail("Emulab SSL Certificate Expiring!",
"Your encrypted emulab certificate $phrase ".
"on $expires.\n".
"To generate a new certificate, please go to:\n\n".
" $TBBASE/gensslcert.php3?user=$uid_idx\n");
DBQueryWarn("update user_sslcerts set warned=now() ".
"where uid_idx='$uid_idx' and idx='$serial'");
system("$SUDO -u $PROTOUSER $MKCERT -P $uid_idx");
if ($?) {
SENDMAIL($TBOPS, "Error regenerating certificate for $uid",
"Error regenerating encrypted certificate for $uid",
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