Skip to content

Conversation

@WyriHaximus
Copy link
Contributor

No description provided.

WyriHaximus added a commit to WyriHaximus-labs/socket that referenced this pull request Dec 5, 2022
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.

Depends on: reactphp/async#65
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 WyriHaximus force-pushed the tls-connection-support branch from 2672e90 to 3206dce Compare December 6, 2022 14:50
WyriHaximus added a commit to WyriHaximus-labs/socket that referenced this pull request Dec 7, 2022
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.

Depends on: reactphp/async#65
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 added a commit to WyriHaximus-labs/socket that referenced this pull request Dec 7, 2022
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.

Depends on: reactphp/async#65
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 added a commit to WyriHaximus-labs/socket that referenced this pull request Dec 7, 2022
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.

Depends on: reactphp/async#65
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 added a commit to WyriHaximus-labs/socket that referenced this pull request Dec 7, 2022
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 WyriHaximus force-pushed the tls-connection-support branch from 3206dce to efa59a1 Compare December 8, 2022 08:35
WyriHaximus added a commit to WyriHaximus-labs/socket that referenced this pull request Dec 16, 2022
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 added a commit to WyriHaximus-labs/socket that referenced this pull request Dec 20, 2022
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 WyriHaximus force-pushed the tls-connection-support branch 2 times, most recently from b6d651a to a543465 Compare March 2, 2024 20:36
@WyriHaximus WyriHaximus force-pushed the tls-connection-support branch 9 times, most recently from e585be7 to d615b48 Compare July 22, 2025 21:57
@mbonneau
Copy link
Member

@WyriHaximus - This PR is marked [WIP]. Do you have any thoughts on when we might be able to add this in? Is the react project going to support TLS upgrade?

@WyriHaximus
Copy link
Contributor Author

@mbonneau Put it in https://github.com/WyriHaximus/reactphp-opportunistic-tls for now after discussing it with @clue a while ago. WIll focus this week on finishing this PR.

@WyriHaximus WyriHaximus force-pushed the tls-connection-support branch 6 times, most recently from 9018ebc to a842567 Compare October 28, 2025 16:40
@WyriHaximus WyriHaximus force-pushed the tls-connection-support branch 20 times, most recently from 872a8e4 to de6837e Compare November 4, 2025 08:19
@WyriHaximus WyriHaximus force-pushed the tls-connection-support branch from de6837e to 64ac9e8 Compare November 4, 2025 16:45
@WyriHaximus WyriHaximus changed the title [WIP] TLS Connection Support TLS Connection Support Nov 5, 2025
@WyriHaximus WyriHaximus marked this pull request as ready for review November 5, 2025 07:42
@WyriHaximus
Copy link
Contributor Author

@mbonneau Added TLs testing to the CI, only thing is that lowest runs on PHP 8+ are failing. Aside from that it's ready for review.

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.

2 participants