Differences From Artifact [cd16825332]:
- File
src/SSLSocket.m
— part of check-in
[071d74e840]
at
2015-05-24 19:33:09
on branch trunk
— Conform to OFTLSSocket
This also introduces automatic certificate verification and enables it
by default, as required by OFTLSSocket.There are still TODOs until OFTLSSocket is fully implemented. (user: js, size: 11226) [annotate] [blame] [check-ins using]
To Artifact [a51bf1f765]:
- File src/SSLSocket.m — part of check-in [aab1410a4b] at 2016-03-06 17:48:01 on branch trunk — Adjust to ObjFW changes (user: js, size: 10440) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
85 86 87 88 89 90 91 92 93 94 95 96 97 98 | if (mode & CRYPTO_LOCK) of_mutex_lock(&ssl_mutexes[n]); else of_mutex_unlock(&ssl_mutexes[n]); } @implementation SSLSocket + (void)load { of_tls_socket_class = self; } + (void)initialize { | > > > > > > > | 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 | if (mode & CRYPTO_LOCK) of_mutex_lock(&ssl_mutexes[n]); else of_mutex_unlock(&ssl_mutexes[n]); } @implementation SSLSocket @synthesize delegate = _delegate, certificateFile = _certificateFile; @synthesize privateKeyFile = _privateKeyFile; @synthesize privateKeyPassphrase = privateKeyPassphrase; @synthesize certificateVerificationEnabled = _certificateVerificationEnabled; @synthesize requestClientCertificatesEnabled = _requestClientCertificatesEnabled; + (void)load { of_tls_socket_class = self; } + (void)initialize { |
︙ | ︙ | |||
326 327 328 329 330 331 332 | { if (_SSL != NULL && SSL_pending(_SSL) > 0) return true; return [super hasDataInReadBuffer]; } | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 | { if (_SSL != NULL && SSL_pending(_SSL) > 0) return true; return [super hasDataInReadBuffer]; } - (void)setCertificateFile: (OFString*)certificateFile forSNIHost: (OFString*)SNIHost { /* TODO */ OF_UNRECOGNIZED_SELECTOR } - (OFString*)certificateFileForSNIHost: (OFString*)SNIHost { /* TODO */ OF_UNRECOGNIZED_SELECTOR } - (void)setPrivateKeyFile: (OFString*)privateKeyFile forSNIHost: (OFString*)SNIHost { /* TODO */ OF_UNRECOGNIZED_SELECTOR } - (OFString*)privateKeyFileForSNIHost: (OFString*)SNIHost { /* TODO */ OF_UNRECOGNIZED_SELECTOR } - (void)setPrivateKeyPassphrase: (const char*)privateKeyPassphrase forSNIHost: (OFString*)SNIHost { /* TODO */ OF_UNRECOGNIZED_SELECTOR } - (const char*)privateKeyPassphraseForSNIHost: (OFString*)SNIHost { /* TODO */ OF_UNRECOGNIZED_SELECTOR } - (OFDataArray*)channelBindingDataWithType: (OFString*)type { size_t length; char buffer[64]; OFDataArray *data; if (![type isEqual: @"tls-unique"]) |
︙ | ︙ |