Differences From 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]
To Artifact [b4eff5da92]:
- File src/tls/OFSecureTransportTLSStream.m — part of check-in [6b4dd1f24f] at 2021-11-21 00:30:55 on branch trunk — Add OFGnuTLSTLSStream (user: js, size: 6505) [annotate] [blame] [check-ins using]
︙ | |||
99 100 101 102 103 104 105 106 107 108 109 110 111 112 | 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 | + + + | [super dealloc]; } - (void)close { if (_context == NULL) @throw [OFNotOpenException exceptionWithObject: self]; [_host release]; _host = nil; SSLClose(_context); CFRelease(_context); _context = NULL; [super close]; } |
︙ | |||
128 129 130 131 132 133 134 | 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 | - + - + - + - + | return ret; } - (size_t)lowlevelWriteBuffer: (const void *)buffer length: (size_t)length { OSStatus status; |
︙ | |||
179 180 181 182 183 184 185 186 187 188 | 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 | + + - + - + - - + - + | if (SSLSetIOFuncs(_context, readFunc, writeFunc) != noErr || SSLSetConnection(_context, self) != noErr) @throw [OFTLSHandshakeFailedException exceptionWithStream: self host: host errorCode: initFailedErrorCode]; _host = [host copy]; if (_verifiesCertificates) if (SSLSetPeerDomainName(_context, |
︙ | |||
245 246 247 248 249 250 251 | 249 250 251 252 253 254 255 256 257 258 259 260 | - - - | if ([_delegate respondsToSelector: @selector(stream:didPerformClientHandshakeWithHost:exception:)]) [_delegate stream: self didPerformClientHandshakeWithHost: _host exception: exception]; |