Differences From Artifact [56d8fa21c4]:
- File
src/OFSecureTransportTLSStream.m
— part of check-in
[112eb62f7b]
at
2021-11-13 20:28:25
on branch trunk
— Add OFSecureTransportTLSStream
This implements OFTLSStream using Apple's Secure Transport. While Secure
Transport is declared deprecated by Apple, Apple so far has failed to
provide a suitable replacement. They recommend Network.framework as a
replacement, however it can neither work on arbitrary sockets, nor can
it do STARTTLS. (user: js, size: 6156) [annotate] [blame] [check-ins using]
To Artifact [6a4157afd5]:
- File src/OFSecureTransportTLSStream.m — part of check-in [a3eee50a18] at 2021-11-13 21:09:58 on branch trunk — -[OFSecureTransportTLSStream hasDataInReadBuffer] (user: js, size: 6345) [annotate] [blame] [check-ins using]
| ︙ | ︙ | |||
135 136 137 138 139 140 141 142 143 144 145 146 147 148 |
@throw [OFWriteFailedException exceptionWithObject: self
requestedLength: length
bytesWritten: ret
errNo: 0];
return ret;
}
- (void)asyncPerformClientHandshakeWithHost: (OFString *)host
runLoopMode: (OFRunLoopMode)runLoopMode
{
static const OFTLSStreamErrorCode initFailedErrorCode =
OFTLSStreamErrorCodeInitializationFailed;
id exception = nil;
| > > > > > > > > > > > | 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 |
@throw [OFWriteFailedException exceptionWithObject: self
requestedLength: length
bytesWritten: ret
errNo: 0];
return ret;
}
- (bool)hasDataInReadBuffer
{
size_t bufferSize;
if (SSLGetBufferedReadSize(_context, &bufferSize) == noErr &&
bufferSize > 0)
return true;
return super.hasDataInReadBuffer;
}
- (void)asyncPerformClientHandshakeWithHost: (OFString *)host
runLoopMode: (OFRunLoopMode)runLoopMode
{
static const OFTLSStreamErrorCode initFailedErrorCode =
OFTLSStreamErrorCodeInitializationFailed;
id exception = nil;
|
| ︙ | ︙ |