aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/Makefile.am31
-rw-r--r--tools/card-call-scd.c2
-rw-r--r--tools/card-keys.c (renamed from tools/card-tool-keys.c)7
-rw-r--r--tools/card-misc.c (renamed from tools/card-tool-misc.c)4
-rw-r--r--tools/card-yubikey.c (renamed from tools/card-tool-yubikey.c)4
-rw-r--r--tools/gpg-card-w32info.rc (renamed from tools/gpg-card-tool-w32info.rc)6
-rw-r--r--tools/gpg-card.c (renamed from tools/gpg-card-tool.c)16
-rw-r--r--tools/gpg-card.h (renamed from tools/card-tool.h)14
8 files changed, 44 insertions, 40 deletions
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 69f4098ca..fb37c05e7 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -22,14 +22,14 @@ EXTRA_DIST = \
lspgpot mail-signed-keys convert-from-106 sockprox.c \
ccidmon.c ChangeLog-2011 \
gpg-connect-agent-w32info.rc \
- gpg-card-tool-w32info.rc
+ gpg-card-w32info.rc
AM_CPPFLAGS =
include $(top_srcdir)/am/cmacros.am
if HAVE_W32_SYSTEM
gpg_connect_agent_rc_objs = gpg-connect-agent-w32info.o
-gpg_card_tool_rc_objs = gpg-card-tool-w32info.o
+gpg_card_tool_rc_objs = gpg-card-w32info.o
resource_objs += $(gpg_connect_agent_rc_objs) $(gpg_card_tool_rc_objs)
endif
@@ -51,7 +51,7 @@ endif
libexec_PROGRAMS = gpg-wks-client gpg-pair-tool
-bin_PROGRAMS = gpgconf gpg-connect-agent gpg-card-tool ${symcryptrun}
+bin_PROGRAMS = gpgconf gpg-connect-agent gpg-card ${symcryptrun}
if !HAVE_W32_SYSTEM
bin_PROGRAMS += watchgnupg gpgparsemail ${gpg_wks_server}
endif
@@ -124,19 +124,20 @@ gpg_connect_agent_LDADD = ../common/libgpgrl.a $(common_libs) \
$(gpg_connect_agent_rc_objs)
-gpg_card_tool_SOURCES = \
- gpg-card-tool.c \
- card-tool.h \
+gpg_card_SOURCES = \
+ gpg-card.c \
+ gpg-card.h \
card-call-scd.c \
- card-tool-keys.c \
- card-tool-yubikey.c \
- card-tool-misc.c
-
-gpg_card_tool_LDADD = ../common/libgpgrl.a $(common_libs) \
- $(LIBASSUAN_LIBS) $(LIBGCRYPT_LIBS) \
- $(GPG_ERROR_LIBS) \
- $(LIBREADLINE) $(LIBINTL) $(NETLIBS) $(LIBICONV) \
- $(gpg_card_tool_rc_objs)
+ card-keys.c \
+ card-yubikey.c \
+ card-misc.c
+
+gpg_card_LDADD = \
+ ../common/libgpgrl.a $(common_libs) \
+ $(LIBASSUAN_LIBS) $(LIBGCRYPT_LIBS) \
+ $(GPG_ERROR_LIBS) \
+ $(LIBREADLINE) $(LIBINTL) $(NETLIBS) $(LIBICONV) \
+ $(gpg_card_tool_rc_objs)
if !DISABLE_REGEX
diff --git a/tools/card-call-scd.c b/tools/card-call-scd.c
index 83e9ba099..55ecf126e 100644
--- a/tools/card-call-scd.c
+++ b/tools/card-call-scd.c
@@ -39,7 +39,7 @@
#include "../common/status.h"
#include "../common/host2net.h"
#include "../common/openpgpdefs.h"
-#include "card-tool.h"
+#include "gpg-card.h"
#define CONTROL_D ('D' - 'A' + 1)
diff --git a/tools/card-tool-keys.c b/tools/card-keys.c
index 4e057ad94..ad06f2ff7 100644
--- a/tools/card-tool-keys.c
+++ b/tools/card-keys.c
@@ -1,4 +1,4 @@
-/* card-tool-keys.c - OpenPGP and CMS related functions for gpg-card-tool
+/* card-keys.c - OpenPGP and CMS related functions for gpg-card
* Copyright (C) 2019 g10 Code GmbH
*
* This file is part of GnuPG.
@@ -28,7 +28,7 @@
#include "../common/ccparray.h"
#include "../common/exectool.h"
#include "../common/openpgpdefs.h"
-#include "card-tool.h"
+#include "gpg-card.h"
/* It is quite common that all keys of an OpenPGP card belong to the
@@ -168,6 +168,9 @@ parse_key_record (char **fields, int nfields, pubkey_t *r_pubkey)
{
pubkey_t pubkey;
+ (void)fields; /* Not yet used. */
+ (void)nfields;
+
pubkey = xtrycalloc (1, sizeof *pubkey);
if (!pubkey)
return gpg_error_from_syserror ();
diff --git a/tools/card-tool-misc.c b/tools/card-misc.c
index d0fb55dab..bccdbda9d 100644
--- a/tools/card-tool-misc.c
+++ b/tools/card-misc.c
@@ -1,4 +1,4 @@
-/* card-tool-misc.c - Helper functions for gpg-card-tool
+/* card-misc.c - Helper functions for gpg-card
* Copyright (C) 2019 g10 Code GmbH
*
* This file is part of GnuPG.
@@ -28,7 +28,7 @@
#include "../common/util.h"
#include "../common/i18n.h"
#include "../common/openpgpdefs.h"
-#include "card-tool.h"
+#include "gpg-card.h"
/* Return the key info object for the key KEYREF. If it is not found
* NULL is returned. */
diff --git a/tools/card-tool-yubikey.c b/tools/card-yubikey.c
index 996bbf041..f9d130988 100644
--- a/tools/card-tool-yubikey.c
+++ b/tools/card-yubikey.c
@@ -1,4 +1,4 @@
-/* card-tool-yubikey.c - Yubikey specific functions.
+/* card-yubikey.c - Yubikey specific functions.
* Copyright (C) 2019 g10 Code GmbH
*
* This file is part of GnuPG.
@@ -29,7 +29,7 @@
#include "../common/i18n.h"
#include "../common/tlv.h"
#include "../common/ttyio.h"
-#include "card-tool.h"
+#include "gpg-card.h"
/* Object to describe requested interface options. */
diff --git a/tools/gpg-card-tool-w32info.rc b/tools/gpg-card-w32info.rc
index 6937c3e34..b35ff4ce2 100644
--- a/tools/gpg-card-tool-w32info.rc
+++ b/tools/gpg-card-w32info.rc
@@ -1,4 +1,4 @@
-/* gpg-card-toolt-w32info.rc -*- c -*-
+/* gpg-card-w32info.rc -*- c -*-
* Copyright (C) 2019 g10 Code GmbH
*
* This file is free software; as a special exception the author gives
@@ -34,8 +34,8 @@
BEGIN
VALUE "FileDescription", L"GnuPG\x2019s card tool \
to the agent\0"
- VALUE "InternalName", "gpg-card-tool\0"
- VALUE "OriginalFilename", "gpg-card-tool.exe\0"
+ VALUE "InternalName", "gpg-card\0"
+ VALUE "OriginalFilename", "gpg-card.exe\0"
VALUE "ProductName", W32INFO_PRODUCTNAME
VALUE "ProductVersion", W32INFO_PRODUCTVERSION
VALUE "CompanyName", W32INFO_COMPANYNAME
diff --git a/tools/gpg-card-tool.c b/tools/gpg-card.c
index eb723d7ab..f1d0dc8fc 100644
--- a/tools/gpg-card-tool.c
+++ b/tools/gpg-card.c
@@ -1,4 +1,4 @@
-/* gpg-card-tool.c - An interactive tool to work with cards.
+/* gpg-card.c - An interactive tool to work with cards.
* Copyright (C) 2019 g10 Code GmbH
*
* This file is part of GnuPG.
@@ -40,7 +40,7 @@
#include "../common/server-help.h"
#include "../common/openpgpdefs.h"
-#include "card-tool.h"
+#include "gpg-card.h"
#define CONTROL_D ('D' - 'A' + 1)
@@ -143,7 +143,7 @@ my_strusage( int level )
switch (level)
{
- case 11: p = "gpg-card-tool"; break;
+ case 11: p = "gpg-card"; break;
case 12: p = "@GNUPG@"; break;
case 13: p = VERSION; break;
case 17: p = PRINTABLE_OS_NAME; break;
@@ -151,11 +151,11 @@ my_strusage( int level )
case 1:
case 40:
- p = ("Usage: gpg-card-tool"
+ p = ("Usage: gpg-card"
" [options] [{[--] command [args]}] (-h for help)");
break;
case 41:
- p = ("Syntax: gpg-card-tool"
+ p = ("Syntax: gpg-card"
" [options] [command [args] {-- command [args]}]\n\n"
"Tool to manage cards and tokens. With a command an interactive\n"
"mode is used. Use command \"help\" to list all commands.");
@@ -224,7 +224,7 @@ parse_arguments (ARGPARSE_ARGS *pargs, ARGPARSE_OPTS *popts)
-/* gpg-card-tool main. */
+/* gpg-card main. */
int
main (int argc, char **argv)
{
@@ -234,10 +234,10 @@ main (int argc, char **argv)
int cmdidx;
char *command;
- gnupg_reopen_std ("gpg-card-tool");
+ gnupg_reopen_std ("gpg-card");
set_strusage (my_strusage);
gnupg_rl_initialize ();
- log_set_prefix ("gpg-card-tool", GPGRT_LOG_WITH_PREFIX);
+ log_set_prefix ("gpg-card", GPGRT_LOG_WITH_PREFIX);
/* Make sure that our subsystems are ready. */
i18n_init();
diff --git a/tools/card-tool.h b/tools/gpg-card.h
index 5598ae5fd..03bad7530 100644
--- a/tools/card-tool.h
+++ b/tools/gpg-card.h
@@ -1,4 +1,4 @@
-/* card-tool.h - Common definitions for the gpg-card-tool
+/* gpg-card.h - Common definitions for the gpg-card-tool
* Copyright (C) 2019 g10 Code GmbH
*
* This file is part of GnuPG.
@@ -18,8 +18,8 @@
* SPDX-License-Identifier: GPL-3.0-or-later
*/
-#ifndef GNUPG_CARD_TOOL_H
-#define GNUPG_CARD_TOOL_H
+#ifndef GNUPG_GPG_CARD_H
+#define GNUPG_GPG_CARD_H
#include "../common/session-env.h"
@@ -181,7 +181,7 @@ struct card_info_s
typedef struct card_info_s *card_info_t;
-/*-- card-tool-keys.c --*/
+/*-- card-keys.c --*/
void release_keyblock (keyblock_t keyblock);
void flush_keyblock_cache (void);
gpg_error_t get_matching_keys (const unsigned char *keygrip, int protocol,
@@ -189,7 +189,7 @@ gpg_error_t get_matching_keys (const unsigned char *keygrip, int protocol,
gpg_error_t test_get_matching_keys (const char *hexgrip);
-/*-- card-tool-misc.c --*/
+/*-- card-misc.c --*/
key_info_t find_kinfo (card_info_t info, const char *keyref);
void *hex_to_buffer (const char *string, size_t *r_length);
gpg_error_t send_apdu (const char *hexapdu, const char *desc,
@@ -222,8 +222,8 @@ gpg_error_t scd_checkpin (const char *serialno);
unsigned long agent_get_s2k_count (void);
-/*-- card-tool-yubikey.c --*/
+/*-- card-yubikey.c --*/
gpg_error_t yubikey_commands (estream_t fp, int argc, char *argv[]);
-#endif /*GNUPG_CARD_TOOL_H*/
+#endif /*GNUPG_GPG_CARD_H*/