LCOV - code coverage report
Current view: top level - g10 - gpgv.c (source / functions) Hit Total Coverage
Test: coverage.info Lines: 44 198 22.2 %
Date: 2016-12-01 18:37:21 Functions: 3 55 5.5 %

          Line data    Source code
       1             : /* gpgv.c - The GnuPG signature verify utility
       2             :  * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2005, 2006,
       3             :  *               2008, 2009, 2012 Free Software Foundation, Inc.
       4             :  *
       5             :  * This file is part of GnuPG.
       6             :  *
       7             :  * GnuPG is free software; you can redistribute it and/or modify
       8             :  * it under the terms of the GNU General Public License as published by
       9             :  * the Free Software Foundation; either version 3 of the License, or
      10             :  * (at your option) any later version.
      11             :  *
      12             :  * GnuPG is distributed in the hope that it will be useful,
      13             :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      14             :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      15             :  * GNU General Public License for more details.
      16             :  *
      17             :  * You should have received a copy of the GNU General Public License
      18             :  * along with this program; if not, see <https://www.gnu.org/licenses/>.
      19             :  */
      20             : 
      21             : #include <config.h>
      22             : #include <errno.h>
      23             : #include <stdio.h>
      24             : #include <stdlib.h>
      25             : #include <string.h>
      26             : #include <ctype.h>
      27             : #include <unistd.h>
      28             : #ifdef HAVE_DOSISH_SYSTEM
      29             : #include <fcntl.h> /* for setmode() */
      30             : #endif
      31             : #ifdef HAVE_LIBREADLINE
      32             : #define GNUPG_LIBREADLINE_H_INCLUDED
      33             : #include <readline/readline.h>
      34             : #endif
      35             : 
      36             : #define INCLUDED_BY_MAIN_MODULE 1
      37             : #include "gpg.h"
      38             : #include "util.h"
      39             : #include "packet.h"
      40             : #include "iobuf.h"
      41             : #include "main.h"
      42             : #include "options.h"
      43             : #include "keydb.h"
      44             : #include "trustdb.h"
      45             : #include "filter.h"
      46             : #include "ttyio.h"
      47             : #include "i18n.h"
      48             : #include "sysutils.h"
      49             : #include "status.h"
      50             : #include "call-agent.h"
      51             : #include "../common/init.h"
      52             : 
      53             : 
      54             : enum cmd_and_opt_values {
      55             :   aNull = 0,
      56             :   oQuiet          = 'q',
      57             :   oVerbose        = 'v',
      58             :   oOutput         = 'o',
      59             :   oBatch          = 500,
      60             :   oKeyring,
      61             :   oIgnoreTimeConflict,
      62             :   oStatusFD,
      63             :   oLoggerFD,
      64             :   oHomedir,
      65             :   oWeakDigest,
      66             :   oEnableSpecialFilenames,
      67             :   aTest
      68             : };
      69             : 
      70             : 
      71             : static ARGPARSE_OPTS opts[] = {
      72             :   ARGPARSE_group (300, N_("@\nOptions:\n ")),
      73             : 
      74             :   ARGPARSE_s_n (oVerbose, "verbose", N_("verbose")),
      75             :   ARGPARSE_s_n (oQuiet,   "quiet",   N_("be somewhat more quiet")),
      76             :   ARGPARSE_s_s (oKeyring, "keyring",
      77             :                 N_("|FILE|take the keys from the keyring FILE")),
      78             :   ARGPARSE_s_s (oOutput, "output", N_("|FILE|write output to FILE")),
      79             :   ARGPARSE_s_n (oIgnoreTimeConflict, "ignore-time-conflict",
      80             :                 N_("make timestamp conflicts only a warning")),
      81             :   ARGPARSE_s_i (oStatusFD, "status-fd",
      82             :                 N_("|FD|write status info to this FD")),
      83             :   ARGPARSE_s_i (oLoggerFD, "logger-fd", "@"),
      84             :   ARGPARSE_s_s (oHomedir, "homedir", "@"),
      85             :   ARGPARSE_s_s (oWeakDigest, "weak-digest",
      86             :                 N_("|ALGO|reject signatures made with ALGO")),
      87             :   ARGPARSE_s_n (oEnableSpecialFilenames, "enable-special-filenames", "@"),
      88             : 
      89             :   ARGPARSE_end ()
      90             : };
      91             : 
      92             : 
      93             : 
      94             : int g10_errors_seen = 0;
      95             : 
      96             : 
      97             : static char *
      98           0 : make_libversion (const char *libname, const char *(*getfnc)(const char*))
      99             : {
     100             :   const char *s;
     101             :   char *result;
     102             : 
     103           0 :   s = getfnc (NULL);
     104           0 :   result = xmalloc (strlen (libname) + 1 + strlen (s) + 1);
     105           0 :   strcpy (stpcpy (stpcpy (result, libname), " "), s);
     106           0 :   return result;
     107             : }
     108             : 
     109             : static const char *
     110           0 : my_strusage( int level )
     111             : {
     112             :   static char *ver_gcry;
     113             :   const char *p;
     114             : 
     115           0 :   switch (level)
     116             :     {
     117           0 :     case 11: p = "@GPG@v (GnuPG)";
     118           0 :       break;
     119           0 :     case 13: p = VERSION; break;
     120           0 :     case 17: p = PRINTABLE_OS_NAME; break;
     121           0 :     case 19: p = _("Please report bugs to <@EMAIL@>.\n"); break;
     122             : 
     123             :     case 1:
     124           0 :     case 40: p = _("Usage: gpgv [options] [files] (-h for help)");
     125           0 :       break;
     126           0 :     case 41: p = _("Syntax: gpgv [options] [files]\n"
     127             :                    "Check signatures against known trusted keys\n");
     128           0 :         break;
     129             : 
     130             :     case 20:
     131           0 :       if (!ver_gcry)
     132           0 :         ver_gcry = make_libversion ("libgcrypt", gcry_check_version);
     133           0 :       p = ver_gcry;
     134           0 :       break;
     135             : 
     136             : 
     137           0 :     default: p = NULL;
     138             :     }
     139           0 :   return p;
     140             : }
     141             : 
     142             : 
     143             : 
     144             : int
     145           1 : main( int argc, char **argv )
     146             : {
     147             :   ARGPARSE_ARGS pargs;
     148           1 :   int rc=0;
     149             :   strlist_t sl;
     150           1 :   strlist_t nrings = NULL;
     151             :   unsigned configlineno;
     152             :   ctrl_t ctrl;
     153             : 
     154           1 :   early_system_init ();
     155           1 :   set_strusage (my_strusage);
     156           1 :   log_set_prefix ("gpgv", GPGRT_LOG_WITH_PREFIX);
     157             : 
     158             :   /* Make sure that our subsystems are ready.  */
     159           1 :   i18n_init();
     160           1 :   init_common_subsystems (&argc, &argv);
     161             : 
     162           1 :   gcry_control (GCRYCTL_DISABLE_SECMEM, 0);
     163             : 
     164           1 :   gnupg_init_signals (0, NULL);
     165             : 
     166           1 :   opt.command_fd = -1; /* no command fd */
     167           1 :   opt.keyserver_options.options |= KEYSERVER_AUTO_KEY_RETRIEVE;
     168           1 :   opt.trust_model = TM_ALWAYS;
     169           1 :   opt.no_sig_cache = 1;
     170           1 :   opt.flags.require_cross_cert = 1;
     171           1 :   opt.batch = 1;
     172           1 :   opt.answer_yes = 1;
     173             : 
     174           1 :   opt.weak_digests = NULL;
     175             : 
     176           1 :   tty_no_terminal(1);
     177           1 :   tty_batchmode(1);
     178           1 :   dotlock_disable ();
     179           1 :   gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0);
     180           1 :   additional_weak_digest("MD5");
     181             : 
     182           1 :   pargs.argc = &argc;
     183           1 :   pargs.argv = &argv;
     184           1 :   pargs.flags=  1;  /* do not remove the args */
     185           3 :   while (optfile_parse( NULL, NULL, &configlineno, &pargs, opts))
     186             :     {
     187           1 :       switch (pargs.r_opt)
     188             :         {
     189           0 :         case oQuiet: opt.quiet = 1; break;
     190             :         case oVerbose:
     191           0 :           opt.verbose++;
     192           0 :           opt.list_sigs=1;
     193           0 :           gcry_control (GCRYCTL_SET_VERBOSITY, (int)opt.verbose);
     194           0 :           break;
     195           1 :         case oKeyring: append_to_strlist( &nrings, pargs.r.ret_str); break;
     196           0 :         case oOutput: opt.outfile = pargs.r.ret_str; break;
     197           0 :         case oStatusFD: set_status_fd( pargs.r.ret_int ); break;
     198             :         case oLoggerFD:
     199           0 :           log_set_fd (translate_sys2libc_fd_int (pargs.r.ret_int, 1));
     200           0 :           break;
     201           0 :         case oHomedir: gnupg_set_homedir (pargs.r.ret_str); break;
     202             :         case oWeakDigest:
     203           0 :           additional_weak_digest(pargs.r.ret_str);
     204           0 :           break;
     205           0 :         case oIgnoreTimeConflict: opt.ignore_time_conflict = 1; break;
     206             :         case oEnableSpecialFilenames:
     207           0 :           enable_special_filenames ();
     208           0 :           break;
     209           0 :         default : pargs.err = ARGPARSE_PRINT_ERROR; break;
     210             :         }
     211             :     }
     212             : 
     213           1 :   if (log_get_errorcount (0))
     214           0 :     g10_exit(2);
     215             : 
     216           1 :   if (opt.verbose > 1)
     217           0 :     set_packet_list_mode(1);
     218             : 
     219             :   /* Note: We open all keyrings in read-only mode.  */
     220           1 :   if (!nrings)  /* No keyring given: use default one. */
     221           0 :     keydb_add_resource ("trustedkeys" EXTSEP_S "kbx",
     222             :                         (KEYDB_RESOURCE_FLAG_READONLY
     223             :                          |KEYDB_RESOURCE_FLAG_GPGVDEF));
     224           2 :   for (sl = nrings; sl; sl = sl->next)
     225           1 :     keydb_add_resource (sl->d, KEYDB_RESOURCE_FLAG_READONLY);
     226             : 
     227           1 :   FREE_STRLIST (nrings);
     228             : 
     229           1 :   ctrl = xcalloc (1, sizeof *ctrl);
     230             : 
     231           1 :   if ((rc = verify_signatures (ctrl, argc, argv)))
     232           0 :     log_error("verify signatures failed: %s\n", gpg_strerror (rc) );
     233             : 
     234           1 :   xfree (ctrl);
     235             : 
     236             :   /* cleanup */
     237           1 :   g10_exit (0);
     238             :   return 8; /*NOTREACHED*/
     239             : }
     240             : 
     241             : 
     242             : void
     243           1 : g10_exit( int rc )
     244             : {
     245           1 :   rc = rc? rc : log_get_errorcount(0)? 2 : g10_errors_seen? 1 : 0;
     246           1 :   exit(rc );
     247             : }
     248             : 
     249             : 
     250             : /* Stub:
     251             :  * We have to override the trustcheck from pkclist.c because
     252             :  * this utility assumes that all keys in the keyring are trustworthy
     253             :  */
     254             : int
     255           0 : check_signatures_trust (ctrl_t ctrl, PKT_signature *sig)
     256             : {
     257             :   (void)ctrl;
     258             :   (void)sig;
     259           0 :   return 0;
     260             : }
     261             : 
     262             : void
     263           0 : read_trust_options(byte *trust_model, ulong *created, ulong *nextcheck,
     264             :                    byte *marginals, byte *completes, byte *cert_depth,
     265             :                    byte *min_cert_level)
     266             : {
     267             :   (void)trust_model;
     268             :   (void)created;
     269             :   (void)nextcheck;
     270             :   (void)marginals;
     271             :   (void)completes;
     272             :   (void)cert_depth;
     273             :   (void)min_cert_level;
     274           0 : }
     275             : 
     276             : /* Stub:
     277             :  * We don't have the trustdb , so we have to provide some stub functions
     278             :  * instead
     279             :  */
     280             : 
     281             : int
     282           0 : cache_disabled_value(PKT_public_key *pk)
     283             : {
     284             :   (void)pk;
     285           0 :   return 0;
     286             : }
     287             : 
     288             : void
     289           0 : check_trustdb_stale (ctrl_t ctrl)
     290             : {
     291             :   (void)ctrl;
     292           0 : }
     293             : 
     294             : int
     295           0 : get_validity_info (ctrl_t ctrl, kbnode_t kb, PKT_public_key *pk,
     296             :                    PKT_user_id *uid)
     297             : {
     298             :   (void)ctrl;
     299             :   (void)kb;
     300             :   (void)pk;
     301             :   (void)uid;
     302           0 :   return '?';
     303             : }
     304             : 
     305             : unsigned int
     306           0 : get_validity (ctrl_t ctrl, kbnode_t kb, PKT_public_key *pk, PKT_user_id *uid,
     307             :               PKT_signature *sig, int may_ask)
     308             : {
     309             :   (void)ctrl;
     310             :   (void)kb;
     311             :   (void)pk;
     312             :   (void)uid;
     313             :   (void)sig;
     314             :   (void)may_ask;
     315           0 :   return 0;
     316             : }
     317             : 
     318             : const char *
     319           0 : trust_value_to_string (unsigned int value)
     320             : {
     321             :   (void)value;
     322           0 :   return "err";
     323             : }
     324             : 
     325             : const char *
     326           0 : uid_trust_string_fixed (ctrl_t ctrl, PKT_public_key *key, PKT_user_id *uid)
     327             : {
     328             :   (void)ctrl;
     329             :   (void)key;
     330             :   (void)uid;
     331           0 :   return "err";
     332             : }
     333             : 
     334             : int
     335           0 : get_ownertrust_info (PKT_public_key *pk)
     336             : {
     337             :   (void)pk;
     338           0 :   return '?';
     339             : }
     340             : 
     341             : unsigned int
     342           0 : get_ownertrust (PKT_public_key *pk)
     343             : {
     344             :   (void)pk;
     345           0 :   return TRUST_UNKNOWN;
     346             : }
     347             : 
     348             : 
     349             : /* Stubs:
     350             :  * Because we only work with trusted keys, it does not make sense to
     351             :  * get them from a keyserver
     352             :  */
     353             : 
     354             : struct keyserver_spec *
     355           0 : keyserver_match (struct keyserver_spec *spec)
     356             : {
     357             :   (void)spec;
     358           0 :   return NULL;
     359             : }
     360             : 
     361             : int
     362           0 : keyserver_any_configured (ctrl_t ctrl)
     363             : {
     364             :   (void)ctrl;
     365           0 :   return 0;
     366             : }
     367             : 
     368             : int
     369           0 : keyserver_import_keyid (u32 *keyid, void *dummy, int quick)
     370             : {
     371             :   (void)keyid;
     372             :   (void)dummy;
     373             :   (void)quick;
     374           0 :   return -1;
     375             : }
     376             : 
     377             : int
     378           0 : keyserver_import_fprint (ctrl_t ctrl, const byte *fprint,size_t fprint_len,
     379             :                          struct keyserver_spec *keyserver, int quick)
     380             : {
     381             :   (void)ctrl;
     382             :   (void)fprint;
     383             :   (void)fprint_len;
     384             :   (void)keyserver;
     385             :   (void)quick;
     386           0 :   return -1;
     387             : }
     388             : 
     389             : int
     390           0 : keyserver_import_cert (const char *name)
     391             : {
     392             :   (void)name;
     393           0 :   return -1;
     394             : }
     395             : 
     396             : int
     397           0 : keyserver_import_pka (const char *name,unsigned char *fpr)
     398             : {
     399             :   (void)name;
     400             :   (void)fpr;
     401           0 :   return -1;
     402             : }
     403             : 
     404             : gpg_error_t
     405           0 : keyserver_import_wkd (ctrl_t ctrl, const char *name, int quick,
     406             :                       unsigned char **fpr, size_t *fpr_len)
     407             : {
     408             :   (void)ctrl;
     409             :   (void)name;
     410             :   (void)quick;
     411             :   (void)fpr;
     412             :   (void)fpr_len;
     413           0 :   return GPG_ERR_BUG;
     414             : }
     415             : 
     416             : int
     417           0 : keyserver_import_name (const char *name,struct keyserver_spec *spec)
     418             : {
     419             :   (void)name;
     420             :   (void)spec;
     421           0 :   return -1;
     422             : }
     423             : 
     424             : int
     425           0 : keyserver_import_ldap (const char *name)
     426             : {
     427             :   (void)name;
     428           0 :   return -1;
     429             : }
     430             : 
     431             : 
     432             : gpg_error_t
     433           0 : read_key_from_file (ctrl_t ctrl, const char *fname, kbnode_t *r_keyblock)
     434             : {
     435             :   (void)ctrl;
     436             :   (void)fname;
     437             :   (void)r_keyblock;
     438           0 :   return -1;
     439             : }
     440             : 
     441             : 
     442             : /* Stub:
     443             :  * No encryption here but mainproc links to these functions.
     444             :  */
     445             : gpg_error_t
     446           0 : get_session_key (ctrl_t ctrl, PKT_pubkey_enc *k, DEK *dek)
     447             : {
     448             :   (void)ctrl;
     449             :   (void)k;
     450             :   (void)dek;
     451           0 :   return GPG_ERR_GENERAL;
     452             : }
     453             : 
     454             : /* Stub: */
     455             : gpg_error_t
     456           0 : get_override_session_key (DEK *dek, const char *string)
     457             : {
     458             :   (void)dek;
     459             :   (void)string;
     460           0 :   return GPG_ERR_GENERAL;
     461             : }
     462             : 
     463             : /* Stub: */
     464             : int
     465           0 : decrypt_data (ctrl_t ctrl, void *procctx, PKT_encrypted *ed, DEK *dek)
     466             : {
     467             :   (void)ctrl;
     468             :   (void)procctx;
     469             :   (void)ed;
     470             :   (void)dek;
     471           0 :   return GPG_ERR_GENERAL;
     472             : }
     473             : 
     474             : 
     475             : /* Stub:
     476             :  * No interactive commands, so we don't need the helptexts
     477             :  */
     478             : void
     479           0 : display_online_help (const char *keyword)
     480             : {
     481             :   (void)keyword;
     482           0 : }
     483             : 
     484             : /* Stub:
     485             :  * We don't use secret keys, but getkey.c links to this
     486             :  */
     487             : int
     488           0 : check_secret_key (PKT_public_key *pk, int n)
     489             : {
     490             :   (void)pk;
     491             :   (void)n;
     492           0 :   return GPG_ERR_GENERAL;
     493             : }
     494             : 
     495             : /* Stub:
     496             :  * No secret key, so no passphrase needed
     497             :  */
     498             : DEK *
     499           0 : passphrase_to_dek (int cipher_algo, STRING2KEY *s2k, int create, int nocache,
     500             :                    const char *tmp, int *canceled)
     501             : {
     502             :   (void)cipher_algo;
     503             :   (void)s2k;
     504             :   (void)create;
     505             :   (void)nocache;
     506             :   (void)tmp;
     507             : 
     508           0 :   if (canceled)
     509           0 :     *canceled = 0;
     510           0 :   return NULL;
     511             : }
     512             : 
     513             : void
     514           0 : passphrase_clear_cache (const char *cacheid)
     515             : {
     516             :   (void)cacheid;
     517           0 : }
     518             : 
     519             : struct keyserver_spec *
     520           0 : parse_preferred_keyserver(PKT_signature *sig)
     521             : {
     522             :   (void)sig;
     523           0 :   return NULL;
     524             : }
     525             : 
     526             : struct keyserver_spec *
     527           0 : parse_keyserver_uri (const char *uri, int require_scheme,
     528             :                      const char *configname, unsigned int configlineno)
     529             : {
     530             :   (void)uri;
     531             :   (void)require_scheme;
     532             :   (void)configname;
     533             :   (void)configlineno;
     534           0 :   return NULL;
     535             : }
     536             : 
     537             : void
     538           0 : free_keyserver_spec (struct keyserver_spec *keyserver)
     539             : {
     540             :   (void)keyserver;
     541           0 : }
     542             : 
     543             : /* Stubs to avoid linking to photoid.c */
     544             : void
     545           0 : show_photos (const struct user_attribute *attrs, int count, PKT_public_key *pk)
     546             : {
     547             :   (void)attrs;
     548             :   (void)count;
     549             :   (void)pk;
     550           0 : }
     551             : 
     552             : int
     553           0 : parse_image_header (const struct user_attribute *attr, byte *type, u32 *len)
     554             : {
     555             :   (void)attr;
     556             :   (void)type;
     557             :   (void)len;
     558           0 :   return 0;
     559             : }
     560             : 
     561             : char *
     562           0 : image_type_to_string (byte type, int string)
     563             : {
     564             :   (void)type;
     565             :   (void)string;
     566           0 :   return NULL;
     567             : }
     568             : 
     569             : #ifdef ENABLE_CARD_SUPPORT
     570             : int
     571           0 : agent_scd_getattr (const char *name, struct agent_card_info_s *info)
     572             : {
     573             :   (void)name;
     574             :   (void)info;
     575           0 :   return 0;
     576             : }
     577             : #endif /* ENABLE_CARD_SUPPORT */
     578             : 
     579             : /* We do not do any locking, so use these stubs here */
     580             : void
     581           1 : dotlock_disable (void)
     582             : {
     583           1 : }
     584             : 
     585             : dotlock_t
     586           0 : dotlock_create (const char *file_to_lock, unsigned int flags)
     587             : {
     588             :   (void)file_to_lock;
     589             :   (void)flags;
     590           0 :   return NULL;
     591             : }
     592             : 
     593             : void
     594           0 : dotlock_destroy (dotlock_t h)
     595             : {
     596             :   (void)h;
     597           0 : }
     598             : 
     599             : int
     600           0 : dotlock_take (dotlock_t h, long timeout)
     601             : {
     602             :   (void)h;
     603             :   (void)timeout;
     604           0 :   return 0;
     605             : }
     606             : 
     607             : int
     608           0 : dotlock_release (dotlock_t h)
     609             : {
     610             :   (void)h;
     611           0 :   return 0;
     612             : }
     613             : 
     614             : void
     615           0 : dotlock_remove_lockfiles (void)
     616             : {
     617           0 : }
     618             : 
     619             : gpg_error_t
     620           0 : agent_probe_secret_key (ctrl_t ctrl, PKT_public_key *pk)
     621             : {
     622             :   (void)ctrl;
     623             :   (void)pk;
     624           0 :   return gpg_error (GPG_ERR_NO_SECKEY);
     625             : }
     626             : 
     627             : gpg_error_t
     628           0 : agent_probe_any_secret_key (ctrl_t ctrl, kbnode_t keyblock)
     629             : {
     630             :   (void)ctrl;
     631             :   (void)keyblock;
     632           0 :   return gpg_error (GPG_ERR_NO_SECKEY);
     633             : }
     634             : 
     635             : gpg_error_t
     636           0 : agent_get_keyinfo (ctrl_t ctrl, const char *hexkeygrip,
     637             :                    char **r_serialno, int *r_cleartext)
     638             : {
     639             :   (void)ctrl;
     640             :   (void)hexkeygrip;
     641             :   (void)r_cleartext;
     642           0 :   *r_serialno = NULL;
     643           0 :   return gpg_error (GPG_ERR_NO_SECKEY);
     644             : }
     645             : 
     646             : gpg_error_t
     647           0 : gpg_dirmngr_get_pka (ctrl_t ctrl, const char *userid,
     648             :                      unsigned char **r_fpr, size_t *r_fprlen,
     649             :                      char **r_url)
     650             : {
     651             :   (void)ctrl;
     652             :   (void)userid;
     653           0 :   if (r_fpr)
     654           0 :     *r_fpr = NULL;
     655           0 :   if (r_fprlen)
     656           0 :     *r_fprlen = 0;
     657           0 :   if (r_url)
     658           0 :     *r_url = NULL;
     659           0 :   return gpg_error (GPG_ERR_NOT_FOUND);
     660             : }
     661             : 
     662             : gpg_error_t
     663           0 : export_pubkey_buffer (ctrl_t ctrl, const char *keyspec, unsigned int options,
     664             :                       export_stats_t stats,
     665             :                       kbnode_t *r_keyblock, void **r_data, size_t *r_datalen)
     666             : {
     667             :   (void)ctrl;
     668             :   (void)keyspec;
     669             :   (void)options;
     670             :   (void)stats;
     671             : 
     672           0 :   *r_keyblock = NULL;
     673           0 :   *r_data = NULL;
     674           0 :   *r_datalen = 0;
     675           0 :   return gpg_error (GPG_ERR_NOT_IMPLEMENTED);
     676             : }
     677             : 
     678             : gpg_error_t
     679           0 : tofu_write_tfs_record (ctrl_t ctrl, estream_t fp,
     680             :                        PKT_public_key *pk, const char *user_id)
     681             : {
     682             :   (void)ctrl;
     683             :   (void)fp;
     684             :   (void)pk;
     685             :   (void)user_id;
     686           0 :   return gpg_error (GPG_ERR_GENERAL);
     687             : }
     688             : 
     689             : gpg_error_t
     690           0 : tofu_get_policy (ctrl_t ctrl, PKT_public_key *pk, PKT_user_id *user_id,
     691             :                  enum tofu_policy *policy)
     692             : {
     693             :   (void)ctrl;
     694             :   (void)pk;
     695             :   (void)user_id;
     696             :   (void)policy;
     697           0 :   return gpg_error (GPG_ERR_GENERAL);
     698             : }
     699             : 
     700             : const char *
     701           0 : tofu_policy_str (enum tofu_policy policy)
     702             : {
     703             :   (void)policy;
     704             : 
     705           0 :   return "unknown";
     706             : }
     707             : 
     708             : void
     709           0 : tofu_begin_batch_update (ctrl_t ctrl)
     710             : {
     711             :   (void)ctrl;
     712           0 : }
     713             : 
     714             : void
     715           0 : tofu_end_batch_update (ctrl_t ctrl)
     716             : {
     717             :   (void)ctrl;
     718           0 : }
     719             : 
     720             : gpg_error_t
     721           0 : tofu_notice_key_changed (ctrl_t ctrl, kbnode_t kb)
     722             : {
     723             :   (void) ctrl;
     724             :   (void) kb;
     725             : 
     726           0 :   return 0;
     727             : }

Generated by: LCOV version 1.11