Add ability for ssh2_userkey_loadpub() to return the key comment.
[u/mdw/putty] / cmdgen.c
index d1c94ac..f84938e 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:
                         * 
@@ -718,7 +722,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);