chiark / gitweb /
Import gnupg2_2.1.17.orig.tar.bz2
[gnupg2.git] / g10 / keyserver-internal.h
1 /* keyserver-internal.h - Keyserver internals
2  * Copyright (C) 2001, 2002, 2004, 2005, 2006 Free Software Foundation, Inc.
3  *
4  * This file is part of GnuPG.
5  *
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.
10  *
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.
15  *
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/>.
18  */
19
20 #ifndef _KEYSERVER_INTERNAL_H_
21 #define _KEYSERVER_INTERNAL_H_
22
23 #include <time.h>
24 #include "../common/keyserver.h"
25 #include "../common/iobuf.h"
26 #include "types.h"
27
28 int parse_keyserver_options(char *options);
29 void free_keyserver_spec(struct keyserver_spec *keyserver);
30 struct keyserver_spec *keyserver_match(struct keyserver_spec *spec);
31 struct keyserver_spec *parse_keyserver_uri (const char *string,
32                                             int require_scheme);
33 struct keyserver_spec *parse_preferred_keyserver(PKT_signature *sig);
34 int keyserver_any_configured (ctrl_t ctrl);
35 int keyserver_export (ctrl_t ctrl, strlist_t users);
36 int keyserver_import (ctrl_t ctrl, strlist_t users);
37 int keyserver_import_fprint (ctrl_t ctrl, const byte *fprint,size_t fprint_len,
38                              struct keyserver_spec *keyserver, int quick);
39 int keyserver_import_keyid (ctrl_t ctrl, u32 *keyid,
40                             struct keyserver_spec *keyserver, int quick);
41 gpg_error_t keyserver_refresh (ctrl_t ctrl, strlist_t users);
42 gpg_error_t keyserver_search (ctrl_t ctrl, strlist_t tokens);
43 int keyserver_fetch (ctrl_t ctrl, strlist_t urilist);
44 int keyserver_import_cert (ctrl_t ctrl, const char *name, int dane_mode,
45                            unsigned char **fpr,size_t *fpr_len);
46 gpg_error_t keyserver_import_pka (ctrl_t ctrl, const char *name,
47                                   unsigned char **fpr,size_t *fpr_len);
48 gpg_error_t keyserver_import_wkd (ctrl_t ctrl, const char *name, int quick,
49                                   unsigned char **fpr, size_t *fpr_len);
50 int keyserver_import_name (ctrl_t ctrl,
51                            const char *name,unsigned char **fpr,size_t *fpr_len,
52                            struct keyserver_spec *keyserver);
53 int keyserver_import_ldap (ctrl_t ctrl, const char *name,
54                            unsigned char **fpr,size_t *fpr_len);
55
56 #endif /* !_KEYSERVER_INTERNAL_H_ */