The variable wasn't assigned at all until step3 which would lead to a
failed connect never assigning the variable and thus returning a bad
value.
Reported-by: Larry Lin
Bug: http://curl.haxx.se/mail/lib-2014-04/0203.html
/* Make funny stuff to get random input */
Curl_ossl_seed(data);
+ data->set.ssl.certverifyresult = !X509_V_OK;
+
/* check to see if we've been told to use an explicit SSL/TLS version */
switch(data->set.ssl.version) {
/* we've been asked to gather certificate info! */
(void)get_cert_chain(conn, connssl);
- data->set.ssl.certverifyresult = !X509_V_OK;
-
connssl->server_cert = SSL_get_peer_certificate(connssl->handle);
if(!connssl->server_cert) {
if(strict)