<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/libgit2.git/src/transports/winhttp.c, branch ethomson/test_https</title>
<subtitle>github.com: libgit2/libgit2.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/'/>
<entry>
<title>Make enum in src,tests and examples C90 compliant by removing trailing comma.</title>
<updated>2021-11-15T15:45:40+00:00</updated>
<author>
<name>Peter Pettersson</name>
<email>boretrk@hotmail.com</email>
</author>
<published>2021-10-22T20:51:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=7dcc29fc4652caeb09de39827cfd1a80726b5995'/>
<id>7dcc29fc4652caeb09de39827cfd1a80726b5995</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>str: introduce `git_str` for internal, `git_buf` is external</title>
<updated>2021-10-17T13:49:01+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2021-09-07T21:53:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=f0e693b18afbe1de37d7da5b5a8967b6c87d8e53'/>
<id>f0e693b18afbe1de37d7da5b5a8967b6c87d8e53</id>
<content type='text'>
libgit2 has two distinct requirements that were previously solved by
`git_buf`.  We require:

1. A general purpose string class that provides a number of utility APIs
   for manipulating data (eg, concatenating, truncating, etc).
2. A structure that we can use to return strings to callers that they
   can take ownership of.

By using a single class (`git_buf`) for both of these purposes, we have
confused the API to the point that refactorings are difficult and
reasoning about correctness is also difficult.

Move the utility class `git_buf` to be called `git_str`: this represents
its general purpose, as an internal string buffer class.  The name also
is an homage to Junio Hamano ("gitstr").

The public API remains `git_buf`, and has a much smaller footprint.  It
is generally only used as an "out" param with strict requirements that
follow the documentation.  (Exceptions exist for some legacy APIs to
avoid breaking callers unnecessarily.)

Utility functions exist to convert a user-specified `git_buf` to a
`git_str` so that we can call internal functions, then converting it
back again.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
libgit2 has two distinct requirements that were previously solved by
`git_buf`.  We require:

1. A general purpose string class that provides a number of utility APIs
   for manipulating data (eg, concatenating, truncating, etc).
2. A structure that we can use to return strings to callers that they
   can take ownership of.

By using a single class (`git_buf`) for both of these purposes, we have
confused the API to the point that refactorings are difficult and
reasoning about correctness is also difficult.

Move the utility class `git_buf` to be called `git_str`: this represents
its general purpose, as an internal string buffer class.  The name also
is an homage to Junio Hamano ("gitstr").

The public API remains `git_buf`, and has a much smaller footprint.  It
is generally only used as an "out" param with strict requirements that
follow the documentation.  (Exceptions exist for some legacy APIs to
avoid breaking callers unnecessarily.)

Utility functions exist to convert a user-specified `git_buf` to a
`git_str` so that we can call internal functions, then converting it
back again.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix coding style for pointer</title>
<updated>2021-09-09T17:49:04+00:00</updated>
<author>
<name>punkymaniac</name>
<email>punkymaniac@protonmail.ch</email>
</author>
<published>2021-09-09T17:49:04+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=379c46463cbdd73e04c5efc180309d4600e56624'/>
<id>379c46463cbdd73e04c5efc180309d4600e56624</id>
<content type='text'>
Make some syntax change to follow coding style.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make some syntax change to follow coding style.
</pre>
</div>
</content>
</entry>
<entry>
<title>remote: refactor proxy detection</title>
<updated>2021-09-02T01:20:25+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2021-09-02T00:34:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=3c0f14cc95debb426bd53150aac0eef1a7f625d8'/>
<id>3c0f14cc95debb426bd53150aac0eef1a7f625d8</id>
<content type='text'>
Update the proxy detection for a remote.

1. Honor `http.&lt;url&gt;.proxy` syntax for a remote's direct URL and
   parent URLs.
2. Honor an empty configuration URL to override a proxy configuration.

Add tests to ensure that configuration specificity is honored.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Update the proxy detection for a remote.

1. Honor `http.&lt;url&gt;.proxy` syntax for a remote's direct URL and
   parent URLs.
2. Honor an empty configuration URL to override a proxy configuration.

