<feed xmlns='http://www.w3.org/2005/Atom'>
<title>apt/methods/connect.cc, branch 2.2.0</title>
<subtitle>Debians commandline package manager</subtitle>
<id>https://git.kalnischkies.de/apt/atom?h=2.2.0</id>
<link rel='self' href='https://git.kalnischkies.de/apt/atom?h=2.2.0'/>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/'/>
<updated>2020-12-22T23:54:14Z</updated>
<entry>
<title>connect: use ServiceNameOrPort, not Port, as the cache key</title>
<updated>2020-12-22T23:54:14Z</updated>
<author>
<name>Faidon Liambotis</name>
<email>paravoid@debian.org</email>
</author>
<published>2020-12-22T23:54:14Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=1663774bf309fbd196fd2b9c5c2afdd7a25fd288'/>
<id>urn:sha1:1663774bf309fbd196fd2b9c5c2afdd7a25fd288</id>
<content type='text'>
The "last connection" cache is currently being stored and looked up on
the combination of (LastHost, LastPort). However, these are not what the
arguments to getaddrinfo() were on the first try: the call is to
getaddrinfo(Host, ServiceNameOrPort, ...), i.e. with the port *or if 0,
the service name* (e.g. http).

Effectively this means that the connection cache lookup for:
   https://example.org/... i.e. Host = example.org, Port = 0, Service = http
would end up matching the "last" connection of (if existed):
   https://example.org/... i.e. Host = example.org, Port = 0, Service = https
...and thus performing a TLS request over an (unrelated) port 80
connection. Therefore, an HTTP request, followed up by an (unrelated)
HTTPS request to the same server, would always fail.

Address this by using as the cache key the ServiceNameOrPort, rather
than Port.
</content>
</entry>
<entry>
<title>connect: convert a C-style string to std::string</title>
<updated>2020-12-22T23:51:50Z</updated>
<author>
<name>Faidon Liambotis</name>
<email>paravoid@debian.org</email>
</author>
<published>2020-12-22T23:51:50Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=8d4b3a4fcead0ca534b5d1c5a99ae2a4c95eee21'/>
<id>urn:sha1:8d4b3a4fcead0ca534b5d1c5a99ae2a4c95eee21</id>
<content type='text'>
Convert the fixed-size (300) char array "ServStr" to a std::string, and
simplify the code by removing snprintfs in the process.

While at it, rename to the more aptly named "ServiceNameOrPort" and
update the comment to reflect what this variable is meant to be.
</content>
</entry>
<entry>
<title>Apply various suggestions by cppcheck</title>
<updated>2019-07-08T13:51:17Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2019-07-08T13:48:59Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=2b734a7ec429825c7007c1093883229e069d36c7'/>
<id>urn:sha1:2b734a7ec429825c7007c1093883229e069d36c7</id>
<content type='text'>
Reported-By: cppcheck
</content>
</entry>
<entry>
<title>Merge tag '1.8.2'</title>
<updated>2019-06-11T12:16:18Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2019-06-11T12:16:18Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=93e0ba2bfde58e6c1fbad53614083be8754d7ee8'/>
<id>urn:sha1:93e0ba2bfde58e6c1fbad53614083be8754d7ee8</id>
<content type='text'>
apt Debian release 1.8.2
</content>
</entry>
<entry>
<title>methods: https: handle requests for TLS re-handshake</title>
<updated>2019-05-21T12:53:01Z</updated>
<author>
<name>Michael Zhivich</name>
<email>mzhivich@akamai.com</email>
</author>
<published>2019-05-20T19:07:04Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=f3e109d40937dbf90994bcf74b76837ec670205c'/>
<id>urn:sha1:f3e109d40937dbf90994bcf74b76837ec670205c</id>
<content type='text'>
When accessing repository protected by TLS mutual auth, apt may receive
a "re-handshake" request from the server, which must be handled
in order for download to proceed.

This situation arises when the server requests a client certificate
based on the resource path provided in the GET request, after the inital
handshake in UnwrapTLS() has already occurred, and a secure connection
has been established.

This issue has been observed with Artifactory-backed Debian repository.

To address the issue, split TLS handshake code out into its own method
in TlsFd, and call it when GNUTLS_E_REHANDSHAKE error is received.

Signed-off-by: Michael Zhivich &lt;mzhivich@akamai.com&gt;

(merged from Debian/apt#93)

LP: #1829861
</content>
</entry>
<entry>
<title>Fix new gcc-9 warning -Wpessimizing-move</title>
<updated>2019-04-16T10:59:54Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2019-04-14T23:54:26Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=a967ba05416db27127f9a0ba85bb92377e6bb73e'/>
<id>urn:sha1:a967ba05416db27127f9a0ba85bb92377e6bb73e</id>
<content type='text'>
warning: moving a local object in a return statement prevents copy
elision [-Wpessimizing-move]

Reported-By: gcc-9
Gbp-Dch: Ignore
</content>
</entry>
<entry>
<title>Handle a missed case of timed out ip addresses</title>
<updated>2018-05-24T12:26:16Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2018-05-24T12:16:30Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=71b65b3563d223f6cd69261918ec06d10da48e6c'/>
<id>urn:sha1:71b65b3563d223f6cd69261918ec06d10da48e6c</id>
<content type='text'>
Correctly register timed out IP addresses from a timed out
select() call as a bad address so we do not try it again.

LP: #1766542
</content>
</entry>
<entry>
<title>Reword error for timed out read/write on SOCKS proxy</title>
<updated>2018-05-19T19:39:08Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2018-05-19T19:05:48Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=dd23021f588f5d50171cfb0d54108f594b139b26'/>
<id>urn:sha1:dd23021f588f5d50171cfb0d54108f594b139b26</id>
<content type='text'>
Closes: #898886
</content>
</entry>
<entry>
<title>Remove obsolete RCS keywords</title>
<updated>2018-05-07T11:41:31Z</updated>
<author>
<name>Guillem Jover</name>
<email>guillem@debian.org</email>
</author>
<published>2018-05-06T20:32:41Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=164f1b78d1849a0f33df7352875f86e28f5de06a'/>
<id>urn:sha1:164f1b78d1849a0f33df7352875f86e28f5de06a</id>
<content type='text'>
Prompted-by: Jakub Wilk &lt;jwilk@debian.org&gt;
</content>
</entry>
<entry>
<title>Correctly report transient errors again</title>
<updated>2018-01-03T15:33:36Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>jak@debian.org</email>
</author>
<published>2018-01-03T15:28:59Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=5b197e9de5376e191018562309e2d42123c27a1d'/>
<id>urn:sha1:5b197e9de5376e191018562309e2d42123c27a1d</id>
<content type='text'>
Commit 47c0bdc310c8cd62374ca6e6bb456dd183bdfc07 ("report transient
errors as transient error") accidentally changed some connection
failures to become non-transient, because the result of the error
checks where being ignored and then fatal error was returned if an
error was pending - even if that error was trivial.

After the merge of pu/happy-eyeballs2a this becomes a lot clearer,
and easy to fix.

Gbp-Dch: ignore
Regression-Of: 47c0bdc310c8cd62374ca6e6bb456dd183bdfc07
</content>
</entry>
</feed>
