mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
* protect-tool.c: New option --canonical.
(show_file): Implement it. * keyformat.txt: Define the created-at attribute for keys. * ccid-driver.c: Replaced macro DEBUG_T1 by a new debug level. (parse_ccid_descriptor): Mark SCR335 firmware version 5.18 good. (ccid_transceive): Arghhh. The seqno is another bit in the R-block than in the I block, this was wrong at one place. * scdaemon.c: New options --debug-ccid-driver and --debug-disable-ticker. * app-openpgp.c (do_genkey, do_writekey): Factored code to check for existing key out into .. (does_key_exist): .. New function. * gpg-connect-agent.c (add_definq, show_definq, clear_definq) (handle_inquire): New. (read_and_print_response): Handle INQUIRE command. (main): Implement control commands.
This commit is contained in:
parent
4237a9cc7f
commit
41862f5f13
17 changed files with 961 additions and 116 deletions
|
@ -23,10 +23,15 @@
|
|||
#ifndef GNUPG_SCD_APP_COMMON_H
|
||||
#define GNUPG_SCD_APP_COMMON_H
|
||||
|
||||
#if GNUPG_MAJOR_VERSION != 1
|
||||
#include <ksba.h>
|
||||
#if GNUPG_MAJOR_VERSION == 1
|
||||
# ifdef ENABLE_AGENT_SUPPORT
|
||||
# include "assuan.h"
|
||||
# endif
|
||||
#else
|
||||
# include <ksba.h>
|
||||
#endif
|
||||
|
||||
|
||||
struct app_local_s; /* Defined by all app-*.c. */
|
||||
|
||||
struct app_ctx_s {
|
||||
|
@ -35,6 +40,15 @@ struct app_ctx_s {
|
|||
unsupported operations the particular
|
||||
function pointer is set to NULL */
|
||||
int slot; /* Used reader. */
|
||||
|
||||
/* If this is used by GnuPG 1.4 we need to know the assuan context
|
||||
in case we need to divert the operation to an already running
|
||||
agent. This if ASSUAN_CTX is not NULL we take this as indication
|
||||
that all operations are diverted to gpg-agent. */
|
||||
#if GNUPG_MAJOR_VERSION == 1 && defined(ENABLE_AGENT_SUPPORT)
|
||||
assuan_context_t assuan_ctx;
|
||||
#endif /*GNUPG_MAJOR_VERSION == 1*/
|
||||
|
||||
unsigned char *serialno; /* Serialnumber in raw form, allocated. */
|
||||
size_t serialnolen; /* Length in octets of serialnumber. */
|
||||
const char *apptype;
|
||||
|
@ -72,6 +86,11 @@ struct app_ctx_s {
|
|||
void *pincb_arg,
|
||||
const void *indata, size_t indatalen,
|
||||
unsigned char **outdata, size_t *outdatalen);
|
||||
gpg_error_t (*writekey) (app_t app, ctrl_t ctrl,
|
||||
const char *certid, unsigned int flags,
|
||||
gpg_error_t (*pincb)(void*,const char *,char **),
|
||||
void *pincb_arg,
|
||||
const unsigned char *pk, size_t pklen);
|
||||
gpg_error_t (*genkey) (app_t app, ctrl_t ctrl,
|
||||
const char *keynostr, unsigned int flags,
|
||||
gpg_error_t (*pincb)(void*, const char *, char **),
|
||||
|
@ -134,6 +153,11 @@ gpg_error_t app_decipher (app_t app, const char *keyidstr,
|
|||
void *pincb_arg,
|
||||
const void *indata, size_t indatalen,
|
||||
unsigned char **outdata, size_t *outdatalen );
|
||||
gpg_error_t app_writekey (app_t app, ctrl_t ctrl,
|
||||
const char *keyidstr, unsigned int flags,
|
||||
gpg_error_t (*pincb)(void*, const char *, char **),
|
||||
void *pincb_arg,
|
||||
const unsigned char *keydata, size_t keydatalen);
|
||||
gpg_error_t app_genkey (app_t app, ctrl_t ctrl,
|
||||
const char *keynostr, unsigned int flags,
|
||||
gpg_error_t (*pincb)(void*, const char *, char **),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue