]> asedeno.scripts.mit.edu Git - PuTTY.git/commit - cmdgen.c
Centralise SSH-2 key fingerprinting into sshpubk.c.
authorSimon Tatham <anakin@pobox.com>
Tue, 12 May 2015 13:35:44 +0000 (14:35 +0100)
committerSimon Tatham <anakin@pobox.com>
Tue, 12 May 2015 13:56:38 +0000 (14:56 +0100)
commit8682246d33f21e369a3e5b38fa2fdec58b1e4425
treee12b8b3c6bf12b18af8be1510b0d16f77e291526
parenteef0235a0f79e92f25f34782fc486c101fa703ee
Centralise SSH-2 key fingerprinting into sshpubk.c.

There were ad-hoc functions for fingerprinting a bare key blob in both
cmdgen.c and pageant.c, not quite doing the same thing. Also, every
SSH-2 public key algorithm in the code base included a dedicated
fingerprint() method, which is completely pointless since SSH-2 key
fingerprints are computed in an algorithm-independent way (just hash
the standard-format public key blob), so each of those methods was
just duplicating the work of the public_blob() method with a less
general output mechanism.

Now sshpubk.c centrally provides an ssh2_fingerprint_blob() function
that does all the real work, plus an ssh2_fingerprint() function that
wraps it and deals with calling public_blob() to get something to
fingerprint. And the fingerprint() method has been completely removed
from ssh_signkey and all its implementations, and good riddance.
cmdgen.c
pageant.c
ssh.c
ssh.h
sshdss.c
sshecc.c
sshpubk.c
sshrsa.c
windows/winpgen.c
windows/winpgnt.c