Question regarding GpgMe

Neil Williams linux at codehelp.co.uk
Thu Apr 7 11:26:31 CEST 2005


On Thursday 07 April 2005 7:48 am, harry_b at mm.st wrote:
> So far everything is fine except that I have to tell it with 
> each program start which keys to use for encrypting the data.

You can set your own key as default recipient in .gnupg/gpg.conf. That will 
take care of your own key.

You could also assume that the sender would want the reply encrypted using 
that key, you may be able to retrieve that from elsewhere in the application. 
After all, you are reencrypting the file to someone and your application 
needs to know who is the recipient - or are you trying to obtain *that* 
information from gpgme as well?

More information needed really.

> I would just like to reencrypt the file with the same keys which were used
> before.

Is the file being encrypted to more than 2 keys? You and the sender?

> The question now is, how can I find out which keys the message was 
> encrypted for?

What are you using to write your application? Could you use gpg directly 
instead of via gpgme and use the full gpg command line / API? It sounds like 
some form of scripted application - is it Perl, PHP, bash or what?

> When I run 'gpg --decrypt FILE', all the keys are listed before the
> decryption is performed. How can I get this information using GpgMe?

I'm not sure gpgme can do that for you, but gpg certainly can. If you are in a 
bash environment, you could use pattern matching etc. to detect the other 
keys. It all depends on what and how you are doing with the application.

-- 

Neil Williams
=============
http://www.dcglug.org.uk/
http://www.nosoftwarepatents.com/
http://sourceforge.net/projects/isbnsearch/
http://www.neil.williamsleesmill.me.uk/
http://www.biglumber.com/x/web?qs=0x8801094A28BCB3E3

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : /pipermail/attachments/20050407/2c6f71e6/attachment-0001.pgp


More information about the Gnupg-users mailing list