ObjOpenSSL  Diff

Differences From Artifact [97d862768e]:

To Artifact [2a7445a987]:


385
386
387
388
389
390
391
392
393
394
395
396
397







398
399





400
401
385
386
387
388
389
390
391






392
393
394
395
396
397
398


399
400
401
402
403
404
405







-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
+
+
+
+
+


	    initWithX509Struct: certificate] autorelease];
}

- (void)verifyPeerCertificate
{
	unsigned long ret;

	if ((SSL_get_peer_certificate(ssl) == NULL) ||
	    ((ret = SSL_get_verify_result(ssl)) != X509_V_OK)) {
		const char *reason = X509_verify_cert_error_string(ret);
		@throw [SSLInvalidCertificateException
			exceptionWithClass: [self class]
				    reason: [OFString
	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];
						stringWithUTF8String: reason]];
	}
		}
	} else
		@throw [SSLInvalidCertificateException
			exceptionWithClass: [self class]
				    reason: @"No certificate"];
}
@end