Differences From Artifact [ba84ecba17]:
- File
src/tls/OFGnuTLSTLSStream.m
— part of check-in
[1a3613d573]
at
2023-09-10 12:11:53
on branch trunk
— More consistency between TLS implementations
While GnuTLS and SecureTransport haven't shown in practice to need this,
this makes it more robust for future changes in those. In theory, both
could return less data on a read than they have buffered, meaning the
delimiter is not found but in the buffered data, which would then make
them have the same issue OpenSSL had with hanging connections (though
there the problem was that the BIO was not processed and never would
without the same change as in this commit). (user: js, size: 9629) [annotate] [blame] [check-ins using] [more...]
To Artifact [3f3e9b7029]:
- File
src/tls/OFGnuTLSTLSStream.m
— part of check-in
[a61e0594b4]
at
2023-10-15 12:32:29
on branch trunk
— Add -[OFStream lowlevelIsAtEndOfStream]
This allows for a much cleaner solution to avoid the internal read
buffer of e.g. a TLS connection never being processed while waiting for
a delimiter. (user: js, size: 9133) [annotate] [blame] [check-ins using] [more...]
︙ | ︙ | |||
15 16 17 18 19 20 21 | #include "config.h" #include <errno.h> #import "OFGnuTLSTLSStream.h" #import "OFData.h" | < | 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | #include "config.h" #include <errno.h> #import "OFGnuTLSTLSStream.h" #import "OFData.h" #import "OFAlreadyOpenException.h" #import "OFInitializationFailedException.h" #import "OFNotOpenException.h" #import "OFReadFailedException.h" #import "OFTLSHandshakeFailedException.h" #import "OFWriteFailedException.h" |
︙ | ︙ | |||
182 183 184 185 186 187 188 | bytesWritten: ret errNo: 0]; } return ret; } | | < < < | < < < < < < < < < < < < | < < < | 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 | bytesWritten: ret errNo: 0]; } return ret; } - (bool)lowlevelHasDataInReadBuffer { return (_underlyingStream.hasDataInReadBuffer || gnutls_record_check_pending(_session) > 0); } - (void)asyncPerformClientHandshakeWithHost: (OFString *)host runLoopMode: (OFRunLoopMode)runLoopMode { static const OFTLSStreamErrorCode initFailedErrorCode = OFTLSStreamErrorCodeInitializationFailed; |
︙ | ︙ |