common: Correctly render SHA256-based ssh fingerprints.
authorJustus Winter <justus@g10code.com>
Wed, 24 May 2017 15:03:58 +0000 (17:03 +0200)
committerJustus Winter <justus@g10code.com>
Wed, 24 May 2017 15:07:13 +0000 (17:07 +0200)
commit3a07a69dfc87b4fff610740d3dde8e23f0d2f8bc
treea7b8c993bc26ba9c2c6d86373cf63e3c09c0f8ff
parent3ac1a9d3a018816233a855faff059b4e0657a0f1
common: Correctly render SHA256-based ssh fingerprints.

* common/ssh-utils.c (dummy_realloc): New function.
(dummy_free): Likewise.
(get_fingerprint): Prepend the fingerprint with the name of the digest
algorithm.  Correctly render SHA256-based ssh fingerprints.
* common/t-ssh-utils.c (sample_keys): Add SHA256 hashes for the keys.
(main): Add an option to dump the keys to gather fingerprints, also
print the SHA256 fingerprint for keys given as arguments, and check
the SHA256 fingerprints of the test keys.

GnuPG-bug-id: 2106
Signed-off-by: Justus Winter <justus@g10code.com>
common/ssh-utils.c
common/t-ssh-utils.c