Differences From Artifact [cd38c39db4]:
- File
src/XMPPConnection.m
— part of check-in
[d23ac2b580]
at
2015-05-24 19:42:13
on branch trunk
— Adjust to new ObjOpenSSL
This disables the new automatic certificate verification and still does
the manual verification. (user: js, size: 30926) [annotate] [blame] [check-ins using]
To Artifact [52b20891be]:
- File src/XMPPConnection.m — part of check-in [36e00ffb71] at 2016-07-09 22:39:19 on branch trunk — Adjust to ObjFW changes (user: js, size: 30218) [annotate] [blame] [check-ins using]
1 | /* | | > | | 1 2 3 4 5 6 7 8 9 10 11 12 13 | /* * Copyright (c) 2010, 2011, 2012, 2013, 2015, 2016 * Jonathan Schleifer <js@heap.zone> * Copyright (c) 2011, 2012, Florian Zeitz <florob@babelmonkeys.de> * * https://heap.zone/git/?p=objxmpp.git * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice is present in all copies. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
︙ | ︙ | |||
113 114 115 116 117 118 119 120 121 122 123 124 125 126 | [pool release]; return nil; } @end @implementation XMPPConnection + (instancetype)connection { return [[[self alloc] init] autorelease]; } - init { | > > > > > > | 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 | [pool release]; return nil; } @end @implementation XMPPConnection @synthesize language = _language, privateKeyFile = _privateKeyFile; @synthesize certificateFile = _certificateFile, socket = _socket; @synthesize encryptionRequired = _encryptionRequired, encrypted = _encrypted; @synthesize supportsRosterVersioning = _supportsRosterVersioning; @synthesize supportsStreamManagement = _supportsStreamManagement; + (instancetype)connection { return [[[self alloc] init] autorelease]; } - init { |
︙ | ︙ | |||
301 302 303 304 305 306 307 | } - (OFString*)password { return [[_password copy] autorelease]; } | < < < < < < < < < < < < < < < < < < < < | 308 309 310 311 312 313 314 315 316 317 318 319 320 321 | } - (OFString*)password { return [[_password copy] autorelease]; } - (void)connect { OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; XMPPSRVEntry *candidate = nil; XMPPSRVLookup *SRVLookup = nil; OFEnumerator *enumerator; |
︙ | ︙ | |||
473 474 475 476 477 478 479 | return false; } return true; } | < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 | return false; } return true; } - (bool)streamOpen { return _streamOpen; } - (bool)checkCertificateAndGetReason: (OFString**)reason { X509Certificate *cert; OFDictionary *SANs; bool serviceSpecific = false; @try { |
︙ | ︙ | |||
1251 1252 1253 1254 1255 1256 1257 | } @finally { free(cDomain); } return ret; } | < < < < < < < < < < < < < < < < < < < < < < < < < | 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 | } @finally { free(cDomain); } return ret; } - (void)setDataStorage: (id <XMPPStorage>)dataStorage { if (_streamOpen) /* FIXME: Find a better exception! */ @throw [OFInvalidArgumentException exception]; _dataStorage = dataStorage; } - (id <XMPPStorage>)dataStorage { return _dataStorage; } - (void)addDelegate: (id <XMPPConnectionDelegate>)delegate { [_delegates addDelegate: delegate]; } - (void)removeDelegate: (id <XMPPConnectionDelegate>)delegate { |
︙ | ︙ |