gpgme 0.3.3 questions

Stephane Corthesy stephane@sente.ch
Fri Sep 28 14:40:01 2001



> > How is it possible to write GpgmeData initialized with
> > gpgme_data_new_with_read_cb(), with gpgme_data_new_from_file(),
with
> > gpgme_data_new_from_filepart() ?
>
> I don't understand this.
If a GpgmeData has been created by gpgme_data_new_with_read_cb(), how can the user modify the contents of the GpgmeData? There is no write callback, only a read callback. If a GpgmeData has been created by gpgme_data_new_from_mem() with copy=0, buffer is expected to be read-only (const char *), thus you cannot modify GpgmeData initialized that way, can you? When initializing GpgmeData from file, what would happen if you modify the resulting data? File wouldn't be modified, so GpgmeData should't be writable.
> > - Currently there is no way to perform encrypt+sign operations!!!
> > gpgme_signers_add() cannot be used for gpgme_op_encrypt().
>
> I know but this is a minor problem compared to the fact that it is not
> possible to decrypt and check the signature. I don't know what
> application you have currently in mind, my primary target are MUAs and
> tehre is is better not to use the combined method but first sign, pack
> this into a MIEM object and the encrypt this MIME object again. The
> big advantage is that you can remove the encryption layer and still
> keep the signature.
Same target as yours: I wrote a plug-in to add PGP support in a mail app. In the first version, I used the sign+encrypt (without using gpgme), but I'm gonna change this. I didn't reimplemented yet the decrypt+verify using gpgme, but it seems I'll need to wait for you to implement it in gpgme first ;-)
> > - Is there a way to get the currently used hash algorithm? Or to
set
> > it in a GpgmeContext operation?
>
> Yes, here is my code from Sylpheed to do this (src/rfc2015.c, don't
> know whether this is already in the current CVS):
Ok, I didn't check what information I could gather from GnupgOperationInfo. Will there be a way to set the micalg? And encrypt algo? Thanks very much, Stephane