Imported Upstream version 2.1.9
[platform/upstream/gpg2.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 <http://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_export (ctrl_t ctrl, strlist_t users);
35 int keyserver_import (ctrl_t ctrl, strlist_t users);
36 int keyserver_import_fprint (ctrl_t ctrl, const byte *fprint,size_t fprint_len,
37                              struct keyserver_spec *keyserver);
38 int keyserver_import_keyid (ctrl_t ctrl, u32 *keyid,
39                             struct keyserver_spec *keyserver);
40 gpg_error_t keyserver_refresh (ctrl_t ctrl, strlist_t users);
41 gpg_error_t keyserver_search (ctrl_t ctrl, strlist_t tokens);
42 int keyserver_fetch (ctrl_t ctrl, strlist_t urilist);
43 int keyserver_import_cert (ctrl_t ctrl, const char *name, int dane_mode,
44                            unsigned char **fpr,size_t *fpr_len);
45 gpg_error_t keyserver_import_pka (ctrl_t ctrl, const char *name,
46                                   unsigned char **fpr,size_t *fpr_len);
47 int keyserver_import_name (ctrl_t ctrl,
48                            const char *name,unsigned char **fpr,size_t *fpr_len,
49                            struct keyserver_spec *keyserver);
50 int keyserver_import_ldap (ctrl_t ctrl, const char *name,
51                            unsigned char **fpr,size_t *fpr_len);
52
53 #endif /* !_KEYSERVER_INTERNAL_H_ */