ObjOpenSSL  Check-in [7abcafcb74]

Overview
Comment:Fix forgotten change.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 7abcafcb740e2a1a99c6565a1aeefac77f5cfcdcf80229d2496a27a8b84124e2
User & Date: js on 2011-09-11 02:03:48
Other Links: manifest | tags
Context
2011-09-11
02:07
Correctly check return value of SSL_write. check-in: 60a6491ea5 user: js tags: trunk
02:03
Fix forgotten change. check-in: 7abcafcb74 user: js tags: trunk
2011-09-10
20:41
Ignore deprecation warnings as OpenSSL is deprecated as a whole on OS X. check-in: 174ffb9295 user: js tags: trunk
Changes

Modified src/SSLSocket.m from [5efba47a1d] to [8f42d0a3cf].

215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233

	if (ret == 0)
		isAtEndOfStream = YES;

	return ret;
}

- (size_t)_writeNBytes: (size_t)length
	    fromBuffer: (const char*)buffer
{
	ssize_t ret;

	if (length > INT_MAX)
		@throw [OFOutOfRangeException newWithClass: isa];

	if (sock == INVALID_SOCKET)
		@throw [OFNotConnectedException newWithClass: isa
						      socket: self];








|
|

<
<







215
216
217
218
219
220
221
222
223
224


225
226
227
228
229
230
231

	if (ret == 0)
		isAtEndOfStream = YES;

	return ret;
}

- (void)_writeNBytes: (size_t)length
	  fromBuffer: (const char*)buffer
{


	if (length > INT_MAX)
		@throw [OFOutOfRangeException newWithClass: isa];

	if (sock == INVALID_SOCKET)
		@throw [OFNotConnectedException newWithClass: isa
						      socket: self];

243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
#else
		e->errNo = WSAENOTCONN;
#endif

		@throw e;
	}

	if ((ret = SSL_write(ssl, buffer, (int)length)) < 1)
		@throw [OFWriteFailedException newWithClass: isa
						     stream: self
					    requestedLength: length];

	return ret;
}

- (size_t)pendingBytes
{
	return [super pendingBytes] + SSL_pending(ssl);
}








|



<
<







241
242
243
244
245
246
247
248
249
250
251


252
253
254
255
256
257
258
#else
		e->errNo = WSAENOTCONN;
#endif

		@throw e;
	}

	if (SSL_write(ssl, buffer, (int)length) < 1)
		@throw [OFWriteFailedException newWithClass: isa
						     stream: self
					    requestedLength: length];


}

- (size_t)pendingBytes
{
	return [super pendingBytes] + SSL_pending(ssl);
}