jakubkulhan / bunny

Performant pure-PHP AMQP (RabbitMQ) sync/async (ReactPHP) library
MIT License
706 stars 102 forks source link

feat: add support for SSL #88

Closed rtm-ctrlz closed 4 years ago

rtm-ctrlz commented 4 years ago

Added usage of stream_context_set_option for setting SSL options. Added tests with certificate generation and ssl-enabled configuration for RabbitMQ. Added some configuration examples for common use cases see examples/ssl directory. Mentioned SSL support in main README.md.

Some notes:

Resolves #77

rtm-ctrlz commented 4 years ago

Personally, I have no objection regarding parameter name change, but this code will not look so neat:

stream_context_set_option($context, ['ssl' => $this->options['tls']])

If you are OK with that - I'll make this change.

Also, should examples/ssl, test/ssl, variables in Makefile and filenames for RabbitMQ configs (for tests and examples) directory be renamed?

rtm-ctrlz commented 4 years ago

See #89 ;)

rtm-ctrlz commented 4 years ago

Synced branch jakubkulhan/bunny:master

WyriHaximus commented 4 years ago

See #89 ;)

Will have a look at it tomorrow :+1: .

WyriHaximus commented 4 years ago

Personally, I have no objection regarding parameter name change, but this code will not look so neat:

stream_context_set_option($context, ['ssl' => $this->options['tls']])

If you are OK with that - I'll make this change.

Also, should examples/ssl, test/ssl, variables in Makefile and filenames for RabbitMQ configs (for tests and examples) directory be renamed?

Yeah this suddenly makes sense looking at #89 🤐 !