summaryrefslogtreecommitdiff
path: root/www/gpg.php
diff options
context:
space:
mode:
authorBenny Baumann <BenBE@geshi.org>2014-03-21 01:26:52 +0100
committerBenny Baumann <BenBE@geshi.org>2014-03-21 01:26:52 +0100
commit75439b2e684bf1fd58a112cfd57779d104e78d78 (patch)
tree5ba7290efc5f64d893d6f0d25726b644ffd36fa6 /www/gpg.php
parentd9f88e530a728c631f31ed01e113b084fb596c7b (diff)
parentea9f9d8d7f0b8f196161333384da2b814ac973fe (diff)
downloadcacert-devel-75439b2e684bf1fd58a112cfd57779d104e78d78.tar.gz
cacert-devel-75439b2e684bf1fd58a112cfd57779d104e78d78.tar.xz
cacert-devel-75439b2e684bf1fd58a112cfd57779d104e78d78.zip
Merge branch 'bug-1184' into testserver-stable
Diffstat (limited to 'www/gpg.php')
-rw-r--r--www/gpg.php16
1 files changed, 8 insertions, 8 deletions
diff --git a/www/gpg.php b/www/gpg.php
index 829bbcf..263c1d3 100644
--- a/www/gpg.php
+++ b/www/gpg.php
@@ -187,18 +187,18 @@ function verifyEmail($email)
// Name (Comment) <Email>
if(preg_match("/^([^\(\)\[@<>]+) \(([^\(\)@<>]*)\) <([\w=\/%.-]*\@[\w.-]*|[\w.-]*\![\w=\/%.-]*)>/",$bits[9],$matches))
{
- $name=trim(hex2bin($matches[1]));
+ $name=trim(gpg_hex2bin($matches[1]));
$nocomment=0;
- $comm=trim(hex2bin($matches[2]));
- $mail=trim(hex2bin($matches[3]));
+ $comm=trim(gpg_hex2bin($matches[2]));
+ $mail=trim(gpg_hex2bin($matches[3]));
}
// Name <EMail>
elseif(preg_match("/^([^\(\)\[@<>]+) <([\w=\/%.-]*\@[\w.-]*|[\w.-]*\![\w=\/%.-]*)>/",$bits[9],$matches))
{
- $name=trim(hex2bin($matches[1]));
+ $name=trim(gpg_hex2bin($matches[1]));
$nocomment=1;
$comm="";
- $mail=trim(hex2bin($matches[2]));
+ $mail=trim(gpg_hex2bin($matches[2]));
}
// Unrecognized format
else
@@ -357,13 +357,13 @@ function verifyEmail($email)
$pos = strlen($bits[9]);
}
- $name = trim(hex2bin(trim(substr($bits[9], 0, $pos))));
+ $name = trim(gpg_hex2bin(trim(substr($bits[9], 0, $pos))));
$nameok=verifyName($name);
if($nocomment == 0)
{
$pos += 2;
$pos2 = strpos($bits[9], ")");
- $comm = trim(hex2bin(trim(substr($bits[9], $pos, $pos2 - $pos))));
+ $comm = trim(gpg_hex2bin(trim(substr($bits[9], $pos, $pos2 - $pos))));
if($comm != "")
$comment[] = $comm;
$pos = $pos2 + 3;
@@ -374,7 +374,7 @@ function verifyEmail($email)
$mail="";
if (preg_match("/<([\w.-]*\@[\w.-]*)>/", $bits[9],$match)) {
//echo "Found: ".$match[1];
- $mail = trim(hex2bin($match[1]));
+ $mail = trim(gpg_hex2bin($match[1]));
}
else
{