354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
|
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
|
-
+
|
- (X509Certificate*)peerCertificate
{
X509 *certificate = SSL_get_peer_certificate(ssl);
if (!certificate)
return nil;
return [[[X509Certificate alloc]
initWithStruct: certificate] autorelease];
initWithX509Struct: certificate] autorelease];
}
- (void)verifyPeerCertificate
{
unsigned long ret;
if ((SSL_get_peer_certificate(ssl) == NULL)
|| ((ret = SSL_get_verify_result(ssl)) != X509_V_OK)) {
|