Skip to content

TLS Server fails without explanation #189

@siolfyr

Description

@siolfyr

Using react/socket version 1.2.0, using php --version 7.0.32-0ubuntu0.16.04.1

Started a server as in the README via:

$server = new React\Socket\Server('tls://0.0.0.0:25', $loop, array(
    'tls' => array(
        'local_cert' => 'secret.pem'
    )
));

And created the self-signed cert using the method in the 99 self-sign example file, which should in theory be valid. Also tried with a LetsEncrypt certificate, and got the same result.

The result is a server which triggers this error when hitting it with openssl s_client -connect site.com:25:
error: Connection from tcp://etc:etc failed during TLS handshake: Unable to complete TLS handshake: Unable to set private key file `/blah/blah/secret.pem'

The file exists and the error isn't the same as an error for a nonexistent file.

The server worked great before attempting to enable TLS.

What could be the issue? Any tips on debugging the issue with the certificate?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions