ObjXMPP  Check-in [50331e7266]

Overview
Comment:Use ObjOpenSSL instead of ObjGnuTLS.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 50331e7266bfc36d78c0bad58632bba616deff5bc1f0c19e58304bace1f44dc1
User & Date: js on 2011-03-28 20:43:54
Other Links: manifest | tags
Context
2011-03-29
00:04
Get rid of unused variable useTLS. check-in: c6162edb52 user: js tags: trunk
2011-03-28
20:43
Use ObjOpenSSL instead of ObjGnuTLS. check-in: 50331e7266 user: js tags: trunk
16:15
Add -[XMPPRoster deleteRosterItem:] and -[XMPPRosterItem copy]. check-in: 5deb46d926 user: js tags: trunk
Changes

Modified ObjXMPP.xcodeproj/project.pbxproj from [7455d70e15] to [b60ab9486b].

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
1
2
3
4
5
6
7
8
9
10
11
12

13
14
15
16
17
18
19












-







// !$*UTF8*$!
{
	archiveVersion = 1;
	classes = {
	};
	objectVersion = 46;
	objects = {

/* Begin PBXBuildFile section */
		4B1295EF1337BD5F00154B25 /* test.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B1295EE1337BD5F00154B25 /* test.m */; };
		4B1295F11337C37E00154B25 /* ObjXMPP.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4BC559911337A65400E345C7 /* ObjXMPP.framework */; };
		4B1295F21337C3CF00154B25 /* ObjFW.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4BC559D61337ABD300E345C7 /* ObjFW.framework */; };
		4B2FE41A1337B7B20092C736 /* ObjGnuTLS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4B2FE4191337B7B20092C736 /* ObjGnuTLS.framework */; };
		4BC559D71337ABD300E345C7 /* ObjFW.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4BC559D61337ABD300E345C7 /* ObjFW.framework */; };
		4BC559EB1337AC0900E345C7 /* arc4random_uniform.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BC559D91337AC0900E345C7 /* arc4random_uniform.m */; };
		4BC559EC1337AC0900E345C7 /* XMPPAuthenticator.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BC559DA1337AC0900E345C7 /* XMPPAuthenticator.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4BC559ED1337AC0900E345C7 /* XMPPAuthenticator.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BC559DB1337AC0900E345C7 /* XMPPAuthenticator.m */; };
		4BC559EE1337AC0900E345C7 /* XMPPConnection.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BC559DC1337AC0900E345C7 /* XMPPConnection.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4BC559EF1337AC0900E345C7 /* XMPPConnection.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BC559DD1337AC0900E345C7 /* XMPPConnection.m */; };
		4BC559F01337AC0900E345C7 /* XMPPExceptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BC559DE1337AC0900E345C7 /* XMPPExceptions.h */; settings = {ATTRIBUTES = (Public, ); }; };
29
30
31
32
33
34
35

36
37
38
39
40
41
42
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42







+







		4BC559F91337AC0900E345C7 /* XMPPPLAINAuth.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BC559E71337AC0900E345C7 /* XMPPPLAINAuth.m */; };
		4BC559FA1337AC0900E345C7 /* XMPPPresence.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BC559E81337AC0900E345C7 /* XMPPPresence.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4BC559FB1337AC0900E345C7 /* XMPPPresence.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BC559E91337AC0900E345C7 /* XMPPPresence.m */; };
		4BC559FC1337AC0900E345C7 /* XMPPSCRAMAuth.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BC559EA1337AC0900E345C7 /* XMPPSCRAMAuth.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4BC55A001337AC1800E345C7 /* XMPPSCRAMAuth.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BC559FD1337AC1800E345C7 /* XMPPSCRAMAuth.m */; };
		4BC55A011337AC1800E345C7 /* XMPPStanza.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BC559FE1337AC1800E345C7 /* XMPPStanza.h */; settings = {ATTRIBUTES = (Public, ); }; };
		4BC55A021337AC1800E345C7 /* XMPPStanza.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BC559FF1337AC1800E345C7 /* XMPPStanza.m */; };
		4BD0AB16134129B900445289 /* ObjOpenSSL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4BD0AB15134129B900445289 /* ObjOpenSSL.framework */; };
		4BD9BF59134003F700DAB43A /* XMPPRosterItem.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BD9BF57134003F700DAB43A /* XMPPRosterItem.h */; };
		4BD9BF5A134003F700DAB43A /* XMPPRosterItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BD9BF58134003F700DAB43A /* XMPPRosterItem.m */; };
		4BDEF8071340B240000156D1 /* XMPPRoster.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BDEF8051340B240000156D1 /* XMPPRoster.h */; };
		4BDEF8081340B240000156D1 /* XMPPRoster.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BDEF8061340B240000156D1 /* XMPPRoster.m */; };
		4BF459B91340DE3600701BCC /* XMPPRoster_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BF459B81340DE3600701BCC /* XMPPRoster_private.h */; };
/* End PBXBuildFile section */

51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
51
52
53
54
55
56
57

58
59
60
61
62
63
64







-







			runOnlyForDeploymentPostprocessing = 1;
		};
/* End PBXCopyFilesBuildPhase section */

/* Begin PBXFileReference section */
		4B1295E01337BD2D00154B25 /* ObjXMPPTests */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = ObjXMPPTests; sourceTree = BUILT_PRODUCTS_DIR; };
		4B1295EE1337BD5F00154B25 /* test.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = test.m; path = tests/test.m; sourceTree = SOURCE_ROOT; };
		4B2FE4191337B7B20092C736 /* ObjGnuTLS.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ObjGnuTLS.framework; path = ../../../../Library/Frameworks/ObjGnuTLS.framework; sourceTree = "<group>"; };
		4BC559911337A65400E345C7 /* ObjXMPP.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ObjXMPP.framework; sourceTree = BUILT_PRODUCTS_DIR; };
		4BC559D61337ABD300E345C7 /* ObjFW.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ObjFW.framework; path = ../../../../Library/Frameworks/ObjFW.framework; sourceTree = "<group>"; };
		4BC559D91337AC0900E345C7 /* arc4random_uniform.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = arc4random_uniform.m; path = src/arc4random_uniform.m; sourceTree = SOURCE_ROOT; };
		4BC559DA1337AC0900E345C7 /* XMPPAuthenticator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = XMPPAuthenticator.h; path = src/XMPPAuthenticator.h; sourceTree = SOURCE_ROOT; };
		4BC559DB1337AC0900E345C7 /* XMPPAuthenticator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = XMPPAuthenticator.m; path = src/XMPPAuthenticator.m; sourceTree = SOURCE_ROOT; };
		4BC559DC1337AC0900E345C7 /* XMPPConnection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = XMPPConnection.h; path = src/XMPPConnection.h; sourceTree = SOURCE_ROOT; };
		4BC559DD1337AC0900E345C7 /* XMPPConnection.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = XMPPConnection.m; path = src/XMPPConnection.m; sourceTree = SOURCE_ROOT; };
76
77
78
79
80
81
82

83
84
85
86
87
88
89
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89







+







		4BC559E81337AC0900E345C7 /* XMPPPresence.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = XMPPPresence.h; path = src/XMPPPresence.h; sourceTree = SOURCE_ROOT; };
		4BC559E91337AC0900E345C7 /* XMPPPresence.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = XMPPPresence.m; path = src/XMPPPresence.m; sourceTree = SOURCE_ROOT; };
		4BC559EA1337AC0900E345C7 /* XMPPSCRAMAuth.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = XMPPSCRAMAuth.h; path = src/XMPPSCRAMAuth.h; sourceTree = SOURCE_ROOT; };
		4BC559FD1337AC1800E345C7 /* XMPPSCRAMAuth.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = XMPPSCRAMAuth.m; path = src/XMPPSCRAMAuth.m; sourceTree = SOURCE_ROOT; };
		4BC559FE1337AC1800E345C7 /* XMPPStanza.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = XMPPStanza.h; path = src/XMPPStanza.h; sourceTree = SOURCE_ROOT; };
		4BC559FF1337AC1800E345C7 /* XMPPStanza.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = XMPPStanza.m; path = src/XMPPStanza.m; sourceTree = SOURCE_ROOT; };
		4BC55A051337ADA800E345C7 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = SOURCE_ROOT; };
		4BD0AB15134129B900445289 /* ObjOpenSSL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ObjOpenSSL.framework; path = ../ObjOpenSSL/build/Debug/ObjOpenSSL.framework; sourceTree = "<group>"; };
		4BD9BF57134003F700DAB43A /* XMPPRosterItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = XMPPRosterItem.h; path = src/XMPPRosterItem.h; sourceTree = SOURCE_ROOT; };
		4BD9BF58134003F700DAB43A /* XMPPRosterItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = XMPPRosterItem.m; path = src/XMPPRosterItem.m; sourceTree = SOURCE_ROOT; };
		4BDEF8051340B240000156D1 /* XMPPRoster.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = XMPPRoster.h; path = src/XMPPRoster.h; sourceTree = SOURCE_ROOT; };
		4BDEF8061340B240000156D1 /* XMPPRoster.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = XMPPRoster.m; path = src/XMPPRoster.m; sourceTree = SOURCE_ROOT; };
		4BF459B81340DE3600701BCC /* XMPPRoster_private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = XMPPRoster_private.h; path = src/XMPPRoster_private.h; sourceTree = SOURCE_ROOT; };
/* End PBXFileReference section */

