<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/curl.git/lib/socks.c, branch bagder/https-proxyu-req-http</title>
<subtitle>github.com: bagder/curl.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/curl.git/'/>
<entry>
<title>CURLE_PROXY: new error code</title>
<updated>2020-08-24T06:41:48+00:00</updated>
<author>
<name>Daniel Stenberg</name>
<email>daniel@haxx.se</email>
</author>
<published>2020-08-24T06:39:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/curl.git/commit/?id=88b1ca7cba5c94b11c3a6510146ba410e8858771'/>
<id>88b1ca7cba5c94b11c3a6510146ba410e8858771</id>
<content type='text'>
Failures clearly returned from a (SOCKS) proxy now causes this return
code. Previously the situation was not very clear as what would be
returned and when.

In addition: when this error code is returned, an application can use
CURLINFO_PROXY_ERROR to query libcurl for the detailed error, which then
returns a value from the new 'CURLproxycode' enum.

Closes #5770
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Failures clearly returned from a (SOCKS) proxy now causes this return
code. Previously the situation was not very clear as what would be
returned and when.

In addition: when this error code is returned, an application can use
CURLINFO_PROXY_ERROR to query libcurl for the detailed error, which then
returns a value from the new 'CURLproxycode' enum.

Closes #5770
</pre>
</div>
</content>
</entry>
<entry>
<title>socks: use size_t for size variable</title>
<updated>2020-07-12T20:52:19+00:00</updated>
<author>
<name>ihsinme</name>
<email>61293369+ihsinme@users.noreply.github.com</email>
</author>
<published>2020-07-05T12:19:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/curl.git/commit/?id=60aa96128889a59c87d760ffb0947d451c2103a3'/>
<id>60aa96128889a59c87d760ffb0947d451c2103a3</id>
<content type='text'>
Use the unsigned type (size_t) in the arithmetic of pointers. In this
context, the signed type (ssize_t) is used unnecessarily.

Authored-by: ihsinme on github
Closes #5654
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use the unsigned type (size_t) in the arithmetic of pointers. In this
context, the signed type (ssize_t) is used unnecessarily.

Authored-by: ihsinme on github
Closes #5654
</pre>
</div>
</content>
</entry>
<entry>
<title>socks: detect connection close during handshake</title>
<updated>2020-06-08T21:19:36+00:00</updated>
<author>
<name>Daniel Stenberg</name>
<email>daniel@haxx.se</email>
</author>
<published>2020-06-08T12:05:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/curl.git/commit/?id=2a41e236716da4c41ebc1132bd36d9273bd0321f'/>
<id>2a41e236716da4c41ebc1132bd36d9273bd0321f</id>
<content type='text'>
The SOCKS4/5 state machines weren't properly terminated when the proxy
connection got closed, leading to a busy-loop.

Reported-By: zloi-user on github
Fixes #5532
Closes #5542
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The SOCKS4/5 state machines weren't properly terminated when the proxy
connection got closed, leading to a busy-loop.

Reported-By: zloi-user on github
Fixes #5532
Closes #5542
</pre>
</div>
</content>
</entry>
<entry>
<title>socks: remove unreachable breaks in socks.c and mime.c</title>
<updated>2020-06-08T09:04:44+00:00</updated>
<author>
<name>xquery</name>
<email>jim@webcomposite.com</email>
</author>
<published>2020-06-08T06:42:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/curl.git/commit/?id=b950120b2d7ab70cb4aa900ae1e5ddc415afdf45'/>
<id>b950120b2d7ab70cb4aa900ae1e5ddc415afdf45</id>
<content type='text'>
Closes #5537
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Closes #5537
</pre>
</div>
</content>
</entry>
<entry>
<title>timeouts: move ms timeouts to timediff_t from int and long</title>
<updated>2020-06-06T18:05:58+00:00</updated>
<author>
<name>Marc Hoersken</name>
<email>info@marc-hoersken.de</email>
</author>
<published>2020-06-01T06:49:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/curl.git/commit/?id=3186f5005497df68ef0735b2e23b8a5c9d76d8b9'/>
<id>3186f5005497df68ef0735b2e23b8a5c9d76d8b9</id>
<content type='text'>
Now that all functions in select.[ch] take timediff_t instead
of the limited int or long, we can remove type conversions
and related preprocessor checks to silence compiler warnings.

Avoiding conversions from time_t was already done in 842f73de.

Based upon #5262
Supersedes #5214, #5220 and #5221
Follow up to #5343 and #5479
Closes #5490
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now that all functions in select.[ch] take timediff_t instead
of the limited int or long, we can remove type conversions
and related preprocessor checks to silence compiler warnings.

Avoiding conversions from time_t was already done in 842f73de.

Based upon #5262
Supersedes #5214, #5220 and #5221
Follow up to #5343 and #5479
Closes #5490
</pre>
</div>
</content>
</entry>
<entry>
<title>socks: fix expected length of SOCKS5 reply</title>
<updated>2020-06-05T21:20:10+00:00</updated>
<author>
<name>Cherish98</name>
<email>66007047+Cherish98@users.noreply.github.com</email>
</author>
<published>2020-06-05T17:36:11+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/curl.git/commit/?id=e980cbb8e7ca568719c7a9e9e31d566002d92f72'/>
<id>e980cbb8e7ca568719c7a9e9e31d566002d92f72</id>
<content type='text'>
Commit 4a4b63d forgot to set the expected SOCKS5 reply length when the
reply ATYP is X'01'. This resulted in erroneously expecting more bytes
when the request length is greater than the reply length (e.g., when
remotely resolving the hostname).

