@@ -87,10 +87,14 @@ if (mode & CRYPTO_LOCK) of_mutex_lock(&ssl_mutexes[n]); else of_mutex_unlock(&ssl_mutexes[n]); } + +@interface SSLSocket () +- (void)SSL_super_close; +@end @implementation SSLSocket @synthesize delegate = _delegate, certificateFile = _certificateFile; @synthesize privateKeyFile = _privateKeyFile; @synthesize privateKeyPassphrase = privateKeyPassphrase; @@ -442,11 +446,11 @@ - (X509Certificate *)peerCertificate { X509 *certificate = SSL_get_peer_certificate(_SSL); - if (!certificate) + if (certificate == NULL) return nil; return [[[X509Certificate alloc] initWithX509Struct: certificate] autorelease]; }