use tmp file

This commit is contained in:
yggverse 2024-08-03 23:56:40 +03:00
parent 7d79d47311
commit 7e329b8b8a

View file

@ -38,8 +38,27 @@ class Gemini
// Apply identity if available // Apply identity if available
if ($identity = $this->matchIdentity($address->get())) if ($identity = $this->matchIdentity($address->get()))
{ {
$options['ssl']['local_cert'] = $identity->crt; $crt = tmpfile();
$options['ssl']['local_pk'] = $identity->key;
fwrite(
$crt,
$identity->crt
);
$options['ssl']['local_cert'] = stream_get_meta_data(
$crt
)['uri'];
$key = tmpfile();
fwrite(
$key,
$identity->key
);
$options['ssl']['local_pk'] = stream_get_meta_data(
$key
)['uri'];
} }
// Update connection // Update connection