aboutsummaryrefslogtreecommitdiffstats
path: root/keyserver/ksutil.h
diff options
context:
space:
mode:
authorDavid Shaw <[email protected]>2005-12-19 19:39:32 +0000
committerDavid Shaw <[email protected]>2005-12-19 19:39:32 +0000
commit5432755319f34010f587dae19ae325020bf9454c (patch)
treee6743212622a6479a23893c1ad045d25c081985c /keyserver/ksutil.h
parent* gpg.c (main): Restore convert-sk-to-pk as programs rely on it. (diff)
downloadgnupg-5432755319f34010f587dae19ae325020bf9454c.tar.gz
gnupg-5432755319f34010f587dae19ae325020bf9454c.zip
* 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.
Diffstat (limited to 'keyserver/ksutil.h')
-rw-r--r--keyserver/ksutil.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/keyserver/ksutil.h b/keyserver/ksutil.h
index 8e00e7902..4dd60a7aa 100644
--- a/keyserver/ksutil.h
+++ b/keyserver/ksutil.h
@@ -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_ */