Add tests to ensure that configuration specificity is honored.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add NO_PROXY env support</title>
<updated>2021-09-02T00:39:25+00:00</updated>
<author>
<name>Mathieu Parent</name>
<email>math.parent@gmail.com</email>
</author>
<published>2021-02-11T21:53:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=e5a3277452095a908787c3ea0279fbec21c0a76a'/>
<id>e5a3277452095a908787c3ea0279fbec21c0a76a</id>
<content type='text'>
Item 2 of 3 from #4164

Signed-off-by: Mathieu Parent &lt;math.parent@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Item 2 of 3 from #4164

Signed-off-by: Mathieu Parent &lt;math.parent@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'main' into http-use-eauth</title>
<updated>2021-08-30T01:29:14+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2021-08-30T01:29:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=9937967efd8a1567727f1d716c1a2efb3085006c'/>
<id>9937967efd8a1567727f1d716c1a2efb3085006c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>define WINHTTP_NO_CLIENT_CERT_CONTEXT if needed</title>
<updated>2021-06-26T17:52:21+00:00</updated>
<author>
<name>Jacques Germishuys</name>
<email>jacques.germishuys@doxim.com</email>
</author>
<published>2021-06-26T17:52:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=a2cd10e52b1f8ef77946129448b33128cd01e984'/>
<id>a2cd10e52b1f8ef77946129448b33128cd01e984</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>test: clean up memory leaks</title>
<updated>2021-05-06T01:04:24+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2021-05-06T00:46:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=b31795ef2c7196fd81d7e8714fd95c1fed3b0a09'/>
<id>b31795ef2c7196fd81d7e8714fd95c1fed3b0a09</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>winhttp: skip certificate check if unable to send request</title>
<updated>2021-03-02T00:40:30+00:00</updated>
<author>
<name>Ian Hattendorf</name>
<email>ianh@axosoft.com</email>
</author>
<published>2021-03-01T23:26:58+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=edffea1548d87cdb1c684792195166e7a1b36a4a'/>
<id>edffea1548d87cdb1c684792195166e7a1b36a4a</id>
<content type='text'>
In some circumstances (e.g. when proxies are involved), winhttp will fail to reach the WINHTTP_CALLBACK_STATUS_SENDING_REQUEST phase. If this occurs, we'll error with ERROR_WINHTTP_INCORRECT_HANDLE_STATE when attempting to query the server certificate context (see https://docs.microsoft.com/en-us/windows/win32/api/winhttp/nf-winhttp-winhttpsendrequest#remarks).

To avoid this, verify that WinHttpSendRequest has reached the WINHTTP_CALLBACK_STATUS_SENDING_REQUEST phase before checking the certificate. Since we're using WinHTTP in synchronous mode, we know for sure that once WinHttpSendRequest returns we've either sent it successfully or not.

NOTE: WINHTTP_CALLBACK_STATUS_SENDING_REQUEST appears to be deprecated with no direct replacement. WINHTTP_CALLBACK_STATUS_SENDREQUEST_COMPLETE is only available in async mode, and there doesn't appear to be a method of querying this flag outside of the status callback.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In some circumstances (e.g. when proxies are involved), winhttp will fail to reach the WINHTTP_CALLBACK_STATUS_SENDING_REQUEST phase. If this occurs, we'll error with ERROR_WINHTTP_INCORRECT_HANDLE_STATE when attempting to query the server certificate context (see https://docs.microsoft.com/en-us/windows/win32/api/winhttp/nf-winhttp-winhttpsendrequest#remarks).

To avoid this, verify that WinHttpSendRequest has reached the WINHTTP_CALLBACK_STATUS_SENDING_REQUEST phase before checking the certificate. Since we're using WinHTTP in synchronous mode, we know for sure that once WinHttpSendRequest returns we've either sent it successfully or not.

NOTE: WINHTTP_CALLBACK_STATUS_SENDING_REQUEST appears to be deprecated with no direct replacement. WINHTTP_CALLBACK_STATUS_SENDREQUEST_COMPLETE is only available in async mode, and there doesn't appear to be a method of querying this flag outside of the status callback.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix some typos</title>
<updated>2021-02-15T21:01:25+00:00</updated>
<author>
<name>Aaron Franke</name>
<email>arnfranke@yahoo.com</email>
</author>
<published>2021-02-15T20:47:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=7efddeb7376b3e10379ea662c9a235ae079119d7'/>
<id>7efddeb7376b3e10379ea662c9a235ae079119d7</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
