Differences From Artifact [41321b054b]:
- File
src/tls/OFOpenSSLTLSStream.m
— part of check-in
[11b2a17595]
at
2024-01-06 00:52:48
on branch trunk
— Initial support for Mbed TLS
Mbed TLS is never automatically picked as a TLS implementation and
always needs to be manually enabled using --with-tls=mbedtls. (user: js, size: 10574) [annotate] [blame] [check-ins using]
To Artifact [acd160399f]:
- File
src/tls/OFOpenSSLTLSStream.m
— part of check-in
[64d9603a4f]
at
2024-01-06 01:00:30
on branch trunk
— Fix compilation of OFOpenSSLTLSStream
Removing the previous line causes the variable declaration to be just
after the case, so an extra semicolon is needed. (user: js, size: 10559) [annotate] [blame] [check-ins using] [more...]
| ︙ | ︙ | |||
315 316 317 318 319 320 321 |
length: (size_t)length
exception: (nullable id)exception
{
if (exception == nil) {
static const OFTLSStreamErrorCode unknownErrorCode =
OFTLSStreamErrorCodeUnknown;
int status;
| < | 315 316 317 318 319 320 321 322 323 324 325 326 327 328 |
length: (size_t)length
exception: (nullable id)exception
{
if (exception == nil) {
static const OFTLSStreamErrorCode unknownErrorCode =
OFTLSStreamErrorCodeUnknown;
int status;
OFEnsure(length <= INT_MAX);
OFEnsure(BIO_write(_readBIO, buffer, (int)length) ==
(int)length);
status = SSL_do_handshake(_SSL);
|
| ︙ | ︙ | |||
338 339 340 341 342 343 344 |
if (status == 1)
_handshakeDone = true;
else {
switch (SSL_get_error(_SSL, status)) {
case SSL_ERROR_WANT_READ:
return true;
| | | 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 |
if (status == 1)
_handshakeDone = true;
else {
switch (SSL_get_error(_SSL, status)) {
case SSL_ERROR_WANT_READ:
return true;
case SSL_ERROR_WANT_WRITE:;
OFRunLoopMode runLoopMode =
[OFRunLoop currentRunLoop].currentMode;
[_underlyingStream asyncWriteData: [OFData data]
runLoopMode: runLoopMode];
return false;
default:
exception = [OFTLSHandshakeFailedException
|
| ︙ | ︙ |