amphp / socket

Non-blocking socket and TLS functionality for PHP based on Amp.
https://amphp.org/socket
MIT License
237 stars 38 forks source link

Socket connect with certificate and passphrase #80

Closed PNixx closed 1 year ago

PNixx commented 3 years ago

I need connect to ssl://gateway.sandbox.push.apple.com:2195 with certificate and passphrase. Example: https://gist.github.com/marchbold/393bd1b7828e30178899. How I can do it?

kelunik commented 3 years ago

https://github.com/amphp/socket/blob/6f65724311f47932f54e2f96f3313445c8de57a1/src/ClientTlsContext.php is what you're looking for. It looks like it needs an extension to support a passphrase.

kelunik commented 1 year ago

Passphrase support has been added in https://github.com/amphp/socket/commit/fa19cb8acfb85be7476aaf7afca4ea051a80e23a.