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

Add Opportunistic TLS implementation #302

Open
wants to merge 1 commit into
base: 1.x
Choose a base branch
from

Commits on Dec 20, 2022

  1. Add Opportunistic TLS implementation

    This commit introduces the functionality required to build opportunistic TLS clients and servers with
    ReactPHP. It does so by introducing a prefix to `tls://`, namely `opportunistic`, to create
    `opportunistic+tls://example.com:5432` for example as the full URL. This will create an
    `OpportunisticTlsConnectionInterface` (instead of a `ConnectionInterface`) that extends the
    `ConnectionInterface` and exposes the `enableEncryption` method to enable TLS encryption at the
    desired moment. Inside this PR is an example of a server and client negotiating when to enable TLS
    and enable it when ready.
    
    Opportunistic Security described in RFC7435: https://www.rfc-editor.org/rfc/rfc7435
    External PR using the proposed changes in this commit: voryx/PgAsync#52
    WyriHaximus committed Dec 20, 2022
    Configuration menu
    Copy the full SHA
    fb5c2e7 View commit details
    Browse the repository at this point in the history