296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
|
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];
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
|
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];
exceptionWithClass: [self class]
reason: reason];
}
} else
@throw [SSLInvalidCertificateException
exceptionWithClass: [self class]
reason: @"No certificate"];
exceptionWithClass: [self class]
reason: @"No certificate"];
}
@end
|