1 /* ks-engine-kdns.c - KDNS OpenPGP key access
2 * Copyright (C) 2011 Free Software Foundation, Inc.
4 * This file is part of GnuPG.
6 * GnuPG is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 3 of the License, or
9 * (at your option) any later version.
11 * GnuPG is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, see <https://www.gnu.org/licenses/>.
30 #include "ks-engine.h"
32 /* Print a help output for the schemata supported by this module. */
34 ks_kdns_help (ctrl_t ctrl, parsed_uri_t uri)
37 "This keyserver engine accepts URLs of the form:\n"
38 " kdns://[NAMESERVER]/[ROOT][?at=STRING]\n"
40 " NAMESERVER used for queries (default: system standard)\n"
41 " ROOT a DNS name appended to the query (default: none)\n"
42 " STRING a string to replace the '@' (default: \".\")\n"
43 "If a long answer is expected add the parameter \"usevc=1\".\n"
44 "Supported methods: fetch\n"
46 "A query for \"hacker@gnupg.org\" with\n"
47 " kdns://10.0.0.1/example.net?at=_key_&usevc=1\n"
48 "setup as --auto-key-lookup in gpg does a CERT record query\n"
49 "with type PGP on the nameserver 10.0.0.1 for\n"
50 " hacker._key_.gnupg.org.example.net";
54 err = ks_print_help (ctrl, " kdns");
55 else if (!strcmp (uri->scheme, "kdns"))
56 err = ks_print_help (ctrl, data);
64 /* Get the key from URI which is expected to specify a kdns scheme.
65 On success R_FP has an open stream to read the data. */
67 ks_kdns_fetch (ctrl_t ctrl, parsed_uri_t uri, estream_t *r_fp)
74 if (strcmp (uri->scheme, "kdns"))
75 return gpg_error (GPG_ERR_INV_ARG);
77 err = gpg_error (GPG_ERR_NOT_IMPLEMENTED);