mirror of
https://github.com/AGWA/git-crypt.git
synced 2026-01-04 17:18:01 -08:00
Check HMAC in smudge and diff commands
Git-crypt's position has always been that authentication is best left to Git, since 1) Git provides immutable history based on SHA-1 hashes as well as GPG-signed commits and tags, and 2) git-crypt can't be used safely anyways unless the overall integrity of your repository is assured. But, since git-crypt already has easy access to a (truncated) HMAC of the file when decrypting, there's really no reason why git-crypt shouldn't just verify it and provide an additional layer of protection.
This commit is contained in:
1
util.hpp
1
util.hpp
@@ -71,6 +71,7 @@ void store_be32 (unsigned char*, uint32_t);
|
||||
bool read_be32 (std::istream& in, uint32_t&);
|
||||
void write_be32 (std::ostream& out, uint32_t);
|
||||
void* explicit_memset (void* s, int c, size_t n); // memset that won't be optimized away
|
||||
bool leakless_equals (const void* a, const void* b, size_t len); // compare bytes w/o leaking timing
|
||||
void init_std_streams ();
|
||||
mode_t util_umask (mode_t);
|
||||
int util_rename (const char*, const char*);
|
||||
|
||||
Reference in New Issue
Block a user