chiark / gitweb /
Import gnupg2_2.1.17.orig.tar.bz2
[gnupg2.git] / dirmngr / ks-engine.h
1 /* ks-engine.h - Keyserver engines definitions
2  * Copyright (C) 2011 Free Software Foundation, Inc.
3  * Copyright (C) 2015  g10 Code GmbH
4  *
5  * This file is part of GnuPG.
6  *
7  * GnuPG is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * GnuPG is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, see <https://www.gnu.org/licenses/>.
19  */
20
21 #ifndef DIRMNGR_KS_ENGINE_H
22 #define DIRMNGR_KS_ENGINE_H 1
23
24 #include "http.h"
25
26 /*-- ks-action.c --*/
27 gpg_error_t ks_print_help (ctrl_t ctrl, const char *text);
28 gpg_error_t ks_printf_help (ctrl_t ctrl, const char *format,
29                             ...) GPGRT_ATTR_PRINTF(2,3);
30
31 /*-- ks-engine-hkp.c --*/
32 gpg_error_t ks_hkp_resolve (ctrl_t ctrl, parsed_uri_t uri);
33 gpg_error_t ks_hkp_mark_host (ctrl_t ctrl, const char *name, int alive);
34 gpg_error_t ks_hkp_print_hosttable (ctrl_t ctrl);
35 gpg_error_t ks_hkp_help (ctrl_t ctrl, parsed_uri_t uri);
36 gpg_error_t ks_hkp_search (ctrl_t ctrl, parsed_uri_t uri, const char *pattern,
37                            estream_t *r_fp, unsigned int *r_http_status);
38 gpg_error_t ks_hkp_get (ctrl_t ctrl, parsed_uri_t uri,
39                         const char *keyspec, estream_t *r_fp);
40 gpg_error_t ks_hkp_put (ctrl_t ctrl, parsed_uri_t uri,
41                         const void *data, size_t datalen);
42
43 /*-- ks-engine-http.c --*/
44 gpg_error_t ks_http_help (ctrl_t ctrl, parsed_uri_t uri);
45 gpg_error_t ks_http_fetch (ctrl_t ctrl, const char *url, estream_t *r_fp);
46
47
48 /*-- ks-engine-finger.c --*/
49 gpg_error_t ks_finger_help (ctrl_t ctrl, parsed_uri_t uri);
50 gpg_error_t ks_finger_fetch (ctrl_t ctrl, parsed_uri_t uri, estream_t *r_fp);
51
52 /*-- ks-engine-kdns.c --*/
53 gpg_error_t ks_kdns_help (ctrl_t ctrl, parsed_uri_t uri);
54 gpg_error_t ks_kdns_fetch (ctrl_t ctrl, parsed_uri_t uri, estream_t *r_fp);
55
56 /*-- ks-engine-ldap.c --*/
57 gpg_error_t ks_ldap_help (ctrl_t ctrl, parsed_uri_t uri);
58 gpg_error_t ks_ldap_search (ctrl_t ctrl, parsed_uri_t uri, const char *pattern,
59                             estream_t *r_fp);
60 gpg_error_t ks_ldap_get (ctrl_t ctrl, parsed_uri_t uri,
61                          const char *keyspec, estream_t *r_fp);
62 gpg_error_t ks_ldap_put (ctrl_t ctrl, parsed_uri_t uri,
63                          void *data, size_t datalen,
64                          void *info, size_t infolen);
65
66
67 #endif /*DIRMNGR_KS_ENGINE_H*/