projects
/
monkeysphere.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
056ccb1
)
keytrans openpgp2sshfpr now prints out the key size and type
author
Daniel Kahn Gillmor
<dkg@fifthhorseman.net>
Sat, 17 Apr 2010 20:05:55 +0000
(16:05 -0400)
committer
Daniel Kahn Gillmor
<dkg@fifthhorseman.net>
Sat, 17 Apr 2010 20:05:55 +0000
(16:05 -0400)
src/share/keytrans
patch
|
blob
|
history
diff --git
a/src/share/keytrans
b/src/share/keytrans
index ae887de2e8efee76610b208b82f79e9b36c0c3be..33a6bc52c60d700c30cbb209286a9a909196a7ff 100755
(executable)
--- 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";
}