zendframework / zend-http

Http component from Zend Framework
BSD 3-Clause "New" or "Revised" License
134 stars 85 forks source link

Zend/Http/Client/Adapter/Socket - options for stream context #82

Closed igor-astsakhov closed 5 years ago

igor-astsakhov commented 8 years ago

It is not possible to specify options for the stream context, in php 7 there seems to be something strict on the self signed certificates and peer/host must verify. Providing 'ssl' => array(
'verify_host' => false,
'verify_peer' => false,
), options by passes the check and allows the socket creation, without those options it fails and throws an exception.

If its possible to add the ability to pass the options via config like the local_cert and passphrase would be great.

NiMeDia commented 7 years ago

+1

michalbundyra commented 5 years ago

@igor-astsakhov @NiMeDia It seems to be resolved already as I can see options: sslpassphrase (for passphrase) and sslcert (for local_cert) in Socket adapter.

See the docs: https://docs.zendframework.com/zend-http/client/adapters/#the-socket-adapter