aboutsummaryrefslogtreecommitdiffstats
path: root/agent/learncard.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2005-02-25 16:14:55 +0000
committerWerner Koch <[email protected]>2005-02-25 16:14:55 +0000
commitfaef9f929b845dc712c8d705620661b5bc6f6767 (patch)
tree22de098892f72f0994a685e8710f11f7ab33e31a /agent/learncard.c
parent* call-scd.c (unescape_status_string): New. Actual a copy of (diff)
downloadgnupg-faef9f929b845dc712c8d705620661b5bc6f6767.tar.gz
gnupg-faef9f929b845dc712c8d705620661b5bc6f6767.zip
* findkey.c (modify_description): Keep invalid % escapes, so that
%0A may pass through. * agent.h (server_control_s): New field USE_AUTH_CALL. * call-scd.c (agent_card_pksign): Make use of it. * command-ssh.c (data_sign): Set the flag. (ssh_send_key_public): New arg OVERRIDE_COMMENT. (card_key_available): Add new arg CARDSN. (ssh_handler_request_identities): Use the card s/n as comment. (sexp_key_extract): Use GCRYMPI_FMT_STD. (data_sign): Ditto. * learncard.c (make_shadow_info): Moved to .. * protect.c (make_shadow_info): .. here. Return NULL on malloc failure. Made global. * agent.h: Add prototype. * xasprintf.c (xtryasprintf): New. * app-openpgp.c (get_public_key): Make sure not to return negative numbers. (do_sign): Allow passing of indata with algorithm prefix. (do_auth): Allow OPENPGP.3 as an alternative ID. * app.c (app_getattr): Return just the S/N but not the timestamp. * no-libgcrypt.c (gcry_strdup): New.
Diffstat (limited to 'agent/learncard.c')
-rw-r--r--agent/learncard.c28
1 files changed, 1 insertions, 27 deletions
diff --git a/agent/learncard.c b/agent/learncard.c
index 7dcacee28..72238507f 100644
--- a/agent/learncard.c
+++ b/agent/learncard.c
@@ -1,5 +1,5 @@
/* learncard.c - Handle the LEARN command
- * Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+ * Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
*
* This file is part of GnuPG.
*
@@ -239,32 +239,6 @@ sinfo_cb (void *opaque, const char *keyword, size_t keywordlen,
}
-/* Create an S-expression with the shadow info. */
-static unsigned char *
-make_shadow_info (const char *serialno, const char *idstring)
-{
- const char *s;
- unsigned char *info, *p;
- char numbuf[21];
- int n;
-
- for (s=serialno, n=0; *s && s[1]; s += 2)
- n++;
-
- info = p = xtrymalloc (1 + 21 + n
- + 21 + strlen (idstring) + 1 + 1);
- *p++ = '(';
- sprintf (numbuf, "%d:", n);
- p = stpcpy (p, numbuf);
- for (s=serialno; *s && s[1]; s += 2)
- *p++ = xtoi_2 (s);
- sprintf (numbuf, "%d:", strlen (idstring));
- p = stpcpy (p, numbuf);
- p = stpcpy (p, idstring);
- *p++ = ')';
- *p = 0;
- return info;
-}
static int
send_cert_back (ctrl_t ctrl, const char *id, void *assuan_context)