<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/libgit2.git/src/hash, branch ethomson/git_obj</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>hash: convert `global_init` macros to real function</title>
<updated>2019-01-02T08:27:44+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2019-01-02T08:27:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=03dc6480b41bdfa33911784d772d612f8e5c023b'/>
<id>03dc6480b41bdfa33911784d772d612f8e5c023b</id>
<content type='text'>
The `git_hash_global_init` function is simply defined as a macro to zero
for most of the different hash implementations. This makes it impossible
to treat it like a function pointer, which is required for a later
commit where we want to improve the way global initialization works.
Fix the issue by converting all no-op macros to an inline function
returning zero.

There's a small gotcha here, though: as most hash implementations only
have a header file, but not a corresponding implementation file, we
cannot declare the function as non-static. But declaring it as `static
inline` fails, too, as there is a previous declaration as non-static. So
we have to move the function declaration after the include that brings
in the function definition, as it is allowed to have a non-static
declaration after a static definition, but not the other way round.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The `git_hash_global_init` function is simply defined as a macro to zero
for most of the different hash implementations. This makes it impossible
to treat it like a function pointer, which is required for a later
commit where we want to improve the way global initialization works.
Fix the issue by converting all no-op macros to an inline function
returning zero.

There's a small gotcha here, though: as most hash implementations only
have a header file, but not a corresponding implementation file, we
cannot declare the function as non-static. But declaring it as `static
inline` fails, too, as there is a previous declaration as non-static. So
we have to move the function declaration after the include that brings
in the function definition, as it is allowed to have a non-static
declaration after a static definition, but not the other way round.
</pre>
</div>
</content>
</entry>
<entry>
<title>mbedtls: use libmbedcrypto for hashing</title>
<updated>2018-04-11T19:02:43+00:00</updated>
<author>
<name>Etienne Samson</name>
<email>samson.etienne@gmail.com</email>
</author>
<published>2018-03-29T20:13:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=6c6be3ce6ff23429089c0211870971b17246a992'/>
<id>6c6be3ce6ff23429089c0211870971b17246a992</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>sha1dc: update to fix errors with endianess</title>
<updated>2018-03-28T15:37:39+00:00</updated>
<author>
<name>bgermann</name>
<email>bgermann@users.noreply.github.com</email>
</author>
<published>2018-03-28T15:37:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=c9e5ba09c396f82b0de64de8b84684d2cace4669'/>
<id>c9e5ba09c396f82b0de64de8b84684d2cace4669</id>
<content type='text'>
This updates the version of SHA1DC to c3e1304ea3.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This updates the version of SHA1DC to c3e1304ea3.
</pre>
</div>
</content>
</entry>
<entry>
<title>hash: win32: fix missing comma in `giterr_set`</title>
<updated>2018-02-09T17:55:18+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2018-02-09T17:55:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=178fda8ac9b7b2c2e56c5b2daf0ceff9df2d8f5d'/>
<id>178fda8ac9b7b2c2e56c5b2daf0ceff9df2d8f5d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>hash: set error messages on failure</title>
<updated>2018-02-09T10:58:22+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2018-02-01T14:32:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=9985edb579b75c40e33af1c42415c90fc669b73f'/>
<id>9985edb579b75c40e33af1c42415c90fc669b73f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>consistent header guards</title>
<updated>2018-02-01T23:56:33+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2018-02-01T23:55:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=abb04caa2f74bb4783eb87202a904c0c3517df85'/>
<id>abb04caa2f74bb4783eb87202a904c0c3517df85</id>
<content type='text'>
use consistent names for the #include / #define header guard pattern.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
use consistent names for the #include / #define header guard pattern.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge pull request #4437 from pks-t/pks/openssl-hash-errors</title>
<updated>2018-01-03T20:57:25+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2018-01-03T20:57:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=a223bae5cf7629fb77b2af0b0df9d02c634520c0'/>
<id>a223bae5cf7629fb77b2af0b0df9d02c634520c0</id>
<content type='text'>
hash: openssl: check return values of SHA1_* functions</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
hash: openssl: check return values of SHA1_* functions</pre>
</div>
</content>
</entry>
<entry>
<title>hash: openssl: check return values of SHA1_* functions</title>
<updated>2018-01-03T12:49:11+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2017-12-08T10:10:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=75e1737a5173709b14b669bf08dae78232c6389d'/>
<id>75e1737a5173709b14b669bf08dae78232c6389d</id>
<content type='text'>
The OpenSSL functions `SHA1_Init`, `SHA1_Update` and `SHA1_Final` all
return 1 for success and 0 otherwise, but we never check their return
values. Do so.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The OpenSSL functions `SHA1_Init`, `SHA1_Update` and `SHA1_Final` all
return 1 for success and 0 otherwise, but we never check their return
values. Do so.
</pre>
</div>
</content>
</entry>
<entry>
<title>hash: commoncrypto hash should support large files</title>
<updated>2017-12-20T16:08:04+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2017-12-11T16:46:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=bdb542143909fc278c8ba89b0c64cdf72fcaf7d2'/>
<id>bdb542143909fc278c8ba89b0c64cdf72fcaf7d2</id>
<content type='text'>
Teach the CommonCrypto hash mechanisms to support large files.  The hash
primitives take a `CC_LONG` (aka `uint32_t`) at a time.  So loop to give
the hash function at most an unsigned 32 bit's worth of bytes until we
have hashed the entire file.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Teach the CommonCrypto hash mechanisms to support large files.  The hash
primitives take a `CC_LONG` (aka `uint32_t`) at a time.  So loop to give
the hash function at most an unsigned 32 bit's worth of bytes until we
have hashed the entire file.
</pre>
</div>
</content>
</entry>
<entry>
<title>hash: win32 hash mechanism should support large files</title>
<updated>2017-12-20T16:08:04+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2017-12-10T17:26:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=a89560d5693a2f43cc852cb5806df837dc79b790'/>
<id>a89560d5693a2f43cc852cb5806df837dc79b790</id>
<content type='text'>
Teach the win32 hash mechanisms to support large files.  The hash
primitives take at most `ULONG_MAX` bytes at a time.  Loop, giving the
hash function the maximum supported number of bytes, until we have
hashed the entire file.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Teach the win32 hash mechanisms to support large files.  The hash
primitives take at most `ULONG_MAX` bytes at a time.  Loop, giving the
hash function the maximum supported number of bytes, until we have
hashed the entire file.
</pre>
</div>
</content>
</entry>
</feed>
