From 1cdcab68924a58623c3ea75eb47544973f24420c Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Wed, 9 Feb 2011 17:48:00 +0100 Subject: Add framework to print keyserver engine information --- dirmngr/ks-engine-http.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'dirmngr/ks-engine-http.c') diff --git a/dirmngr/ks-engine-http.c b/dirmngr/ks-engine-http.c index 304e793f7..2ce1b19a1 100644 --- a/dirmngr/ks-engine-http.c +++ b/dirmngr/ks-engine-http.c @@ -31,6 +31,26 @@ /* How many redirections do we allow. */ #define MAX_REDIRECTS 2 +/* Print a help output for the schemata supported by this module. */ +gpg_error_t +ks_http_help (ctrl_t ctrl, parsed_uri_t uri) +{ + const char const data[] = + "Handler for HTTP URLs:\n" + " http://\n" + "Supported methods: fetch\n"; + gpg_error_t err; + + if (!uri) + err = ks_print_help (ctrl, " http"); + else if (uri->is_http) + err = ks_print_help (ctrl, data); + else + err = 0; + + return err; +} + /* Get the key from URL which is expected to specify a http style scheme. On success R_FP has an open stream to read the data. */ -- cgit v1.2.3