40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
#if defined(__clang__)
# pragma clang diagnostic pop
#endif
#import <ObjFW/OFThread.h>
#import <ObjFW/OFHTTPRequest.h>
#import <ObjFW/OFData.h>
#import <ObjFW/OFLocalization.h>
#import <ObjFW/OFAcceptFailedException.h>
#import <ObjFW/OFInitializationFailedException.h>
#import <ObjFW/OFInvalidArgumentException.h>
#import <ObjFW/OFNotOpenException.h>
#import <ObjFW/OFOutOfRangeException.h>
#import <ObjFW/OFReadFailedException.h>
|
|
|
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
#if defined(__clang__)
# pragma clang diagnostic pop
#endif
#import <ObjFW/OFThread.h>
#import <ObjFW/OFHTTPRequest.h>
#import <ObjFW/OFData.h>
#import <ObjFW/OFLocale.h>
#import <ObjFW/OFAcceptFailedException.h>
#import <ObjFW/OFInitializationFailedException.h>
#import <ObjFW/OFInvalidArgumentException.h>
#import <ObjFW/OFNotOpenException.h>
#import <ObjFW/OFOutOfRangeException.h>
#import <ObjFW/OFReadFailedException.h>
|
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
|
}
SSL_set_verify(_SSL, SSL_VERIFY_PEER, NULL);
}
SSL_set_connect_state(_SSL);
encoding = [OFLocalization encoding];
if ((_privateKeyFile != nil && !SSL_use_PrivateKey_file(_SSL,
[_privateKeyFile cStringWithEncoding: encoding],
SSL_FILETYPE_PEM)) || (_certificateFile != nil &&
!SSL_use_certificate_file(_SSL, [_certificateFile
cStringWithEncoding: encoding],
SSL_FILETYPE_PEM))) {
|
|
|
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
|
}
SSL_set_verify(_SSL, SSL_VERIFY_PEER, NULL);
}
SSL_set_connect_state(_SSL);
encoding = [OFLocale encoding];
if ((_privateKeyFile != nil && !SSL_use_PrivateKey_file(_SSL,
[_privateKeyFile cStringWithEncoding: encoding],
SSL_FILETYPE_PEM)) || (_certificateFile != nil &&
!SSL_use_certificate_file(_SSL, [_certificateFile
cStringWithEncoding: encoding],
SSL_FILETYPE_PEM))) {
|
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
|
}
if (_requestClientCertificatesEnabled)
SSL_set_verify(client->_SSL, SSL_VERIFY_PEER, NULL);
SSL_set_accept_state(client->_SSL);
encoding = [OFLocalization encoding];
if (!SSL_use_PrivateKey_file(client->_SSL, [_privateKeyFile
cStringWithEncoding: encoding],
SSL_FILETYPE_PEM) || !SSL_use_certificate_file(client->_SSL,
[_certificateFile cStringWithEncoding: encoding],
SSL_FILETYPE_PEM) || SSL_accept(client->_SSL) != 1) {
[client SSL_super_close];
|
|
|
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
|
}
if (_requestClientCertificatesEnabled)
SSL_set_verify(client->_SSL, SSL_VERIFY_PEER, NULL);
SSL_set_accept_state(client->_SSL);
encoding = [OFLocale encoding];
if (!SSL_use_PrivateKey_file(client->_SSL, [_privateKeyFile
cStringWithEncoding: encoding],
SSL_FILETYPE_PEM) || !SSL_use_certificate_file(client->_SSL,
[_certificateFile cStringWithEncoding: encoding],
SSL_FILETYPE_PEM) || SSL_accept(client->_SSL) != 1) {
[client SSL_super_close];
|