Open mdemori opened 2 years ago
Hi @mdemori , many thanks for the suggestion. I guess you're talking about this method right? https://github.com/Webklex/php-imap/blob/6e76b3552491e437f37721ae113129682489c141/src/Connection/Protocols/Protocol.php#L165 ..and: https://github.com/Webklex/php-imap/blob/6e76b3552491e437f37721ae113129682489c141/src/Connection/Protocols/Protocol.php#L200
..and you would like to extend the array which gets parsed to stream_context_create
in: https://github.com/Webklex/php-imap/blob/6e76b3552491e437f37721ae113129682489c141/src/Connection/Protocols/Protocol.php#L204
..or am I off?
In theory those could be many options, besides ssl.ciphers
. I would suggest a new custom
or advanced
option like this:
$settings = [
'host' => 'xxx',
'port' => '143',
'encryption' => 'tls',
'validate_cert' => false,
'username' => 'xxxx',
'password' => 'xxxx',
'protocol' => 'imap',
'ssl' => [
'verify_peer_name' => false,
'verify_peer' => false,
],
'custom' => [
'ciphers' => 'DEFAULT:!DH',
'foo' => 'bar',
],
];
..by which the custom
settings attribute gets merged with the parameters for stream_context_create
.
Best regards,
Hi,
there is a way to use custom option to the defaultSocketOptions() function? i need some special settings on context creation, i just tried with below code but seem that doesn't work: