GNUPG-1-9-BRANCH gnupg (11 files)
cvs user wk
cvs at cvs.gnupg.org
Wed Jul 20 16:39:09 CEST 2005
Date: Wednesday, July 20, 2005 @ 17:05:05
Author: wk
Path: /cvs/gnupg/gnupg
Tag: GNUPG-1-9-BRANCH
Modified: THANKS TODO scd/ChangeLog scd/apdu.c scd/app-openpgp.c
scd/scdaemon.c sm/ChangeLog sm/call-dirmngr.c sm/certdump.c
sm/keylist.c sm/server.c
* keylist.c (email_kludge): Reworked.
* certdump.c (gpgsm_print_serial, gpgsm_dump_serial): Cast printf
arg to unsigned.
* call-dirmngr.c (gpgsm_dirmngr_run_command): Ditto
-------------------+
THANKS | 3 ++-
TODO | 2 ++
scd/ChangeLog | 13 +++++++++++++
scd/apdu.c | 8 +++++---
scd/app-openpgp.c | 11 +++++++++--
scd/scdaemon.c | 2 ++
sm/ChangeLog | 8 ++++++++
sm/call-dirmngr.c | 2 +-
sm/certdump.c | 4 ++--
sm/keylist.c | 26 +++++++++++++++++++-------
sm/server.c | 2 +-
11 files changed, 64 insertions(+), 17 deletions(-)
Index: gnupg/THANKS
diff -u gnupg/THANKS:1.69.2.6 gnupg/THANKS:1.69.2.7
--- gnupg/THANKS:1.69.2.6 Tue May 31 22:03:04 2005
+++ gnupg/THANKS Wed Jul 20 17:05:05 2005
@@ -1,7 +1,8 @@
Alexander Belopolsky belopolsky at mac.com
Andrew J. Schorr aschorr at telemetry-investments.com
-Kazu Yamamoto kazu at iij.ad.jp
+Charly Avital shavital at mac.com
+Kazu Yamamoto kazu at iij.ad.jp
Michael Nottebrock michaelnottebrock at gmx.net
Ray Link rlink at pitt.edu
Richard Lefebvre rick at cerca.umontreal.ca
Index: gnupg/TODO
diff -u gnupg/TODO:1.165.2.44 gnupg/TODO:1.165.2.45
--- gnupg/TODO:1.165.2.44 Fri Jun 3 15:57:24 2005
+++ gnupg/TODO Wed Jul 20 17:05:05 2005
@@ -103,3 +103,5 @@
+* sm/
+** --include-certs seems to be a dummy option.
Index: gnupg/scd/ChangeLog
diff -u gnupg/scd/ChangeLog:1.25.2.85 gnupg/scd/ChangeLog:1.25.2.86
--- gnupg/scd/ChangeLog:1.25.2.85 Tue Jun 7 21:09:17 2005
+++ gnupg/scd/ChangeLog Wed Jul 20 17:05:05 2005
@@ -1,3 +1,16 @@
+2005-07-05 Werner Koch <wk at g10code.com>
+
+ * app-openpgp.c (do_readkey): Return a mallcoed copy of the key as
+ required by the description. Thanks to Moritz for tracking this
+ problem down.
+
+2005-06-21 Werner Koch <wk at g10code.com>
+
+ * scdaemon.c (main): ifdef call to ccid_set_debug_level.
+
+ * apdu.c (reset_pcsc_reader, open_pcsc_reader): Cast size_t to
+ ulong for printf.
+
2005-06-06 Werner Koch <wk at g10code.com>
* scdaemon.c (main): New option --debug-allow-core-dump.
Index: gnupg/scd/apdu.c
diff -u gnupg/scd/apdu.c:1.4.2.30 gnupg/scd/apdu.c:1.4.2.31
--- gnupg/scd/apdu.c:1.4.2.30 Thu Jun 16 10:11:59 2005
+++ gnupg/scd/apdu.c Wed Jul 20 17:05:05 2005
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: apdu.c,v 1.4.2.30 2005/06/16 08:11:59 wk Exp $
+ * $Id: apdu.c,v 1.4.2.31 2005/07/20 15:05:05 wk Exp $
*/
/* NOTE: This module is also used by other software, thus the use of
@@ -809,7 +809,8 @@
len -= 4; /* Already read the error code. */
if (len > DIM (slotp->atr))
{
- log_error ("PC/SC returned a too large ATR (len=%x)\n", len);
+ log_error ("PC/SC returned a too large ATR (len=%lx)\n",
+ (unsigned long)len);
sw = SW_HOST_GENERAL_ERROR;
goto command_failed;
}
@@ -1425,7 +1426,8 @@
len -= 4; /* Already read the error code. */
if (len > DIM (slotp->atr))
{
- log_error ("PC/SC returned a too large ATR (len=%x)\n", len);
+ log_error ("PC/SC returned a too large ATR (len=%lx)\n",
+ (unsigned long)len);
goto command_failed;
}
err = (msgbuf[5] << 24) | (msgbuf[6] << 16) | (msgbuf[7] << 8 ) | msgbuf[8];
Index: gnupg/scd/app-openpgp.c
diff -u gnupg/scd/app-openpgp.c:1.9.2.38 gnupg/scd/app-openpgp.c:1.9.2.39
--- gnupg/scd/app-openpgp.c:1.9.2.38 Thu Jun 16 10:11:59 2005
+++ gnupg/scd/app-openpgp.c Wed Jul 20 17:05:04 2005
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: app-openpgp.c,v 1.9.2.38 2005/06/16 08:11:59 wk Exp $
+ * $Id: app-openpgp.c,v 1.9.2.39 2005/07/20 15:05:04 wk Exp $
*/
#include <config.h>
@@ -1230,8 +1230,15 @@
buf = app->app_local->pk[keyno-1].key;
if (!buf)
return gpg_error (GPG_ERR_NO_PUBKEY);
- *pk = buf;
*pklen = app->app_local->pk[keyno-1].keylen;;
+ *pk = xtrymalloc (*pklen);
+ if (!*pk)
+ {
+ err = gpg_error_from_errno (errno);
+ *pklen = 0;
+ return err;
+ }
+ memcpy (*pk, buf, *pklen);
return 0;
#else
return gpg_error (GPG_ERR_NOT_IMPLEMENTED);
Index: gnupg/scd/scdaemon.c
diff -u gnupg/scd/scdaemon.c:1.12.2.32 gnupg/scd/scdaemon.c:1.12.2.33
--- gnupg/scd/scdaemon.c:1.12.2.32 Tue Jun 7 21:09:17 2005
+++ gnupg/scd/scdaemon.c Wed Jul 20 17:05:04 2005
@@ -456,7 +456,9 @@
allow_coredump = 1;
break;
case oDebugCCIDDriver:
+#ifdef HAVE_LIBUSB
ccid_set_debug_level (ccid_set_debug_level (-1)+1);
+#endif /*HAVE_LIBUSB*/
break;
case oDebugDisableTicker: ticker_disabled = 1; break;
Index: gnupg/sm/ChangeLog
diff -u gnupg/sm/ChangeLog:1.101.2.97 gnupg/sm/ChangeLog:1.101.2.98
--- gnupg/sm/ChangeLog:1.101.2.97 Tue Jul 19 13:23:02 2005
+++ gnupg/sm/ChangeLog Wed Jul 20 17:05:04 2005
@@ -1,3 +1,11 @@
+2005-07-20 Werner Koch <wk at g10code.com>
+
+ * keylist.c (email_kludge): Reworked.
+
+ * certdump.c (gpgsm_print_serial, gpgsm_dump_serial): Cast printf
+ arg to unsigned.
+ * call-dirmngr.c (gpgsm_dirmngr_run_command): Ditto
+
2005-07-19 Werner Koch <wk at g10code.com>
* fingerprint.c (gpgsm_get_certid): Cast printf arg to unsigned.
Index: gnupg/sm/call-dirmngr.c
diff -u gnupg/sm/call-dirmngr.c:1.16.2.14 gnupg/sm/call-dirmngr.c:1.16.2.15
--- gnupg/sm/call-dirmngr.c:1.16.2.14 Mon Apr 18 12:44:45 2005
+++ gnupg/sm/call-dirmngr.c Wed Jul 20 17:05:04 2005
@@ -827,7 +827,7 @@
*p++ = '+';
else if (!isprint (*s) || *s == '+')
{
- sprintf (p, "%%%02X", *s);
+ sprintf (p, "%%%02X", *(const unsigned char *)s);
p += 3;
}
else
Index: gnupg/sm/certdump.c
diff -u gnupg/sm/certdump.c:1.11.2.13 gnupg/sm/certdump.c:1.11.2.14
--- gnupg/sm/certdump.c:1.11.2.13 Thu Jun 16 10:11:59 2005
+++ gnupg/sm/certdump.c Wed Jul 20 17:05:04 2005
@@ -70,7 +70,7 @@
else
{
for (p++; n; n--, p++)
- fprintf (fp, "%02X", *p);
+ fprintf (fp, "%02X", *(const unsigned char*)p);
}
}
}
@@ -98,7 +98,7 @@
else
{
for (p++; n; n--, p++)
- log_printf ("%02X", *p);
+ log_printf ("%02X", *(const unsigned char *)p);
}
}
}
Index: gnupg/sm/keylist.c
diff -u gnupg/sm/keylist.c:1.25.2.21 gnupg/sm/keylist.c:1.25.2.22
--- gnupg/sm/keylist.c:1.25.2.21 Thu Jun 16 10:11:59 2005
+++ gnupg/sm/keylist.c Wed Jul 20 17:05:04 2005
@@ -251,30 +251,42 @@
}
-/* return an allocated string with the email address extracted from a
+/* Return an allocated string with the email address extracted from a
DN */
static char *
email_kludge (const char *name)
{
- const char *p;
+ const char *p, *string;
unsigned char *buf;
int n;
- if (strncmp (name, "1.2.840.113549.1.9.1=#", 22))
- return NULL;
+ string = name;
+ for (;;)
+ {
+ p = strstr (string, "1.2.840.113549.1.9.1=#");
+ if (!p)
+ return NULL;
+ if (p == name || (p > string+1 && p[-1] == ',' && p[-2] != '\\'))
+ {
+ name = p + 22;
+ break;
+ }
+ string = p + 22;
+ }
+
+
/* This looks pretty much like an email address in the subject's DN
we use this to add an additional user ID entry. This way,
openSSL generated keys get a nicer and usable listing */
- name += 22;
for (n=0, p=name; hexdigitp (p) && hexdigitp (p+1); p +=2, n++)
;
- if (*p != '#' || !n)
+ if (!n)
return NULL;
buf = xtrymalloc (n+3);
if (!buf)
return NULL; /* oops, out of core */
*buf = '<';
- for (n=1, p=name; *p != '#'; p +=2, n++)
+ for (n=1, p=name; hexdigitp (p); p +=2, n++)
buf[n] = xtoi_2 (p);
buf[n++] = '>';
buf[n] = 0;
Index: gnupg/sm/server.c
diff -u gnupg/sm/server.c:1.45.2.12 gnupg/sm/server.c:1.45.2.13
--- gnupg/sm/server.c:1.45.2.12 Thu Jun 16 10:11:59 2005
+++ gnupg/sm/server.c Wed Jul 20 17:05:04 2005
@@ -1109,7 +1109,7 @@
if (s != buffer)
fwrite (buffer, s-buffer, 1, statusfp );
if ( esc ) {
- fprintf (statusfp, "%%%02X", *(const byte*)s );
+ fprintf (statusfp, "%%%02X", *(const unsigned char*)s );
s++; n--;
}
buffer = s;
More information about the Gnupg-commits
mailing list