mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-03-31 16:45:27 +00:00
use tmp file
This commit is contained in:
parent
7d79d47311
commit
7e329b8b8a
1 changed files with 21 additions and 2 deletions
|
|
@ -38,8 +38,27 @@ class Gemini
|
|||
// Apply identity if available
|
||||
if ($identity = $this->matchIdentity($address->get()))
|
||||
{
|
||||
$options['ssl']['local_cert'] = $identity->crt;
|
||||
$options['ssl']['local_pk'] = $identity->key;
|
||||
$crt = tmpfile();
|
||||
|
||||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue