From 74bfeade9e856a135123e709db2205750ec5a3ae Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Mon, 28 Aug 2017 16:24:56 +0200 Subject: [PATCH] S/MIME: - Fix waring about openssl CA's bundle path --- api/src/Mail/Smime.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/api/src/Mail/Smime.php b/api/src/Mail/Smime.php index 3d3f9037b3..1ecfc9fa65 100644 --- a/api/src/Mail/Smime.php +++ b/api/src/Mail/Smime.php @@ -193,9 +193,10 @@ class Smime extends Horde_Crypt_Smime { $cert_locations = openssl_get_cert_locations(); $certs = array(); - foreach (scandir($cert_locations['default_cert_dir']) as &$file) + foreach (scandir($cert_locations['default_cert_dir']) as $file) { - if (!is_dir($cert_locations['default_cert_dir'].'/'.$file)) $certs[]= $cert_locations['default_cert_dir'].'/'.$file; + if ($file !== '..' && $file !=='.' + && !is_dir($cert_locations['default_cert_dir'].'/'.$file)) $certs[]= $cert_locations['default_cert_dir'].'/'.$file; } return $this->verify($message, $certs); }