ObjFW  Check-in [d30efa8bbf]

Overview
Comment:Completely rework the TLS/SSL API

The previous API could never work cleanly and would always require
hacks, as it needed intercepting all interactions of OFTCPSocket with
the raw socket and did not work at all if the OFTCPSocket had anything
in its read buffer before starting the TLS handshake. This also could
not be fixed easily, as it would have required the object to contain two
read buffers, one for the unencrypted connection and one for the
encrypted connection. There was also no clean way to perform the
handshake in a non-blocking way.

The new API is a lot cleaner and requires none of the hacks, but using
it requires slightly more work. But this is more than made up for by
making a fully asynchronous handshake possible. It uses the concept of a
stream wrapping another stream, meaning the entire connecting part is
being handled by OFTCPSocket and then the connected socket is passed off
to OFTLSStream to wrap it. This also makes for a lot cleaner separation
of concerns.

Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: d30efa8bbf4eb040901e963da4fb8a5e0fcc7b500625b5da8a20dd388d42eacb
User & Date: js on 2021-11-13 13:04:13
Other Links: manifest | tags
Context
2021-11-13
20:28
Add OFSecureTransportTLSStream check-in: 112eb62f7b user: js tags: trunk
13:04
Completely rework the TLS/SSL API check-in: d30efa8bbf user: js tags: trunk
2021-11-07
20:02
Make SOCKS5 work with TLS sockets check-in: eb2bfc674b user: js tags: trunk
Changes