mirror of
https://github.com/curl/curl.git
synced 2026-07-21 18:37:17 +03:00
wolfssl: fix build for wolfssl without bio chain support
- Do not mix declarations and code. (ISO C90 build error) Ref: https://github.com/curl/curl/pull/22252#issuecomment-4871171567 Closes https://github.com/curl/curl/pull/22255
This commit is contained in:
parent
2213e4bff0
commit
3dd6a87a7f
1 changed files with 11 additions and 9 deletions
|
|
@ -1539,15 +1539,17 @@ static CURLcode wssl_connect_step1(struct Curl_cfilter *cf,
|
|||
wolfSSL_set_bio(wssl->ssl, bio, bio);
|
||||
}
|
||||
#else /* !USE_BIO_CHAIN */
|
||||
curl_socket_t sockfd = Curl_conn_cf_get_socket(cf, data);
|
||||
if(sockfd > INT_MAX) {
|
||||
failf(data, "SSL: socket value too large");
|
||||
return CURLE_SSL_CONNECT_ERROR;
|
||||
}
|
||||
/* pass the raw socket into the SSL layer */
|
||||
if(!wolfSSL_set_fd(wssl->ssl, (int)sockfd)) {
|
||||
failf(data, "SSL: wolfSSL_set_fd failed");
|
||||
return CURLE_SSL_CONNECT_ERROR;
|
||||
{
|
||||
curl_socket_t sockfd = Curl_conn_cf_get_socket(cf, data);
|
||||
if(sockfd > INT_MAX) {
|
||||
failf(data, "SSL: socket value too large");
|
||||
return CURLE_SSL_CONNECT_ERROR;
|
||||
}
|
||||
/* pass the raw socket into the SSL layer */
|
||||
if(!wolfSSL_set_fd(wssl->ssl, (int)sockfd)) {
|
||||
failf(data, "SSL: wolfSSL_set_fd failed");
|
||||
return CURLE_SSL_CONNECT_ERROR;
|
||||
}
|
||||
}
|
||||
#endif /* USE_BIO_CHAIN */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue