1 /* keyserver.h - Public definitions for gpg keyserver helpers.
2 * Copyright (C) 2001, 2002, 2011 Free Software Foundation, Inc.
4 * This file is part of GnuPG.
6 * This file is free software; you can redistribute it and/or modify
7 * it under the terms of either
9 * - the GNU Lesser General Public License as published by the Free
10 * Software Foundation; either version 3 of the License, or (at
11 * your option) any later version.
15 * - the GNU General Public License as published by the Free
16 * Software Foundation; either version 2 of the License, or (at
17 * your option) any later version.
19 * or both in parallel, as here.
21 * This file is distributed in the hope that it will be useful,
22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 * GNU General Public License for more details.
26 * You should have received a copy of the GNU General Public License
27 * along with this program; if not, see <https://www.gnu.org/licenses/>.
30 #ifndef GNUPG_COMMON_KEYSERVER_H
31 #define GNUPG_COMMON_KEYSERVER_H
33 #define KEYSERVER_PROTO_VERSION 1
35 /* These are usable for return codes for the gpgkeys_ process, and
36 also KEY FAILED codes. */
37 #define KEYSERVER_OK 0 /* not an error */
38 #define KEYSERVER_INTERNAL_ERROR 1 /* gpgkeys_ internal error */
39 #define KEYSERVER_NOT_SUPPORTED 2 /* operation not supported */
40 #define KEYSERVER_VERSION_ERROR 3 /* VERSION mismatch */
41 #define KEYSERVER_GENERAL_ERROR 4 /* keyserver internal error */
42 #define KEYSERVER_NO_MEMORY 5 /* out of memory */
43 #define KEYSERVER_KEY_NOT_FOUND 6 /* key not found */
44 #define KEYSERVER_KEY_EXISTS 7 /* key already exists */
45 #define KEYSERVER_KEY_INCOMPLETE 8 /* key incomplete (EOF) */
46 #define KEYSERVER_UNREACHABLE 9 /* unable to contact keyserver */
48 /* Must be 127 due to shell internal magic. */
49 #define KEYSERVER_SCHEME_NOT_FOUND 127
51 /* Object to hold information pertaining to a keyserver; it also
52 allows building a list of keyservers. Note that g10/options.h has
53 a typedef for this. FIXME: We should make use of the
57 struct keyserver_spec *next;
68 unsigned int direct_uri:1;
73 #endif /*GNUPG_COMMON_KEYSERVER_H*/