Differences From 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]
To Artifact [ce137cf9dc]:
- File
src/tls/OFSecureTransportTLSStream.m
— part of check-in
[8f8af474fc]
at
2021-11-20 13:18:28
on branch trunk
— Move TLS implementations to a separate library
These implementations all depend on additional libraries that are
otherwise not needed for an ObjFW application that does not use TLS,
meaning they would add unnecessary dependencies for a lot of
applications and waste memory. (user: js, size: 6464) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
21 22 23 24 25 26 27 28 29 30 31 32 33 34 | #import "OFAlreadyConnectedException.h" #import "OFNotOpenException.h" #import "OFReadFailedException.h" #import "OFTLSHandshakeFailedException.h" #import "OFWriteFailedException.h" static OSStatus readFunc(SSLConnectionRef connection, void *data, size_t *dataLength) { bool incomplete; size_t length = [((OFTLSStream *)connection).wrappedStream readIntoBuffer: data length: *dataLength]; | > > | 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | #import "OFAlreadyConnectedException.h" #import "OFNotOpenException.h" #import "OFReadFailedException.h" #import "OFTLSHandshakeFailedException.h" #import "OFWriteFailedException.h" int _ObjFWTLS_reference; static OSStatus readFunc(SSLConnectionRef connection, void *data, size_t *dataLength) { bool incomplete; size_t length = [((OFTLSStream *)connection).wrappedStream readIntoBuffer: data length: *dataLength]; |
︙ | ︙ | |||
62 63 64 65 66 67 68 69 70 71 72 73 74 75 | * Apple deprecated Secure Transport without providing a replacement that can * work with any socket. On top of that, their replacement, Network.framework, * doesn't support STARTTLS at all. */ #pragma GCC diagnostic ignored "-Wdeprecated" @implementation OFSecureTransportTLSStream - (instancetype)initWithStream: (OFStream <OFReadyForReadingObserving, OFReadyForWritingObserving> *)stream { self = [super initWithStream: stream]; @try { _wrappedStream.delegate = self; | > > > > > > | 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | * Apple deprecated Secure Transport without providing a replacement that can * work with any socket. On top of that, their replacement, Network.framework, * doesn't support STARTTLS at all. */ #pragma GCC diagnostic ignored "-Wdeprecated" @implementation OFSecureTransportTLSStream + (void)load { if (OFTLSStreamImplementation == Nil) OFTLSStreamImplementation = self; } - (instancetype)initWithStream: (OFStream <OFReadyForReadingObserving, OFReadyForWritingObserving> *)stream { self = [super initWithStream: stream]; @try { _wrappedStream.delegate = self; |
︙ | ︙ |