Allow rsakey_pubblob() to return the key comment.
[u/mdw/putty] / cmdgen.c
index d1c94ac..13c9ca1 100644 (file)
--- a/cmdgen.c
+++ b/cmdgen.c
@@ -313,7 +313,11 @@ int main(int argc, char **argv)
                        } else if (!strcmp(opt, "-version")) {
                            showversion();
                            nogo = TRUE;
-                       }
+                       } else if (!strcmp(opt, "-pgpfp")) {
+                            /* support "-pgpfp" for consistency with others */
+                            pgp_fingerprints();
+                            nogo = TRUE;
+                        }
                        /*
                         * A sample option requiring an argument:
                         * 
@@ -686,7 +690,8 @@ int main(int argc, char **argv)
                char *blob;
                int n, l, bloblen;
 
-               ret = rsakey_pubblob(&infilename, &vblob, &bloblen, &error);
+               ret = rsakey_pubblob(&infilename, &vblob, &bloblen, NULL,
+                                    &error);
                blob = (char *)vblob;
 
                n = 4;                 /* skip modulus bits */
@@ -718,7 +723,7 @@ int main(int argc, char **argv)
          case SSH_KEYTYPE_SSH2:
            if (!load_encrypted) {
                ssh2blob = ssh2_userkey_loadpub(&infilename, &ssh2alg,
-                                               &ssh2bloblen, &error);
+                                               &ssh2bloblen, NULL, &error);
                ssh2algf = find_pubkey_alg(ssh2alg);
                if (ssh2algf)
                    bits = ssh2algf->pubkey_bits(ssh2blob, ssh2bloblen);