rsa2ssh: fix the megashit

This commit is contained in:
cinap_lenrek 2013-10-28 09:20:07 +01:00
parent 8c9e7ded17
commit 82f4c1c0b4

View file

@ -22,6 +22,7 @@ main(int argc, char **argv)
fmtinstall('B', mpfmt);
fmtinstall('[', encodefmt);
ssh2 = 0;
comment = "";
ARGBEGIN{
@ -50,7 +51,7 @@ main(int argc, char **argv)
p = putmp2(p, k->pub.ek);
p = putmp2(p, k->pub.n);
print("ssh-rsa %.*[ %s\n", p-buf, buf, comment);
print("ssh-rsa %.*[ %s\n", (int)(p-buf), buf, comment);
} else {
print("%d %.10B %.10B %s\n", mpsignif(k->pub.n), k->pub.ek, k->pub.n, comment);
}