ObjOpenSSL  Diff

Differences From Artifact [2a7445a987]:

To Artifact [89dcbc8ece]:


296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
							    socket: self];

	if (atEndOfStream) {
		OFWriteFailedException *e;

		e = [OFWriteFailedException exceptionWithClass: [self class]
							stream: self
					 requestedLength: length];

#ifndef _WIN32
		e->errNo = ENOTCONN;
#else
		e->errNo = WSAENOTCONN;
#endif








|







296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
							    socket: self];

	if (atEndOfStream) {
		OFWriteFailedException *e;

		e = [OFWriteFailedException exceptionWithClass: [self class]
							stream: self
					       requestedLength: length];

#ifndef _WIN32
		e->errNo = ENOTCONN;
#else
		e->errNo = WSAENOTCONN;
#endif

390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
	unsigned long ret;

	if (SSL_get_peer_certificate(ssl) != NULL) {
		if ((ret = SSL_get_verify_result(ssl)) != X509_V_OK) {
			const char *tmp = X509_verify_cert_error_string(ret);
			OFString *reason = [OFString stringWithUTF8String: tmp];
			@throw [SSLInvalidCertificateException
				exceptionWithClass: [self class]
					    reason: reason];
		}
	} else
		@throw [SSLInvalidCertificateException
			exceptionWithClass: [self class]
				    reason: @"No certificate"];
}
@end







|
|



|
|


390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
	unsigned long ret;

	if (SSL_get_peer_certificate(ssl) != NULL) {
		if ((ret = SSL_get_verify_result(ssl)) != X509_V_OK) {
			const char *tmp = X509_verify_cert_error_string(ret);
			OFString *reason = [OFString stringWithUTF8String: tmp];
			@throw [SSLInvalidCertificateException
			    exceptionWithClass: [self class]
					reason: reason];
		}
	} else
		@throw [SSLInvalidCertificateException
		    exceptionWithClass: [self class]
				reason: @"No certificate"];
}
@end