#918: Fix regex for extracting the public key algorithm
authorMichael Tänzer <neo@nhng.de>
Thu, 7 Apr 2011 03:37:02 +0000 (05:37 +0200)
committerMichael Tänzer <neo@nhng.de>
Thu, 7 Apr 2011 03:37:02 +0000 (05:37 +0200)
#918: "Weak keys in certificates"

Signed-off-by: Michael Tänzer <neo@nhng.de>
includes/account_stuff.php

index a38890e..e19879c 100644 (file)
@@ -373,7 +373,7 @@ function hideall() {
                $spkacText = `echo $spkac | openssl spkac -spkac $spkacname`;
                
                /* Which public key algorithm? */
-               if (!preg_match('/^\s*Public Key Algorithm: ([^\s])$/m', $spkacText,
+               if (!preg_match('/^\s*Public Key Algorithm: ([^\s]+)$/m', $spkacText,
                                $algorithm))
                {
                        trigger_error("checkWeakKeySPKAC(): Couldn't extract the public ".
@@ -443,7 +443,7 @@ function hideall() {
        function checkWeakKeyText($text)
        {
                /* Which public key algorithm? */
-               if (!preg_match('/^\s*Public Key Algorithm: ([^\s])$/m', $text,
+               if (!preg_match('/^\s*Public Key Algorithm: ([^\s]+)$/m', $text,
                                $algorithm))
                {
                        trigger_error("checkWeakKeyText(): Couldn't extract the public ".