@@ -2708,9 +2708,9 @@ inline socket_t create_client_socket(
27082708 [&](socket_t sock2, struct addrinfo &ai) -> bool {
27092709 if (!intf.empty ()) {
27102710#ifdef USE_IF2IP
2711- auto ip = if2ip (address_family, intf);
2712- if (ip .empty ()) { ip = intf; }
2713- if (!bind_ip_address (sock2, ip .c_str ())) {
2711+ auto ip_from_if = if2ip (address_family, intf);
2712+ if (ip_from_if .empty ()) { ip_from_if = intf; }
2713+ if (!bind_ip_address (sock2, ip_from_if .c_str ())) {
27142714 error = Error::BindIPAddress;
27152715 return false ;
27162716 }
@@ -6320,8 +6320,8 @@ inline std::unique_ptr<Response> ClientImpl::send_with_content_provider(
63206320 auto last = offset + data_len == content_length;
63216321
63226322 auto ret = compressor.compress (
6323- data, data_len, last, [&](const char *data , size_t data_len ) {
6324- req.body .append (data, data_len );
6323+ data, data_len, last, [&](const char *compressed_data , size_t compressed_data_len ) {
6324+ req.body .append (compressed_data, compressed_data_len );
63256325 return true ;
63266326 });
63276327
@@ -7378,11 +7378,11 @@ inline SSL_CTX *SSLServer::ssl_context() const { return ctx_; }
73787378inline bool SSLServer::process_and_close_socket (socket_t sock) {
73797379 auto ssl = detail::ssl_new (
73807380 sock, ctx_, ctx_mutex_,
7381- [&](SSL *ssl ) {
7381+ [&](SSL *ssl2 ) {
73827382 return detail::ssl_connect_or_accept_nonblocking (
7383- sock, ssl , SSL_accept, read_timeout_sec_, read_timeout_usec_);
7383+ sock, ssl2 , SSL_accept, read_timeout_sec_, read_timeout_usec_);
73847384 },
7385- [](SSL * /* ssl */ ) { return true ; });
7385+ [](SSL * /* ssl2 */ ) { return true ; });
73867386
73877387 bool ret = false ;
73887388 if (ssl) {
@@ -7576,31 +7576,31 @@ inline bool SSLClient::load_certs() {
75767576inline bool SSLClient::initialize_ssl (Socket &socket, Error &error) {
75777577 auto ssl = detail::ssl_new (
75787578 socket.sock , ctx_, ctx_mutex_,
7579- [&](SSL *ssl ) {
7579+ [&](SSL *ssl2 ) {
75807580 if (server_certificate_verification_) {
75817581 if (!load_certs ()) {
75827582 error = Error::SSLLoadingCerts;
75837583 return false ;
75847584 }
7585- SSL_set_verify (ssl , SSL_VERIFY_NONE, nullptr );
7585+ SSL_set_verify (ssl2 , SSL_VERIFY_NONE, nullptr );
75867586 }
75877587
75887588 if (!detail::ssl_connect_or_accept_nonblocking (
7589- socket.sock , ssl , SSL_connect, connection_timeout_sec_,
7589+ socket.sock , ssl2 , SSL_connect, connection_timeout_sec_,
75907590 connection_timeout_usec_)) {
75917591 error = Error::SSLConnection;
75927592 return false ;
75937593 }
75947594
75957595 if (server_certificate_verification_) {
7596- verify_result_ = SSL_get_verify_result (ssl );
7596+ verify_result_ = SSL_get_verify_result (ssl2 );
75977597
75987598 if (verify_result_ != X509_V_OK) {
75997599 error = Error::SSLServerVerification;
76007600 return false ;
76017601 }
76027602
7603- auto server_cert = SSL_get_peer_certificate (ssl );
7603+ auto server_cert = SSL_get_peer_certificate (ssl2 );
76047604
76057605 if (server_cert == nullptr ) {
76067606 error = Error::SSLServerVerification;
@@ -7617,8 +7617,8 @@ inline bool SSLClient::initialize_ssl(Socket &socket, Error &error) {
76177617
76187618 return true ;
76197619 },
7620- [&](SSL *ssl ) {
7621- SSL_set_tlsext_host_name (ssl , host_.c_str ());
7620+ [&](SSL *ssl2 ) {
7621+ SSL_set_tlsext_host_name (ssl2 , host_.c_str ());
76227622 return true ;
76237623 });
76247624
0 commit comments