Set ssl/peer_name ctx option on SSL streams#6
Set ssl/peer_name ctx option on SSL streams#6DaveRandom wants to merge 1 commit intoreactphp-legacy:masterfrom
Conversation
|
Thanks, the change looks good to me 👍 Just for the reference, the Just for the reference, relevant changes and related discussion from other projects: |
|
@clue FYI I have a WIP patch for documenting the SSL changes in 5.6 that will be pushed before 5.6.0 is tagged, I'm working with @rdlowrey to make sure all changes are documented correctly before pushing it (read: I need to talk to him about it but keep getting distracted by other lines of conversation :-P) |
|
@DaveRandom awesome and thanks for the update. Perhaps I should just keep bugging you to talk to @rdlowrey :P Either way, the changes look good to me and I'd like to merge this PR after giving anybody some time to review. Thanks! |
|
Closing in favour of #17 |
As of PHP 5.6, peer verification on SSL/TLS streams is enabled by default. Since DNS names are resolved before attempting to create the stream and PHP is passed the IP address, it expects the certificate name to match the IP address and not the supplied DNS name.
This patch fixes the problem by setting the ssl/peer_name context option on the stream after it is created and before attempting to enable crypto.