|
Message-ID: <6df86bb7101030bea40efe5a9eac39a9@smtp.hushmail.com> Date: Wed, 13 Mar 2013 07:45:14 +0100 From: magnum <john.magnum@...hmail.com> To: john-dev@...ts.openwall.com Subject: Re: gpg2john (was: Work needed before Jumbo-8) On 13 Mar, 2013, at 1:23 , Lukas Odzioba <lukas.odzioba@...il.com> wrote: > 2013/3/12 magnum <john.magnum@...hmail.com>: >> Thanks! It works fine with my multiple keys file too. I'll commit this and I think it is barely Good Enough[tm] for Jumbo 8 now, but some things can be improved: >> >> 1. Supplying a bad file (not a key file) results in no output at all. >> 2. Supplying a public key file, same lack of output. >> 3. The full path is used for the login field. >> >> For 1 and 2, we might want to add some warning or other output to stderr. For 3 we should definitely use the basename and ideally also strip the .gpg or .pgp extension (are .pgp files supported at all?). > > 1 and 2 should be easy I'll take care of it. For 3 I guess that we > have somewhere code that does it. basename(3) varies with platform. I think this is portable: #include <libgen.h> #include <string.h> char *login; int len; login = basename(strdup(filename)); if (!login || !*login) strcpy(login, filename); len = strlen(login) - 4; if (strcmp(&login[len], ".gpg" || strcmp(&login[len], ".pgp") login[len] = 0; > What commands do you use to extract keys? > I used that: > gpg --export-secret-keys --armor --output keys.asc I ran it directly on binary key file, this is also supported: ../run/gpg2john ~/.gnupg/secring.gpg magnum
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.