Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: [Socket] Async SSL Server #119

Closed
wants to merge 1 commit into from
Closed

WIP: [Socket] Async SSL Server #119

wants to merge 1 commit into from

Conversation

cboden
Copy link
Member

@cboden cboden commented Dec 30, 2012

Refs #2

Seems to be functioning...example works with self signed cert using TLS crypto method.

TODO:

  • Unit tests
  • Let user select crypto method
  • Try to get cert in memory so each connection doesn't block via filesystem I/O

stream_set_blocking($socket, 0);

$client = $this->createConnection($socket);

$this->emit('connection', array($client));
if ($client instanceof SecureConnection) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about making the connection implement PromisorInterface, so it can return a promise that resolves as soon as the conn is established?

@DaveRandom
Copy link

Looks like a fairly sensible impl, a few points though:

  • It would be good to add an isSecure() method (or something) to Connection so you can do the check without the tight coupling of instanceof
  • It would be good to be able to specify which of the STREAM_CRYPTO_METHOD_*_SERVER constants is used (this would be simple enough via the shiny new $context arg)
  • (I'm sure you're already on top of this one in some way) there should be an error event emitted in the case of failure

@igorw igorw mentioned this pull request Jan 28, 2013
@cursedcoder
Copy link

Do not forget to update http client too

@clue
Copy link
Member

clue commented Sep 19, 2015

This PR seems like a good starting point, thanks @cboden!

This PR has been WIP for quite some time now and things have changed considerably since then :-)

React now consists of individual components that are maintained individually. Supporting server-side SSL/TLS is now related to the react/socket component.

As such, I've just filed a new ticket reactphp/socket#24 to keep track of this, so I suppose it makes sense to focus our SSL/TLS related efforts on this component.

@clue clue closed this Sep 19, 2015
@clue clue deleted the ssl branch September 19, 2015 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants