dinhviethoa/libetpan — pull request #179 by tapouillo (2014-12-13 12:21:14+00:00)
Title: kCFStreamPropertySSLPeerTrust fail on OS X<=10.8 - infinite loop

(following the #773 fix which caused a side effect on OS X <= 10.8 (maybe 10.9 too))
on OSX <= 10.8: the kCFStreamPropertySSLPeerTrust method works the first time, but always returns NULL after, causing an infinite loop.

This change falls back to the old kCFStreamPropertySSLPeerCertificates method if the first one returns NULL.
On OSX 10.10, the first method always work.