mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
a9e0905342
* agent/cache.c: Fix typos. * agent/call-pinentry.c: Likewise. * agent/call-scd.c: Likewise. * agent/command-ssh.c: Likewise. * agent/command.c: Likewise. * agent/divert-scd.c: Likewise. * agent/findkey.c: Likewise. * agent/gpg-agent.c: Likewise. * agent/w32main.c: Likewise. * common/argparse.c: Likewise. * common/audit.c: Likewise. * common/audit.h: Likewise. * common/convert.c: Likewise. * common/dotlock.c: Likewise. * common/exechelp-posix.c: Likewise. * common/exechelp-w32.c: Likewise. * common/exechelp-w32ce.c: Likewise. * common/exechelp.h: Likewise. * common/helpfile.c: Likewise. * common/i18n.h: Likewise. * common/iobuf.c: Likewise. * common/iobuf.h: Likewise. * common/localename.c: Likewise. * common/logging.c: Likewise. * common/openpgp-oid.c: Likewise. * common/session-env.c: Likewise. * common/sexputil.c: Likewise. * common/sysutils.c: Likewise. * common/t-sexputil.c: Likewise. * common/ttyio.c: Likewise. * common/util.h: Likewise. * dirmngr/cdblib.c: Likewise. * dirmngr/certcache.c: Likewise. * dirmngr/crlcache.c: Likewise. * dirmngr/dirmngr-client.c: Likewise. * dirmngr/dirmngr.c: Likewise. * dirmngr/dirmngr_ldap.c: Likewise. * dirmngr/dns-stuff.c: Likewise. * dirmngr/http.c: Likewise. * dirmngr/ks-engine-hkp.c: Likewise. * dirmngr/ks-engine-ldap.c: Likewise. * dirmngr/ldap-wrapper.c: Likewise. * dirmngr/ldap.c: Likewise. * dirmngr/misc.c: Likewise. * dirmngr/ocsp.c: Likewise. * dirmngr/validate.c: Likewise. * g10/encrypt.c: Likewise. * g10/getkey.c: Likewise. * g10/gpg.c: Likewise. * g10/gpgv.c: Likewise. * g10/import.c: Likewise. * g10/keydb.c: Likewise. * g10/keydb.h: Likewise. * g10/keygen.c: Likewise. * g10/keyid.c: Likewise. * g10/keylist.c: Likewise. * g10/keyring.c: Likewise. * g10/mainproc.c: Likewise. * g10/misc.c: Likewise. * g10/options.h: Likewise. * g10/packet.h: Likewise. * g10/parse-packet.c: Likewise. * g10/pkclist.c: Likewise. * g10/pkglue.c: Likewise. * g10/plaintext.c: Likewise. * g10/server.c: Likewise. * g10/sig-check.c: Likewise. * g10/sqlite.c: Likewise. * g10/tdbio.c: Likewise. * g10/test-stubs.c: Likewise. * g10/tofu.c: Likewise. * g10/trust.c: Likewise. * g10/trustdb.c: Likewise. * g13/create.c: Likewise. * g13/mountinfo.c: Likewise. * kbx/keybox-blob.c: Likewise. * kbx/keybox-file.c: Likewise. * kbx/keybox-init.c: Likewise. * kbx/keybox-search-desc.h: Likewise. * kbx/keybox-search.c: Likewise. * kbx/keybox-update.c: Likewise. * scd/apdu.c: Likewise. * scd/app-openpgp.c: Likewise. * scd/app-p15.c: Likewise. * scd/app.c: Likewise. * scd/ccid-driver.c: Likewise. * scd/command.c: Likewise. * scd/iso7816.c: Likewise. * sm/base64.c: Likewise. * sm/call-agent.c: Likewise. * sm/call-dirmngr.c: Likewise. * sm/certchain.c: Likewise. * sm/gpgsm.c: Likewise. * sm/import.c: Likewise. * sm/keydb.c: Likewise. * sm/minip12.c: Likewise. * sm/qualified.c: Likewise. * sm/server.c: Likewise. * tools/gpg-check-pattern.c: Likewise. * tools/gpgconf-comp.c: Likewise. * tools/gpgkey2ssh.c: Likewise. * tools/gpgparsemail.c: Likewise. * tools/gpgtar.c: Likewise. * tools/rfc822parse.c: Likewise. * tools/symcryptrun.c: Likewise. Signed-off-by: Justus Winter <justus@g10code.com>
87 lines
2.5 KiB
C
87 lines
2.5 KiB
C
/* keybox-search-desc.h - Keybox serch description
|
|
* Copyright (C) 2001 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/>.
|
|
*/
|
|
|
|
/*
|
|
This file is a temporary kludge until we can come up with solution
|
|
to share this description between keybox and the application
|
|
specific keydb
|
|
*/
|
|
|
|
#ifndef KEYBOX_SEARCH_DESC_H
|
|
#define KEYBOX_SEARCH_DESC_H 1
|
|
|
|
typedef enum {
|
|
KEYDB_SEARCH_MODE_NONE,
|
|
KEYDB_SEARCH_MODE_EXACT,
|
|
KEYDB_SEARCH_MODE_SUBSTR,
|
|
KEYDB_SEARCH_MODE_MAIL,
|
|
KEYDB_SEARCH_MODE_MAILSUB,
|
|
KEYDB_SEARCH_MODE_MAILEND,
|
|
KEYDB_SEARCH_MODE_WORDS,
|
|
KEYDB_SEARCH_MODE_SHORT_KID,
|
|
KEYDB_SEARCH_MODE_LONG_KID,
|
|
KEYDB_SEARCH_MODE_FPR16,
|
|
KEYDB_SEARCH_MODE_FPR20,
|
|
KEYDB_SEARCH_MODE_FPR,
|
|
KEYDB_SEARCH_MODE_ISSUER,
|
|
KEYDB_SEARCH_MODE_ISSUER_SN,
|
|
KEYDB_SEARCH_MODE_SN,
|
|
KEYDB_SEARCH_MODE_SUBJECT,
|
|
KEYDB_SEARCH_MODE_KEYGRIP,
|
|
KEYDB_SEARCH_MODE_FIRST,
|
|
KEYDB_SEARCH_MODE_NEXT
|
|
} KeydbSearchMode;
|
|
|
|
|
|
/* Forwward declaration. See g10/packet.h. */
|
|
struct gpg_pkt_user_id_s;
|
|
typedef struct gpg_pkt_user_id_s *gpg_pkt_user_id_t;
|
|
|
|
/* A search descriptor. */
|
|
struct keydb_search_desc
|
|
{
|
|
KeydbSearchMode mode;
|
|
/* Callback used to filter results. The first parameter is
|
|
SKIPFUNCVALUE. The second is the keyid. The third is the
|
|
1-based index of the UID packet that matched the search criteria
|
|
(or 0, if none).
|
|
|
|
Return non-zero if the result should be skipped. */
|
|
int (*skipfnc)(void *, u32 *, int);
|
|
void *skipfncvalue;
|
|
const unsigned char *sn;
|
|
int snlen; /* -1 := sn is a hex string */
|
|
union {
|
|
const char *name;
|
|
unsigned char fpr[24];
|
|
u32 kid[2]; /* Note that this is in native endianness. */
|
|
unsigned char grip[20];
|
|
} u;
|
|
int exact; /* Use exactly this key ('!' suffix in gpg). */
|
|
};
|
|
|
|
|
|
struct keydb_search_desc;
|
|
typedef struct keydb_search_desc KEYDB_SEARCH_DESC;
|
|
typedef struct keydb_search_desc KEYBOX_SEARCH_DESC;
|
|
|
|
|
|
|
|
#endif /*KEYBOX_SEARCH_DESC_H*/
|