Parse LISTKEYS output

Dmitry Falko dfalko at digiflak.com
Fri Jun 5 11:39:32 CEST 2015


Sorry, I read gpgme manual one more time, and find all i need.

05.06.2015 12:29, Dmitry Falko пишет:
> I can't use gpgme, because it doesn't have(or I couldn't find) 
> specific functions.
> I need IMPORT key function with --re-import flag.  I do it from C and 
> use libassuan.
> I do something like this:
> gpgsm --server
> OPTION list-mode=3
> LISTKEYS test at example.com <-- this command return colon-separated 
> information about certificate
> IMPORT --re-import <fingerprint from previous command >
>
> 04.06.2015 19:06, Neal H. Walfield wrote:
>> Hi,
>>
>> At Thu, 04 Jun 2015 12:06:42 +0300,
>> Dmitry Falko wrote:
>>> Is there a common way to parse data returned from LISTKEYS
>>> command. Callback function receives buffer with colon-separated
>>> information about certificate,
>>> i need fingerprint to use it with IMPORT --re-import command.
>> Are you running:
>>
>>    gpg --list-keys --with-colons
>>
>> or doing something else?
>>
>> If you are doing this from C then you should use gpgme rather than try
>> and parse the output yourself.  (If you aren't using C, then look to
>> see if there are any bindings to gpgme.)
>>
>> If this isn't helpful, please try to describe your problem more
>> thoroughly.
>>
>>
>> :) Neal
>>
>

-- 
C Уважением, Дмитрий!




More information about the Gnupg-users mailing list