[gnutls-dev] Fixing OpenPGP keyring import
Ludovic Courtès
ludo at chbouib.org
Tue Apr 17 21:06:35 CEST 2007
Hi,
The patch below attempts to fix import of OpenPGP keyrings. This
currently doesn't work at all AFAICT (in fact, I wonder how the current
code relates to the intent ;-)).
The patch is kludgey: since `cdk_keydb_new ()' only supports the raw
format, it changes `gnutls_openpgp_keyring_import ()' so that it returns
an error when asked for a base64 import.
Fixing this would require one of the following:
1. fixing `cdk_keydb_new ()' so that one can pass an additional
argument indicating the format.
2. providing a new function, say `cdk_keydb_from_stream ()', where one
can pass an arbitrary stream as the keyring source.
Solution (2) seems more flexible and cleaner. One could pass
`cdk_keydb_from_stream ()' a stream with or without the armor flag set,
thereby fixing our problem. It would also have the advantage of not
breaking OpenCDK's ABI. `cdk_keydb_new ()' could then be rewritten in
terms of it.
I'm not familiar with OpenCDK so I may well have missed something.
Any thoughts?
Just in case: is copyright assignment needed for OpenCDK?
Thanks,
Ludovic.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ,,keyring-import.diff
Type: text/x-patch
Size: 846 bytes
Desc: Fixing `gnutls_openpgp_keyring_import ()'
URL: </pipermail/attachments/20070417/551f052b/attachment.bin>
More information about the Gnutls-devel
mailing list