2 questions regarding gpgme and keyrings
    Werner Koch 
    wk at gnupg.org
       
    Thu Aug 14 14:23:24 CEST 2014
    
    
  
On Thu, 14 Aug 2014 11:14, folkert at vanheusden.com said:
> - how can I set the filesystem location of the keyring from WITHIN my
>   application so that gpgme looks in the right location?
    err = gpgme_set_engine_info (GPGME_PROTOCOL_OpenPGP,
                                 NULL, "/my/other/gnupg/homedir");
That is you can't give the location of a keyring but you need top
provide another homedir.  The keyring is a detail of the gpg and paying
with it should in general be avoided.  Note that 2.1 uses by default the
faster keybox and shares that with gpgsm.
> - when encrypting data from some-one, how can I set the public key
>   using the regular ascii encoding of a key using a function call? e.g.
>   so that it does not retrieve it from a key ring but as an ascii-string
First import that key and the use it.
Salam-Shalom,
   Werner
-- 
Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.
    
    
More information about the Gnupg-devel
mailing list