On Fri, Sep 04, 2015 at 09:24:21AM +0200, Gait Boxman wrote: > I'm occasionally getting code 5 from SSL_get_verify_result when attempting > to setup an SSL/TLS connection to an MS Exchange server using v1.02a. Show the relevant code that returns "5". Most frequently "5" is SSL_ERROR_SYSCALL, returned by SSL_get_error(). As you note, this value is never set as the verification result by OpenSSL itself, so unless you have verify callbacks that change the X509_STORE_CTX error value, perhaps you're reporting the return value of the wrong function. -- Viktor.