mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-07 16:37:02 +03:00
Fix S/MIME certificates cache handling
This commit is contained in:
parent
4b8a295fbe
commit
196dffa8d8
1 changed files with 5 additions and 5 deletions
|
|
@ -27,12 +27,12 @@ class OpenSSL
|
||||||
|
|
||||||
public function certificates() : array
|
public function certificates() : array
|
||||||
{
|
{
|
||||||
$keys = [];
|
|
||||||
|
|
||||||
$cacheFile = "{$this->homedir}/certificates.json";
|
$cacheFile = "{$this->homedir}/certificates.json";
|
||||||
if (\file_exists($cacheFile)) {
|
$result = \file_exists($cacheFile)
|
||||||
$keys = \json_decode(\file_get_contents($cacheFile), true);
|
? \json_decode(\file_get_contents($cacheFile), true)
|
||||||
} else {
|
: null;
|
||||||
|
if (!\is_array($result)) {
|
||||||
|
$keys = [];
|
||||||
foreach (\glob("{$this->homedir}/*.key") as $file) {
|
foreach (\glob("{$this->homedir}/*.key") as $file) {
|
||||||
$data = \file_get_contents($file);
|
$data = \file_get_contents($file);
|
||||||
// Can't check ENCRYPTED PRIVATE KEY
|
// Can't check ENCRYPTED PRIVATE KEY
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue