Compare commits

..

3 commits

Author SHA1 Message Date
9300b1742e Updated to match upstream changes 2024-10-16 07:11:25 -04:00
bb55d35d92 Merge branch 'main' into fix/bug-1550a 2024-10-16 11:07:31 +00:00
df9d604168 Revised commit of 3.php to limit it to the bare minimum.
The selection of Root Certicate type has been removed and only the Type 3
will be generated.
2024-10-06 20:15:11 -04:00
2 changed files with 8 additions and 15 deletions

View file

@ -40,9 +40,6 @@ my $paranoid=1;
my $debug=0; my $debug=0;
# number of attempts before giving up
my $warn_threshold = 3;
#my $serialport="/dev/ttyS0"; #my $serialport="/dev/ttyS0";
my $serialport="/dev/ttyUSB0"; my $serialport="/dev/ttyUSB0";
@ -737,9 +734,7 @@ sub HandleCerts($$)
SysLog "HandleCerts $table\n"; SysLog "HandleCerts $table\n";
my $sth = $dbh->prepare(sprintf( my $sth = $dbh->prepare("select * from $table where crt_name='' and csr_name!='' and warning<3");
"select * from %s where crt_name='' and csr_name!='' and warning<%d", $table, $warn_threshold
));
$sth->execute(); $sth->execute();
#$rowdata; #$rowdata;
while ( my $rowdata = $sth->fetchrow_hashref() ) while ( my $rowdata = $sth->fetchrow_hashref() )
@ -909,7 +904,7 @@ sub HandleCerts($$)
else else
{ {
SysLog("Could not find the issued certificate. $crtname ".$row{"id"}."\n"); SysLog("Could not find the issued certificate. $crtname ".$row{"id"}."\n");
$dbh->do(sprintf("update %s set warning=warning+1 where id=%d", $table, $row{'id'})); $dbh->do("update `$table` set warning=warning+1 where `id`='".$row{'id'}."'");
} }
} }
} }
@ -1083,9 +1078,7 @@ sub sendRevokeMail()
sub HandleGPG() sub HandleGPG()
{ {
my $sth = $dbh->prepare(sprintf( my $sth = $dbh->prepare("select * from gpg where crt='' and csr!='' ");
"select * from gpg where crt='' and csr!='' and warning<%d", $warn_threshold
));
$sth->execute(); $sth->execute();
my $rowdata; my $rowdata;
while ( $rowdata = $sth->fetchrow_hashref() ) while ( $rowdata = $sth->fetchrow_hashref() )
@ -1151,7 +1144,7 @@ sub HandleGPG()
sendmail($user{email}, "[CAcert.org] Your GPG/PGP Key", $body, "support\@cacert.org", "", "", "CAcert Support"); sendmail($user{email}, "[CAcert.org] Your GPG/PGP Key", $body, "support\@cacert.org", "", "", "CAcert Support");
} else { } else {
SysLog("Could not find the issued gpg key. ".$row{"id"}."\n"); SysLog("Could not find the issued gpg key. ".$row{"id"}."\n");
$dbh->do(sprintf("update gpg set warning=warning+1 where id=%d", $row{'id'})); #$dbh->do("delete from `gpg` where `id`='".$row{'id'}."'");
} }
} }
} }

View file

@ -1,6 +1,6 @@
<? /* <? /*
LibreSSL - CAcert web application LibreSSL - CAcert web application
Copyright (C) 2004-2008 CAcert Inc. Copyright (C) 2004-2024 CAcert Inc.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@ -103,9 +103,9 @@
?> ?>
<tr> <tr>
<td class="DataTD" colspan="2" align="left"> <td class="DataTD" colspan="2" align="left">
<input type="radio" id="root1" name="rootcert" value="1" /> <label for="root1"><?=_("Sign by class 1 root certificate")?></label><br /> <!-- <input type="radio" id="root1" name="rootcert" value="1" /> <label for="root1"><?=_("Sign by class 1 root certificate")?></label><br /> -->
<input type="radio" id="root2" name="rootcert" value="2" checked="checked"/> <label for="root2"><?= _("Sign by class 3 root certificate") ?></label><br/> <input type="hidden" id="root2" name="rootcert" value="2" checked="checked"/> <label for="root2"><?= _("Sign by class 3 root certificate") ?></label><br/>
<?= str_replace("\n", "<br />\n", wordwrap(_("Please note: If you use a certificate signed by the class 3 root, the class 3 root certificate needs to be imported into your email program as well as the class 1 root certificate so your email program can build a full trust path chain."), 125 ) ) ?> <?= str_replace("\n", "<br />\n", wordwrap(_("Please note: both the class 1 and class 3 root certificates need to be imported into your email program so that your email program can build a full trust path chain."), 125 ) ) ?>
</td> </td>
</tr> </tr>
<? } ?> <? } ?>