summaryrefslogtreecommitdiff
path: root/git-gui/lib/commit.tcl
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2018-05-02 00:25:53 +0000
committerJunio C Hamano <gitster@pobox.com>2018-05-02 13:59:51 +0900
commitf6d27d2468ccf8e123f9bffde6466d673dba2317 (patch)
treee6eb115145535ec016c3fcde713ff96d00c0a567 /git-gui/lib/commit.tcl
parentde1d81d5af635aaa8269d54ee06d99c2b0b75c62 (diff)
builtin/receive-pack: avoid hard-coded constants for push certs
Use the GIT_SHA1_RAWSZ and GIT_SHA1_HEXSZ macros instead of hard-coding the constants 20 and 40. Switch one use of 20 with a format specifier for a hex value to use the hex constant instead, as the original appears to have been a typo. At this point, avoid converting the hard-coded use of SHA-1 to use the_hash_algo. SHA-1, even if not collision resistant, is secure in the context in which it is used here, and the hash algorithm of the repo need not match what is used here. When we adopt a new hash algorithm, we can simply adopt the new algorithm wholesale here, as the nonce is opaque and its length and validity are entirely controlled by the server. Consequently, defer updating this code until that point. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-gui/lib/commit.tcl')
0 files changed, 0 insertions, 0 deletions