mirror of
git://git.gnupg.org/gnupg.git
synced 2024-11-10 21:38:50 +01:00
5b59999ce0
* g10/options.h (struct opt): Remove field tofu_db_format. * g10/gpg.h (server_control_s): Add fields tofu.batch_update_ref and tofu.batch_update_started. * g10/gpg.c (parse_tofu_db_format): Remove. (main): Make option --tofu-db-format obsolete. * g10/tofu.c: Major rework. Remove the pretty complicated and slower split format and with that all the caching. Use the dbs struct directly. Move global vars for batch update into CTRL. Change calling conventions of some function to take CTRL or DBS pointers instead of the former low-level database pointer. -- The split database format might have been nice for use with Unison but it bypasses the concept of a relational database by doing parts of this itself and also risking deadlocks. Working with the Tofu database for debugging or experiments is also not possible with parts of the database logic implemented in gpg. The Tofu support is quite new and we can assume that it is not in real use now. Thus we better remove that now so that we do not need to maintain it for all future. Signed-off-by: Werner Koch <wk@gnupg.org>
94 lines
2.7 KiB
C
94 lines
2.7 KiB
C
/* gpg.h - top level include file for gpg etc.
|
|
* Copyright (C) 2003, 2006, 2010 Free Software Foundation, Inc.
|
|
*
|
|
* This file is part of GnuPG.
|
|
*
|
|
* GnuPG is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 3 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* GnuPG is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
#ifndef GNUPG_G10_GPG_H
|
|
#define GNUPG_G10_GPG_H
|
|
|
|
/* Note, that this file should be the first one after the system
|
|
header files. This is required to set the error source to the
|
|
correct value and may be of advantage if we ever have to do
|
|
special things. */
|
|
|
|
#ifdef GPG_ERR_SOURCE_DEFAULT
|
|
#error GPG_ERR_SOURCE_DEFAULT already defined
|
|
#endif
|
|
#define GPG_ERR_SOURCE_DEFAULT GPG_ERR_SOURCE_GPG
|
|
#define map_assuan_err(a) \
|
|
map_assuan_err_with_source (GPG_ERR_SOURCE_DEFAULT, (a))
|
|
#include <gpg-error.h>
|
|
#include <gcrypt.h>
|
|
|
|
|
|
/* Number of bits we accept when reading or writing MPIs. */
|
|
#define MAX_EXTERN_MPI_BITS 16384
|
|
|
|
/* The maximum length of a binary fingerprints. This is used to
|
|
provide a static buffer and will be increased if we need to support
|
|
longer fingerprints.
|
|
Warning: At some places we still use 20 instead of this macro. */
|
|
#define MAX_FINGERPRINT_LEN 20
|
|
|
|
/* The maximum length of a formatted fingerprint as returned by
|
|
format_hexfingerprint(). */
|
|
#define MAX_FORMATTED_FINGERPRINT_LEN 50
|
|
|
|
|
|
/*
|
|
Forward declarations.
|
|
*/
|
|
|
|
/* Object used to keep state locally to server.c . */
|
|
struct server_local_s;
|
|
|
|
/* Object used to keep state locally to call-dirmngr.c . */
|
|
struct dirmngr_local_s;
|
|
typedef struct dirmngr_local_s *dirmngr_local_t;
|
|
|
|
/* Object used to describe a keyblok node. */
|
|
typedef struct kbnode_struct *KBNODE;
|
|
typedef struct kbnode_struct *kbnode_t;
|
|
|
|
/* TOFU database meta object. */
|
|
struct tofu_dbs_s;
|
|
typedef struct tofu_dbs_s *tofu_dbs_t;
|
|
|
|
|
|
/* Session control object. This object is passed to most functions to
|
|
convey the status of a session. Note that the defaults are set by
|
|
gpg_init_default_ctrl(). */
|
|
struct server_control_s
|
|
{
|
|
/* Local data for server.c */
|
|
struct server_local_s *server_local;
|
|
|
|
/* Local data for call-dirmngr.c */
|
|
dirmngr_local_t dirmngr_local;
|
|
|
|
/* Local data for tofu.c */
|
|
struct {
|
|
tofu_dbs_t dbs;
|
|
int batch_update_ref;
|
|
time_t batch_update_started;
|
|
} tofu;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif /*GNUPG_G10_GPG_H*/
|