summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>2010-04-17 16:05:55 -0400
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>2010-04-17 16:05:55 -0400
commit70d47516ab1f7a2aaab86fb3d872d16a6d5a3a82 (patch)
tree8c8d75e258a2c9b61ff6cd7a27e4bb149a506fb0
parent056ccb1b87edac25d29736f9835a4e29be6e3205 (diff)
keytrans openpgp2sshfpr now prints out the key size and type
-rwxr-xr-xsrc/share/keytrans6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/share/keytrans b/src/share/keytrans
index ae887de..33a6bc5 100755
--- a/src/share/keytrans
+++ b/src/share/keytrans
@@ -1153,7 +1153,11 @@ for (basename($0)) {
if (defined($key)) {
# openssh uses MD5 for key fingerprints:
use Digest::MD5;
- printf("%s\n", join(':', map({unpack("H*", $_)} split(//, Digest::MD5::md5(openssh_pubkey_pack($key))))));
+ printf("%d %s %s\n",
+ $key->size() * 8, # size() is in bytes -- we want bits
+ join(':', map({unpack("H*", $_)} split(//, Digest::MD5::md5(openssh_pubkey_pack($key))))),
+ '(RSA)', # FIXME when we support other than RSA.
+ );
} else {
die "No matching key found.\n";
}