bug 1288: Accept STARTTLS as last option
authorBenny Baumann <BenBE@geshi.org>
Sun, 30 Nov 2014 00:31:25 +0000 (01:31 +0100)
committerBenny Baumann <BenBE@geshi.org>
Sun, 30 Nov 2014 00:31:25 +0000 (01:31 +0100)
includes/general.php

index 57268dc..ac9ac87 100644 (file)
                                        fputs($fp, "EHLO www.cacert.org\r\n");
                                        do {
                                                $line = fgets($fp, 4096);
-                                               $has_starttls |= trim($line) == "250-STARTTLS";
+                                               $has_starttls |= substr(trim($line),4) == "STARTTLS";
                                        } while(substr($line, 0, 4) == "250-");
                                        if(substr($line, 0, 3) != "250") {
                                                fclose($fp);