summaryrefslogtreecommitdiff
path: root/scripts/DumpWeakCerts.pl
diff options
context:
space:
mode:
authorMichael Tänzer <neo@nhng.de>2011-03-28 00:11:25 +0200
committerMichael Tänzer <neo@nhng.de>2011-03-28 00:11:25 +0200
commita706b59b4c033466916a923264ac12e1c164a432 (patch)
tree1d10513b077589c1a075da75bddb094be36e422f /scripts/DumpWeakCerts.pl
parent7a296469f7d4aa0a5e6d646780357979db04dfdc (diff)
downloadcacert-devel-a706b59b4c033466916a923264ac12e1c164a432.tar.gz
cacert-devel-a706b59b4c033466916a923264ac12e1c164a432.tar.xz
cacert-devel-a706b59b4c033466916a923264ac12e1c164a432.zip
#918: Weak keys in certificates
Detection script: Name variables in a consistant way Signed-off-by: Michael Tänzer <neo@nhng.de>
Diffstat (limited to 'scripts/DumpWeakCerts.pl')
-rwxr-xr-xscripts/DumpWeakCerts.pl9
1 files changed, 5 insertions, 4 deletions
diff --git a/scripts/DumpWeakCerts.pl b/scripts/DumpWeakCerts.pl
index cecdad5..dc6030c 100755
--- a/scripts/DumpWeakCerts.pl
+++ b/scripts/DumpWeakCerts.pl
@@ -21,6 +21,7 @@ my $sth_userdata;
my $cert_domid;
my $cert_userid;
+my $cert_orgid;
my $cert_CN;
my $cert_expire;
my $cert_filename;
@@ -119,10 +120,10 @@ $sth_userdata = $dbh->prepare(
" FROM `users` AS `u`, `org` ".
" WHERE `u`.`id`=`org`.`memid` and `org`.`orgid`=?");
-while(($cert_userid, $cert_CN, $cert_expire, $cert_filename) = $sth_certs->fetchrow_array) {
+while(($cert_orgid, $cert_CN, $cert_expire, $cert_filename) = $sth_certs->fetchrow_array) {
if (-f $cert_filename) {
if (IsWeak($cert_filename)) {
- $sth_userdata->execute($cert_userid);
+ $sth_userdata->execute($cert_orgid);
while(($user_email, $user_firstname) = $sth_userdata->fetchrow_array()) {
print join("\t", ('OrgServerCert', $user_email, $user_firstname, $cert_expire, $cert_CN)). "\n";
}
@@ -144,10 +145,10 @@ $sth_userdata = $dbh->prepare(
" FROM `users` AS `u`, `org` ".
" WHERE `u`.`id`=`org`.`memid` and `org`.`orgid`=?");
-while(($cert_userid, $cert_CN, $cert_expire, $cert_filename) = $sth_certs->fetchrow_array) {
+while(($cert_orgid, $cert_CN, $cert_expire, $cert_filename) = $sth_certs->fetchrow_array) {
if (-f $cert_filename) {
if (IsWeak($cert_filename)) {
- $sth_userdata->execute($cert_userid);
+ $sth_userdata->execute($cert_orgid);
while(($user_email, $user_firstname) = $sth_userdata->fetchrow_array()) {
print join("\t", ('OrgEmailCert', $user_email, $user_firstname, $cert_expire, $cert_CN)). "\n";
}