Automating and integrating GPG

Andreas Heinlein aheinlein at gmx.com
Thu Sep 21 11:03:05 CEST 2017


Am 20.09.2017 um 09:02 schrieb Werner Koch:
> On Mon, 18 Sep 2017 23:45, dkg at fifthhorseman.net said:
>
>> I don't know how much smartcard interaction gpgme supports, though.
> Everything you need.  Have a look at GPA's smartcard features.  I assume
> it is the most advanced GUI to handle the OpenPGP card as well as
> several other cards.  For example it includes full support for the
> Telesec card with their NullPIN feature.
Interesting. I haven't found anything smartcard related in the GPGME
docs. I am really not good at C, but I took a look at the sources of
GPA, specifically the change_pin function in cm-openpgp.c, and it looks
like GPA is using assuan protocol through gpgme here:

char command[100];
snprintf (command, sizeof command, "SCD PASSWD%s %d",
                 reset_mode? " --reset":"", pinno+1);
err = gpgme_op_assuan_transact_ext (gpgagent, command,
                                          
NULL, NULL, NULL, NULL, NULL, NULL,
                                           &operr);

I hadn't thought of that possibility. Python-GPG should support this,
too - take a look at assuan.py in the examples folder. But I haven't yet
found any documentation of the assuan commands you need here.
This probably isn't as easy as a Python programmer might expect...

Andreas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/attachments/20170921/728b7edb/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: OpenPGP digital signature
URL: </pipermail/attachments/20170921/728b7edb/attachment.sig>


More information about the Gnupg-users mailing list