gpgkey2ssh --help segfaults with assertion failure.

Bug #151917 reported by Wolfgang Glas
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GnuPG2
Fix Released
Unknown
gnupg2 (Debian)
Fix Released
Unknown
gnupg2 (Ubuntu)
Confirmed
Low
Unassigned

Bug Description

I discovered the program /usr/bin/gpgkey2ssh and tried to find out, what this program does.

Unfortunately, there no manual page for this program and moreover, if I enter

gpgkey2ssh --help

I get the following result:

gpgkey2ssh: gpgkey2ssh.c:270: main: Assertion `(algorithm_id == 1) || (algorithm_id == 17)' failed.
Aborted (core dumped)

So, I've no chance to find out, what this program is supposed to do for me.

  TIA for fixing this issue.

Revision history for this message
Philip Tellis (bluesmoon) wrote :

well, apparently the command is used like this:

gpgkey2ssh keyid

so I do this:

gpgkey2ssh $GPGKEY

however, this only prints a dsa public key to stdout, which is not much use if you don't have the corresponding private key.

Revision history for this message
Wolfgang Glas (wglas) wrote :

It would common sense, if the program printed some usage information, if it is used in a wrong way.

Coredumping with assertion failure is not the right way to inform the user about the purpose of the program actually being invoked.

liorda (liorda)
Changed in gnupg2:
status: New → Confirmed
Revision history for this message
dfc (dfc) wrote :

Was this ever reported upstream? It also core dumps if you just run it with no options:
$ gpgkey2ssh
gpgkey2ssh: gpgkey2ssh.c:255: main: Assertion `argc == 2' failed.

Revision history for this message
dfc (dfc) wrote :

There is also a debian bug for the lack of --help / -h:

Debian Bug report logs - #380241
gnupg-agent: gpgkey2ssh has no man page, no --help, no -h and fails with assertions
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=380241

Revision history for this message
dfc (dfc) wrote :

This was reported upstream:
http://lists.gnupg.org/pipermail/gnupg-devel/2005-August/022336.html

On Fri, 26 Aug 2005 07:50:09 -0500, Rex Dieter said:

> $gpgkey2ssh
> gpgkey2ssh: gpgkey2ssh.c:255: main: Assertion `argc == 2' failed.

Its a q+d hack without any option parsing or help output. Run it as:

 gpgkey2ssh keyid

Salam-Shalom,

   Werner

Changed in gnupg2:
status: Unknown → New
Changed in gnupg2:
status: Unknown → New
Changed in gnupg2 (Debian):
status: New → Confirmed
Changed in gnupg2:
status: New → Incomplete
Changed in gnupg2 (Ubuntu):
importance: Undecided → Low
Changed in gnupg2:
status: Incomplete → Fix Released
Changed in gnupg2 (Debian):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.