mirror of
https://github.com/the-djmaze/snappymail.git
synced 2024-09-20 15:45:55 +08:00
Fix S/MIME certificates cache handling
This commit is contained in:
parent
4b8a295fbe
commit
196dffa8d8
|
@ -27,12 +27,12 @@ class OpenSSL
|
|||
|
||||
public function certificates() : array
|
||||
{
|
||||
$keys = [];
|
||||
|
||||
$cacheFile = "{$this->homedir}/certificates.json";
|
||||
if (\file_exists($cacheFile)) {
|
||||
$keys = \json_decode(\file_get_contents($cacheFile), true);
|
||||
} else {
|
||||
$result = \file_exists($cacheFile)
|
||||
? \json_decode(\file_get_contents($cacheFile), true)
|
||||
: null;
|
||||
if (!\is_array($result)) {
|
||||
$keys = [];
|
||||
foreach (\glob("{$this->homedir}/*.key") as $file) {
|
||||
$data = \file_get_contents($file);
|
||||
// Can't check ENCRYPTED PRIVATE KEY
|
||||
|
|
Loading…
Reference in a new issue