diff options
author | Werner Koch <wk@gnupg.org> | 2011-02-04 12:57:53 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2011-02-04 12:57:53 +0100 |
commit | b008274afdbe375b32a7e66dbd073e200f6f0587 (patch) | |
tree | 219e239d39cf06be3f03aa82fb572080ac163a15 /g10/seckey-cert.c | |
parent | Let autogen.sh check the git config (diff) | |
download | gnupg2-b008274afdbe375b32a7e66dbd073e200f6f0587.tar.xz gnupg2-b008274afdbe375b32a7e66dbd073e200f6f0587.zip |
Nuked almost all trailing white space.post-nuke-of-trailing-ws
We better do this once and for all instead of cluttering all future
commits with diffs of trailing white spaces. In the majority of cases
blank or single lines are affected and thus this change won't disturb
a git blame too much. For future commits the pre-commit scripts
checks that this won't happen again.
Diffstat (limited to 'g10/seckey-cert.c')
-rw-r--r-- | g10/seckey-cert.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/g10/seckey-cert.c b/g10/seckey-cert.c index 4bf0dd2d2..ec866b309 100644 --- a/g10/seckey-cert.c +++ b/g10/seckey-cert.c @@ -132,7 +132,7 @@ xxxx_do_check( PKT_secret_key *sk, const char *tryagain_text, int mode, attack */ sk->csum = 0; csum = 1; - if( ndata < 20 ) + if( ndata < 20 ) log_error("not enough bytes for SHA-1 checksum\n"); else { gcry_md_hd_t h; @@ -142,7 +142,7 @@ xxxx_do_check( PKT_secret_key *sk, const char *tryagain_text, int mode, gcry_md_write (h, data, ndata - 20); gcry_md_final (h); if (!memcmp (gcry_md_read (h, DIGEST_ALGO_SHA1), - data + ndata - 20, 20) ) + data + ndata - 20, 20) ) { /* Digest does match. We have to keep the old style checksum in sk->csum, so that the @@ -150,7 +150,7 @@ xxxx_do_check( PKT_secret_key *sk, const char *tryagain_text, int mode, This test gets used when we are adding new keys. */ sk->csum = csum = checksum (data, ndata-20); - } + } gcry_md_close (h); } } @@ -259,6 +259,3 @@ xxxx_do_check( PKT_secret_key *sk, const char *tryagain_text, int mode, return 0; } - - - |