Closes #5527
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Commit 4a4b63d forgot to set the expected SOCKS5 reply length when the
reply ATYP is X'01'. This resulted in erroneously expecting more bytes
when the request length is greater than the reply length (e.g., when
remotely resolving the hostname).

Closes #5527
</pre>
</div>
</content>
</entry>
<entry>
<title>hostip: make Curl_printable_address not return anything</title>
<updated>2020-05-19T06:11:46+00:00</updated>
<author>
<name>Daniel Stenberg</name>
<email>daniel@haxx.se</email>
</author>
<published>2020-05-18T16:41:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/curl.git/commit/?id=67521b5ecf0e3b0d8ea5278b02400811715069be'/>
<id>67521b5ecf0e3b0d8ea5278b02400811715069be</id>
<content type='text'>
It was not used much anyway and instead we let it store a blank buffer
in case of failure.

Reported-by: MonocleAI
Fixes #5411
Closes #5418
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It was not used much anyway and instead we let it store a blank buffer
in case of failure.

Reported-by: MonocleAI
Fixes #5411
Closes #5418
</pre>
</div>
</content>
</entry>
<entry>
<title>source cleanup: remove all custom typedef structs</title>
<updated>2020-05-15T06:54:42+00:00</updated>
<author>
<name>Daniel Stenberg</name>
<email>daniel@haxx.se</email>
</author>
<published>2020-05-13T22:05:04+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/curl.git/commit/?id=8df455479f8801bbebad8839fc96abbffa711603'/>
<id>8df455479f8801bbebad8839fc96abbffa711603</id>
<content type='text'>
 - Stick to a single unified way to use structs
 - Make checksrc complain on 'typedef struct {'
 - Allow them in tests, public headers and examples

 - Let MD4_CTX, MD5_CTX, and SHA256_CTX typedefs remain as they actually
   typedef different types/structs depending on build conditions.

Closes #5338
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
 - Stick to a single unified way to use structs
 - Make checksrc complain on 'typedef struct {'
 - Allow them in tests, public headers and examples

 - Let MD4_CTX, MD5_CTX, and SHA256_CTX typedefs remain as they actually
   typedef different types/structs depending on build conditions.

Closes #5338
</pre>
</div>
</content>
</entry>
<entry>
<title>select: make Curl_socket_check take timediff_t timeout</title>
<updated>2020-04-23T13:57:23+00:00</updated>
<author>
<name>Daniel Stenberg</name>
<email>daniel@haxx.se</email>
</author>
<published>2020-04-15T08:27:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/curl.git/commit/?id=a96c7529eb31498a464910935a7d1a5e88ce3914'/>
<id>a96c7529eb31498a464910935a7d1a5e88ce3914</id>
<content type='text'>
Coverity found CID 1461718:

Integer handling issues (CONSTANT_EXPRESSION_RESULT) "timeout_ms &gt;
9223372036854775807L" is always false regardless of the values of its
operands. This occurs as the logical second operand of "||".

Closes #5240
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Coverity found CID 1461718:

Integer handling issues (CONSTANT_EXPRESSION_RESULT) "timeout_ms &gt;
9223372036854775807L" is always false regardless of the values of its
operands. This occurs as the logical second operand of "||".

Closes #5240
</pre>
</div>
</content>
</entry>
<entry>
<title>socks: Fix blocking timeout logic</title>
<updated>2020-04-12T22:32:16+00:00</updated>
<author>
<name>Jay Satiro</name>
<email>raysatiro@yahoo.com</email>
</author>
<published>2020-04-12T03:19:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/curl.git/commit/?id=0510cce8c090920f063b85a36669d8e74cff8d52'/>
<id>0510cce8c090920f063b85a36669d8e74cff8d52</id>
<content type='text'>
- Document in Curl_timeleft's comment block that returning 0 signals no
  timeout (ie there's infinite time left).

- Fix SOCKS' Curl_blockread_all for the case when no timeout was set.

Prior to this change if the timeout had a value of 0 and that was passed
to SOCKET_READABLE it would return right away instead of blocking. That
was likely because it was not well understood that when Curl_timeleft
returns 0 it is not a timeout of 0 ms but actually means no timeout.

Ref: https://github.com/curl/curl/pull/5214#issuecomment-612512360

Closes https://github.com/curl/curl/pull/5220
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Document in Curl_timeleft's comment block that returning 0 signals no
  timeout (ie there's infinite time left).

- Fix SOCKS' Curl_blockread_all for the case when no timeout was set.

Prior to this change if the timeout had a value of 0 and that was passed
to SOCKET_READABLE it would return right away instead of blocking. That
was likely because it was not well understood that when Curl_timeleft
returns 0 it is not a timeout of 0 ms but actually means no timeout.

Ref: https://github.com/curl/curl/pull/5214#issuecomment-612512360

Closes https://github.com/curl/curl/pull/5220
</pre>
</div>
</content>
</entry>
</feed>
