Porting GPA to GPGME

Marcus Brinkmann Marcus.Brinkmann@ruhr-uni-bochum.de
Sun Aug 11 15:15:01 2002


On Sun, Aug 11, 2002 at 12:45:41PM +0200, Miguel Coca wrote:
> > It's arguably a bad thing to give out the secret key :)
> 
> To some degree I agree with that :-) But as it is now, GPA is very insistent
> that you make a backup of your default keypair.

I see.

> > Sometimes it might not even be possible, like if it is stored on a smart
> > card or otherwise managed by gpg-agent.
> 
> Is there any way to detect those cases?

If we allow it, you will get a suitable error value if it doesn't work.
 
> On a related note, that may be worth documenting, I would like to know if
> after a call to gpgme_data_new_from_file returns a GPGME_File_Error, I can
> trust that I can still retrieve the original error ("file not found", etc),
> from errno.

If a file error occurs, it will do that.  But there are other errors
possible, too (like, out of memory, invalid arguments), so you need a
two-staged error handling

if (err == GPGME_File_Error)
  {
     ... strerror (errno) ...
  }
else if (err)
  {
     ... gpgme_strerror (err) ...
  } 

> Also, importing keys does not work. I think that is not my fault, since a
> "make check" on gpgme fails with:

Please be more specific.  It should work, the test case is broken.  We will
change the change we did, though, because the current behaviour is not the
best.  (It's on my TODO list to fix).  But anyway it should work according
to the documented semantics.
 
Thanks,
Marcus

-- 
`Rhubarb is no Egyptian god.' GNU      http://www.gnu.org    marcus@gnu.org
Marcus Brinkmann              The Hurd http://www.gnu.org/software/hurd/
Marcus.Brinkmann@ruhr-uni-bochum.de
http://www.marcus-brinkmann.de/