EventHttpConnection https certificate

Issue #5 resolved
First Last created an issue

There is no ability to connect to ssl host which requires certificate, using EventHttpConnection.

I've tried to connect ssl host with certificate using EventBufferEvent adding EventSslContext, but it requires to use custom made HTTP layout class which duplicate functionality of EventHttpRequest.

I suggest to add ability to pass EventSslContext to EventHttpConnection

Unfortunately I can not provide example because of security reason.

Comments (4)

  1. Ruslan Osmanov repo owner

    It's possible with >= libevent-2.1.0-alpha. The attached patch adds EventSslContext argument to EventHttpConnection::__construct() method. Still have to test it and introduce true compatibility for libevent-2.1 (some tests are failing)

  2. Ruslan Osmanov repo owner

    Looks like I was wrong. Tests are actually passing. Likely I had environment issues yesterday.

    I've pushed the changes. EventHttpConnection::__construct now accepts EventSslContext argument. Please checkout the latest master.

    Didn't test it myself though. I'll be grateful for a test script ;)

  3. Ruslan Osmanov repo owner

    I've fixed it. Check out examples/https.php and examples/ssl-connection.php.

    Note, you'll need to install Libevent-2.1.0-alpha or higher. Don't forget to rebuild the extension itself.

    Thanks for your efforts!

  4. Log in to comment