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-hkp.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'dirmngr/ks-engine-hkp.c') diff --git a/dirmngr/ks-engine-hkp.c b/dirmngr/ks-engine-hkp.c index 3467a6df3..5ad61fd4d 100644 --- a/dirmngr/ks-engine-hkp.c +++ b/dirmngr/ks-engine-hkp.c @@ -36,6 +36,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_hkp_help (ctrl_t ctrl, parsed_uri_t uri) +{ + const char const data[] = + "Handler for HKP URLs:\n" + " hkp://\n" + "Supported methods: search, get, put\n"; + gpg_error_t err; + + if (!uri) + err = ks_print_help (ctrl, " hkp"); + else if (uri->is_http) + err = ks_print_help (ctrl, data); + else + err = 0; + + return err; +} + /* Send an HTTP request. On success returns an estream object at R_FP. HOSTPORTSTR is only used for diagnostics. If POST_CB is not -- cgit v1.2.3