openssl: Use 'CURLcode result'
More CURLcode fixes.
This commit is contained in:
parent
9bc2582c31
commit
b04eef1318
@ -1449,6 +1449,7 @@ select_next_proto_cb(SSL *ssl,
|
||||
{
|
||||
struct connectdata *conn = (struct connectdata*) arg;
|
||||
int retval = nghttp2_select_next_protocol(out, outlen, in, inlen);
|
||||
|
||||
(void)ssl;
|
||||
|
||||
if(retval == 1) {
|
||||
@ -1471,7 +1472,8 @@ select_next_proto_cb(SSL *ssl,
|
||||
return SSL_TLSEXT_ERR_OK;
|
||||
}
|
||||
#endif /* HAS_NPN */
|
||||
#endif
|
||||
|
||||
#endif /* USE_NGHTTP2 */
|
||||
|
||||
static const char *
|
||||
get_ssl_version_txt(SSL_SESSION *session)
|
||||
@ -2643,13 +2645,12 @@ static CURLcode ossl_connect_step3(struct connectdata *conn, int sockindex)
|
||||
static Curl_recv ossl_recv;
|
||||
static Curl_send ossl_send;
|
||||
|
||||
static CURLcode
|
||||
ossl_connect_common(struct connectdata *conn,
|
||||
static CURLcode ossl_connect_common(struct connectdata *conn,
|
||||
int sockindex,
|
||||
bool nonblocking,
|
||||
bool *done)
|
||||
{
|
||||
CURLcode retcode;
|
||||
CURLcode result;
|
||||
struct SessionHandle *data = conn->data;
|
||||
struct ssl_connect_data *connssl = &conn->ssl[sockindex];
|
||||
curl_socket_t sockfd = conn->sock[sockindex];
|
||||
@ -2671,9 +2672,10 @@ ossl_connect_common(struct connectdata *conn,
|
||||
failf(data, "SSL connection timeout");
|
||||
return CURLE_OPERATION_TIMEDOUT;
|
||||
}
|
||||
retcode = ossl_connect_step1(conn, sockindex);
|
||||
if(retcode)
|
||||
return retcode;
|
||||
|
||||
result = ossl_connect_step1(conn, sockindex);
|
||||
if(result)
|
||||
return result;
|
||||
}
|
||||
|
||||
while(ssl_connect_2 == connssl->connecting_state ||
|
||||
@ -2690,8 +2692,8 @@ ossl_connect_common(struct connectdata *conn,
|
||||
}
|
||||
|
||||
/* if ssl is expecting something, check if it's available. */
|
||||
if(connssl->connecting_state == ssl_connect_2_reading
|
||||
|| connssl->connecting_state == ssl_connect_2_writing) {
|
||||
if(connssl->connecting_state == ssl_connect_2_reading ||
|
||||
connssl->connecting_state == ssl_connect_2_writing) {
|
||||
|
||||
curl_socket_t writefd = ssl_connect_2_writing==
|
||||
connssl->connecting_state?sockfd:CURL_SOCKET_BAD;
|
||||
@ -2724,20 +2726,19 @@ ossl_connect_common(struct connectdata *conn,
|
||||
* before step2 has completed while ensuring that a client using select()
|
||||
* or epoll() will always have a valid fdset to wait on.
|
||||
*/
|
||||
retcode = ossl_connect_step2(conn, sockindex);
|
||||
if(retcode || (nonblocking &&
|
||||
result = ossl_connect_step2(conn, sockindex);
|
||||
if(result || (nonblocking &&
|
||||
(ssl_connect_2 == connssl->connecting_state ||
|
||||
ssl_connect_2_reading == connssl->connecting_state ||
|
||||
ssl_connect_2_writing == connssl->connecting_state)))
|
||||
return retcode;
|
||||
return result;
|
||||
|
||||
} /* repeat step2 until all transactions are done. */
|
||||
|
||||
|
||||
if(ssl_connect_3 == connssl->connecting_state) {
|
||||
retcode = ossl_connect_step3(conn, sockindex);
|
||||
if(retcode)
|
||||
return retcode;
|
||||
result = ossl_connect_step3(conn, sockindex);
|
||||
if(result)
|
||||
return result;
|
||||
}
|
||||
|
||||
if(ssl_connect_done == connssl->connecting_state) {
|
||||
|
Loading…
Reference in New Issue
Block a user