mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
card: Rename gpg-card-tool to gpg-card.
* tools/card-tool-keys.c: Rename to card-keys.c. * tools/card-tool-misc.c: Rename to card-misc.c. * tools/card-tool-yubikey.c: Rename to card-yubikey.c. * tools/card-tool.h: Rename to gpg-card.h. * tools/gpg-card-tool-w32info.rc: Rename to gpg-card-w32info.rc * doc/card-tool.texi: Rename top gpg-card.texi Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
a12c3a566e
commit
28de5c0ea5
12 changed files with 61 additions and 54 deletions
|
@ -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
|
||||
card-keys.c \
|
||||
card-yubikey.c \
|
||||
card-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)
|
||||
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
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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 ();
|
|
@ -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. */
|
|
@ -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. */
|
|
@ -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
|
|
@ -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();
|
|
@ -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*/
|
Loading…
Add table
Add a link
Reference in a new issue