On Thu, 21 Sep 2017 11:03, aheinl...@gmx.com said:

> 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

Yes, it is a generic interface to make a core libassuan function (which
is already used by gpgme) available as GPGME API.  The actual API to the
smartcard daemon is Assuan based and there is not much documentation than
the reference you get when running

  $ gpg-connect-agent
  > scd help

this lists all smartcard commands.  gpg-agent intercepts some of the
calls to provide a Pinentry but despite of this the "scd " prefix
forwards all command to scdaemon.

> 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

GPGME's Python interface supports this.  Here is code from the
distributed example:

--8<---------------cut here---------------start------------->8---
"""Demonstrate the use of the Assuan protocol engine"""

From __future__ import absolute_import, print_function, unicode_literals
del absolute_import, print_function, unicode_literals

import gpg

with gpg.Context(protocol=gpg.constants.protocol.ASSUAN) as c:
    # Invoke the pinentry to get a confirmation.
    err = c.assuan_transact(['GET_CONFIRMATION', 'Hello there'])
    print("You chose {}.".format("cancel" if err else "ok"))
--8<---------------cut here---------------end--------------->8---


Shalom-Salam,

   Werner

-- 
Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.

Attachment: pgp6viIPhWFSJ.pgp
Description: PGP signature

_______________________________________________
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users

Reply via email to