1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-14 21:47:19 +02:00

* ksutil.h, ksutil.c (curl_armor_writer, curl_writer,

curl_writer_finalize): New functionality to handle binary format keys by
armoring them for input to GPG.

* gpgkeys_curl.c (get_key), gpgkeys_hkp.c (get_key): Call it here.
This commit is contained in:
David Shaw 2005-12-19 19:39:32 +00:00
parent aebd3a04f3
commit 5432755319
5 changed files with 165 additions and 47 deletions

View file

@ -111,12 +111,24 @@ int curl_err_to_gpg_err(CURLcode error);
struct curl_writer_ctx
{
int initialized,markeridx,begun,done;
struct
{
unsigned int initialized:1;
unsigned int begun:1;
unsigned int done:1;
unsigned int armor:1;
} flags;
int armor_remaining;
unsigned char armor_ctx[3];
int markeridx,linelen;
const char *marker;
FILE *stream;
};
size_t curl_writer(const void *ptr,size_t size,size_t nmemb,void *cw_ctx);
void curl_writer_finalize(struct curl_writer_ctx *ctx);
#endif
#endif /* !_KSUTIL_H_ */