Page MenuHome GnuPG

Remove gpgkey2ssh
Closed, ResolvedPublic

Description

  • gnupg-2.0.22/tools/gpgkey2ssh.c 2013-10-02 09:30:15.000000000 +0200

+++ gnupg-2.0.22-patched/tools/gpgkey2ssh.c 2014-01-26 07:03:33.025215169 +0100
@@ -261,9 +261,25 @@

  algorithm_id = 0;  /* (avoid cc warning) */
  identifier = NULL; /* (avoid cc warning) */
  • assert (argc == 2);

+ if(2!=argc) {
+ puts("Wrong number of arguments!");
+ puts("Usage gpg2sshkey keyid!");
+ exit (1);
+ }
+

keyid = argv[1];

+ if(! keyid) {
+ puts("No keyid");
+ exit (1);
+ }
+
+ int len;
+ len = strlen(keyid);
+ if (len <8) {
+ puts("keyid to small");
+ exit (1);
+ }

   ret = asprintf (&command,
 		  "gpg --list-keys --with-colons --with-key-data '%s'",

Greetings
Simon
.

Details

Version
2.0.22

Event Timeline

that tool will be removed anyway. It was only used as debug aid and not a real
tools. I don't know how it happened that it eventually was installed.

Well, I rename it as a reminder for the removal.

werner renamed this task from gpgkey2ssh some basic checks to avoid core dumps to Remove gpgkey2ssh.Jan 28 2014, 3:29 PM

cd2d685 fixes the assert. I don't see the utility of checking keyid (gpg will
do that). Closing.

neal claimed this task.