Include accountname in totp url
[mirror/userdir-ldap-cgi.git] / Util.pm
diff --git a/Util.pm b/Util.pm
index 92974b3..c292a1a 100644 (file)
--- a/Util.pm
+++ b/Util.pm
@@ -1,7 +1,7 @@
 # -*- perl -*-x
 
 # Copyright (c) 1999-2006  Debian Admin Team Members and Developers    (taken from debian/copyright in 2008 by weasel)
-# Copyright (c) 2002, 2003, 2004, 2008 Peter Palfrader
+# Copyright (c) 2002, 2003, 2004, 2008, 2009, 2011, 2012, 2014, 2015 Peter Palfrader
 
 package Util;
 
@@ -416,10 +416,7 @@ sub UpgradeConnection($) {
   my ($ldap) = @_;
   my $mesg = $ldap->start_tls(
                           verify => 'require',
-                          # Cannot specify the server cert, must specify the CA cert
-                          #cafile => '/etc/ssl/servicecerts/db.debian.org.crt'
-                          #cafile => '/etc/ssl/certs/UTN_USERFirst_Hardware_Root_CA.pem'
-                          cafile => '/usr/share/ca-certificates/mozilla/AddTrust_External_Root.crt'
+                          cafile => $config{sslcafile},
                           );
   $mesg->sync;
   if ($mesg->code != LDAP_SUCCESS) {
@@ -477,7 +474,7 @@ sub readwrite3($$$$) {
       }
     }
 
-    next unless (defined(@$readyr)); # Wait some more.
+    next unless (@$readyr); # Wait some more.
 
     for my $rfd (@$readyr) {
       if ($rfd->eof) {