| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
Update our copy of sha1dc to the upstream commit 855827c (Detect
endianess on HP-UX, 2019-05-09). Changes include fixes to endian
detection on AIX and HP-UX systems as well as a define that
allows us to force aligned access, which we're not using yet.
|
| |
|
|
|
| |
Users of the Win32 hash cannot be inlined, as it uses a static struct.
Don't inline it, but continue to declare the function in the header.
|
| |
|
|
|
|
| |
This means the forward declaration isn't necessary. The forward
declaration can cause compilation errors as it conflicts with the
`GIT_INLINE` declaration (the signatures are different).
|
| |
|
|
|
| |
Move to the `git_error` name in the internal API for error-related
functions.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
| |
This updates the version of SHA1DC to c3e1304ea3.
|
| | |
|
| | |
|
| |
|
|
| |
use consistent names for the #include / #define header guard pattern.
|
| |\
| |
| | |
hash: openssl: check return values of SHA1_* functions
|
| | |
| |
| |
| |
| |
| | |
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.
|
| | |
| |
| |
| |
| |
| |
| | |
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.
|
| |/
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Next to including several files, our "common.h" header also declares
various macros which are then used throughout the project. As such, we
have to make sure to always include this file first in all
implementation files. Otherwise, we might encounter problems or even
silent behavioural differences due to macros or defines not being
defined as they should be. So in fact, our header and implementation
files should make sure to always include "common.h" first.
This commit does so by establishing a common include pattern. Header
files inside of "src" will now always include "common.h" as its first
other file, separated by a newline from all the other includes to make
it stand out as special. There are two cases for the implementation
files. If they do have a matching header file, they will always include
this one first, leading to "common.h" being transitively included as
first file. If they do not have a matching header file, they instead
include "common.h" as first file themselves.
This fixes the outlined problems and will become our standard practice
for header and source files inside of the "src/" from now on.
|
| |
|
|
|
| |
This updates our version of SHA1DC to e139984 (Merge pull request #35
from lidl/master, 2017-05-30).
|
| | |
|
| |
|
|
|
| |
Update SHA-1 collision detection code (cr-marcstevens/sha1collisiondetection)
to master to include performance improvements.
|
| |
|
|
|
| |
Include the SHA1 collision attack detection library from
https://github.com/cr-marcstevens/sha1collisiondetection
|
| | |
|
| |
|
|
|
|
| |
This describes their purpose better, as we now initialize ssl and some
other global stuff in there. Calling the init function is not something
which has been optional for a while now.
|
| |
|
|
|
| |
OSX has its own cryptographic library, let's make use of it instead of
calling out to OpenSSL.
|
| |
|
|
|
|
|
|
|
|
| |
Increasingly there are a number of components that want to do some
cleanup at global shutdown time (at least if there are not going
to be memory leaks). This creates a very simple system of shutdown
hooks that will be invoked by git_threads_shutdown. Right now, the
maximum number of hooks is hardcoded, but since adding a hook is
not a public API, it should be fine and I thought it was better to
start off with really simple code.
|
| |\
| |
| | |
Thread safety for the refdb_fs
|
| | |
| |
| |
| |
| |
| | |
This loads SRWLock APIs at runtime and in their absence (i.e. on
Windows before Vista) falls back on a regular CRITICAL_SECTION
that will not permit concurrent readers.
|
| |/ |
|
| | |
|
| |
|
|
|
| |
This reverts commit efe7fad6c96a3d6197a218aeaa561ec676794499, except for
the indentation fixes.
|
| |
|
|
| |
Along with that, fix indentation in tests-clar/object/raw/hash.c
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|