Try to make our PGP signing more useful:
[u/mdw/putty] / windows / winpgen.c
index baaf3d9..dc9d273 100644 (file)
@@ -1404,16 +1404,6 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show)
     int argc;
     char **argv;
 
-    split_into_argv(cmdline, &argc, &argv, NULL);
-
-    if (argc > 0) {
-       /*
-        * Assume the first argument to be a private key file, and
-        * attempt to load it.
-        */
-       cmdline_keyfile = argv[0];
-    }
-
     InitCommonControls();
     hinst = inst;
     hwnd = NULL;
@@ -1438,6 +1428,21 @@ int WINAPI WinMain(HINSTANCE inst, HINSTANCE prev, LPSTR cmdline, int show)
             help_path = NULL;
     }
 
+    split_into_argv(cmdline, &argc, &argv, NULL);
+
+    if (argc > 0) {
+       if (!strcmp(argv[0], "-pgpfp")) {
+           pgp_fingerprints();
+           exit(1);
+       } else {
+           /*
+            * Assume the first argument to be a private key file, and
+            * attempt to load it.
+            */
+           cmdline_keyfile = argv[0];
+       }
+    }
+
     random_ref();
     return DialogBox(hinst, MAKEINTRESOURCE(201), NULL,
                     MainDlgProc) != IDOK;