projects
/
onak.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fc26ef0
)
Fix display of SHA-1 fingerprints
author
Jonathan McDowell
<noodles@earth.li>
Sun, 1 Apr 2012 21:09:12 +0000
(14:09 -0700)
committer
Jonathan McDowell
<noodles@earth.li>
Sun, 1 Apr 2012 21:09:12 +0000
(14:09 -0700)
SHA-1 fingerprints have a double space in the middle and we were
putting the extra space in the wrong place.
keyindex.c
patch
|
blob
|
history
diff --git
a/keyindex.c
b/keyindex.c
index eee2e8a6f867415c3651c5c5d57f0b00424d00ae..4eedf1f648f9f107c85c22ecb799d04af8b5f6a1 100644
(file)
--- a/
keyindex.c
+++ b/
keyindex.c
@@
-189,10
+189,11
@@
void display_fingerprint(struct openpgp_publickey *key)
(i % 2 == 0)) {
printf(" ");
}
- printf("%02X", fp[i]);
- if ((i * 2) == length) {
+ if (length == 20 && (i * 2) == length) {
+ /* Extra space in the middle of a SHA1 fingerprint */
printf(" ");
}
+ printf("%02X", fp[i]);
}
printf("\n");