97
98
99
100
101
102
103

104
105
106
107
108
109
110
111
112
97
98
99
100
101
102
103
104
105

106
107
108
109
110
111
112







+

-







			);
			runOnlyForDeploymentPostprocessing = 0;
		};
		4BC5598D1337A65400E345C7 /* Frameworks */ = {
			isa = PBXFrameworksBuildPhase;
			buildActionMask = 2147483647;
			files = (
				4BD0AB16134129B900445289 /* ObjOpenSSL.framework in Frameworks */,
				4BC559D71337ABD300E345C7 /* ObjFW.framework in Frameworks */,
				4B2FE41A1337B7B20092C736 /* ObjGnuTLS.framework in Frameworks */,
			);
			runOnlyForDeploymentPostprocessing = 0;
		};
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
		4B1295E41337BD2D00154B25 /* ObjXMPPTests */ = {
136
137
138
139
140
141
142
143

144
145
146
147
148
149
150
136
137
138
139
140
141
142

143
144
145
146
147
148
149
150







-
+







			name = Products;
			sourceTree = "<group>";
		};
		4BC559931337A65400E345C7 /* Frameworks */ = {
			isa = PBXGroup;
			children = (
				4BC559D61337ABD300E345C7 /* ObjFW.framework */,
				4B2FE4191337B7B20092C736 /* ObjGnuTLS.framework */,
				4BD0AB15134129B900445289 /* ObjOpenSSL.framework */,
			);
			name = Frameworks;
			sourceTree = "<group>";
		};
		4BC5599A1337A65400E345C7 /* ObjXMPP */ = {
			isa = PBXGroup;
			children = (

Modified src/Makefile from [992c84981f] to [942a976e26].

1
2
3

4
5
6
1
2

3
4
5
6


-
+



all:
	objfw-compile -Wall -g --lib 0.0 -o objxmpp *.m \
		`pkg-config --cflags --libs libidn` -lobjgnutls
		`pkg-config --cflags --libs libidn` -lobjopenssl

clean:
	rm -f *.o *.so *.dylib *.dll

Modified src/XMPPConnection.m from [645635f3bd] to [99ce133848].

22
23
24
25
26
27
28
29

30
31
32
33
34
35
36
22
23
24
25
26
27
28

29
30
31
32
33
34
35
36







-
+







 */

#include <assert.h>

#include <stringprep.h>
#include <idna.h>

#import <ObjGnuTLS/ObjGnuTLS.h>
#import <ObjOpenSSL/SSLSocket.h>

#import "XMPPConnection.h"
#import "XMPPSCRAMAuth.h"
#import "XMPPPLAINAuth.h"
#import "XMPPStanza.h"
#import "XMPPJID.h"
#import "XMPPIQ.h"
335
336
337
338
339
340
341
342

343
344
345
346
347
348
349
335
336
337
338
339
340
341

342
343
344
345
346
347
348
349







-
+








		assert(0);
	}

	if ([elem.namespace isEqual: XMPP_NS_STARTTLS]) {
		if ([elem.name isEqual: @"proceed"]) {
			/* FIXME: Catch errors here */
			sock = [[GTLSSocket alloc] initWithSocket: sock];
			sock = [[SSLSocket alloc] initWithSocket: sock];

			/* Stream restart */
			parser.delegate = self;
			[self XMPP_startStream];
			return;
		}