[svn] GnuPG - r4289 - in trunk: . agent doc g10 scd sm
svn author wk
cvs at cvs.gnupg.org
Thu Oct 5 13:06:43 CEST 2006
Author: wk
Date: 2006-10-05 13:06:42 +0200 (Thu, 05 Oct 2006)
New Revision: 4289
Modified:
trunk/NEWS
trunk/TODO
trunk/agent/ChangeLog
trunk/agent/command.c
trunk/agent/divert-scd.c
trunk/configure.ac
trunk/doc/gpg-agent.texi
trunk/g10/ChangeLog
trunk/g10/seskey.c
trunk/g10/status.c
trunk/scd/app-openpgp.c
trunk/sm/ChangeLog
trunk/sm/certcheck.c
Log:
bug fixes
Modified: trunk/NEWS
===================================================================
--- trunk/NEWS 2006-10-04 21:23:47 UTC (rev 4288)
+++ trunk/NEWS 2006-10-05 11:06:42 UTC (rev 4289)
@@ -1,3 +1,7 @@
+Noteworthy changes in version 1.9.92
+-------------------------------------------------
+
+
Noteworthy changes in version 1.9.91 (2006-10-04)
-------------------------------------------------
Modified: trunk/TODO
===================================================================
--- trunk/TODO 2006-10-04 21:23:47 UTC (rev 4288)
+++ trunk/TODO 2006-10-05 11:06:42 UTC (rev 4289)
@@ -69,12 +69,6 @@
not a real problem because application will get a card removed status
and should the send a reset to try solving the problem.
-* tests
-** Makefile.am
- We use printf(1) to setup the library path, this is not portable.
- Furthermore LD_LIBRARY_PATH is not used on all systems. It doesn't
- matter for now, because we use some GNU/*BSDish features anyway.
-
** Add a test to check the extkeyusage.
* Windows port
@@ -93,16 +87,20 @@
* g10/
** issue a NO_SECKEY xxxx if a -u key was not found.
-** Replace DIGEST_ALGO_SHA224
- We can't do that right now because it is only defined by newer
- versions of libgcrypt. Change this if we require libgcrypt 1.3
- anyway.
** qbits
We pass a new qbit parameter to genkey - implement this in libgcrypt.
+
+* When switching to libgcrypt 1.3
+** scd#encode_md_for_card, g10#encode_md_value, sm at do_encode_md
+ Remove the extra test for a valid algorithm as libgcrypt will do it
+ then in gcry_md_algo_info.
** skclist.c
- As soon as we switch to libgcrypt 1.3 we should remove the hard
- coded constant in random_is_faked.
+ Remove the hard coded constant in random_is_faked.
+** g10/ Replace DIGEST_ALGO_SHA224
+ We can't do that right now because it is only defined by newer
+ versions of libgcrypt.
+
* Extend selinux support to other modules
* Remove -sat PGP2 compatibility hack
Modified: trunk/agent/ChangeLog
===================================================================
--- trunk/agent/ChangeLog 2006-10-04 21:23:47 UTC (rev 4288)
+++ trunk/agent/ChangeLog 2006-10-05 11:06:42 UTC (rev 4289)
@@ -1,3 +1,7 @@
+2006-10-05 Werner Koch <wk at g10code.com>
+
+ * divert-scd.c (encode_md_for_card): Check that the algo is valid.
+
2006-10-04 Werner Koch <wk at g10code.com>
* call-pinentry.c (agent_get_passphrase): Changed to return the
Modified: trunk/agent/command.c
===================================================================
--- trunk/agent/command.c 2006-10-04 21:23:47 UTC (rev 4288)
+++ trunk/agent/command.c 2006-10-05 11:06:42 UTC (rev 4289)
@@ -470,7 +470,7 @@
char *endp;
int algo;
- /* parse the algo number and check it */
+ /* Parse the algo number and check it. */
algo = (int)strtoul (line, &endp, 10);
for (line = endp; *line == ' ' || *line == '\t'; line++)
;
@@ -478,7 +478,7 @@
return set_error (GPG_ERR_UNSUPPORTED_ALGORITHM, NULL);
ctrl->digest.algo = algo;
- /* parse the hash value */
+ /* Parse the hash value. */
rc = parse_hexstring (ctx, line, &n);
if (rc)
return rc;
Modified: trunk/agent/divert-scd.c
===================================================================
--- trunk/agent/divert-scd.c 2006-10-04 21:23:47 UTC (rev 4288)
+++ trunk/agent/divert-scd.c 2006-10-05 11:06:42 UTC (rev 4289)
@@ -148,6 +148,8 @@
*r_len = 0;
asnlen = DIM(asn);
+ if (!algo || gcry_md_test_algo (algo))
+ return gpg_error (GPG_ERR_DIGEST_ALGO);
if (gcry_md_algo_info (algo, GCRYCTL_GET_ASNOID, asn, &asnlen))
{
log_error ("no object identifier for algo %d\n", algo);
Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac 2006-10-04 21:23:47 UTC (rev 4288)
+++ trunk/configure.ac 2006-10-05 11:06:42 UTC (rev 4289)
@@ -26,8 +26,8 @@
# Remember to change the version number immediately *after* a release.
# Set my_issvn to "yes" for non-released code. Remember to run an
# "svn up" and "autogen.sh" right before creating a distribution.
-m4_define([my_version], [1.9.91])
-m4_define([my_issvn], [no])
+m4_define([my_version], [1.9.92])
+m4_define([my_issvn], [yes])
m4_define([svn_revision], m4_esyscmd([echo -n $((svn info 2>/dev/null \
Modified: trunk/doc/gpg-agent.texi
===================================================================
--- trunk/doc/gpg-agent.texi 2006-10-04 21:23:47 UTC (rev 4288)
+++ trunk/doc/gpg-agent.texi 2006-10-05 11:06:42 UTC (rev 4289)
@@ -740,11 +740,12 @@
okay.
@example
- SETHASH <hexstring>
+ SETHASH <algo> <hexstring>
@end example
-The client can use this command to tell the server about the data
-(which usually is a hash) to be signed.
+The client can use this command to tell the server about the data <hexstring>
+(which usually is a hash) to be signed. <algo> is the decimal encoded hash
+algorithm number as used by Libgcrypt.
The actual signing is done using
Modified: trunk/g10/ChangeLog
===================================================================
--- trunk/g10/ChangeLog 2006-10-04 21:23:47 UTC (rev 4288)
+++ trunk/g10/ChangeLog 2006-10-05 11:06:42 UTC (rev 4289)
@@ -1,3 +1,11 @@
+2006-10-05 Werner Koch <wk at g10code.com>
+
+ * status.c (progress_cb): Changed to libgcrypt API.
+ (set_status_fd): Register the progress cb.
+
+ * seskey.c (encode_md_value): Check that the hash algo is valid
+ before getting the OID.
+
2006-10-04 Werner Koch <wk at g10code.com>
* passphrase.c: Allow for a static passphrase in batch mode.
Modified: trunk/g10/seskey.c
===================================================================
--- trunk/g10/seskey.c 2006-10-04 21:23:47 UTC (rev 4288)
+++ trunk/g10/seskey.c 2006-10-05 11:06:42 UTC (rev 4289)
@@ -267,7 +267,9 @@
byte *asn;
size_t asnlen;
- rc = gcry_md_algo_info (hash_algo, GCRYCTL_GET_ASNOID, NULL, &asnlen);
+ rc = gcry_md_test_algo (hash_algo);
+ if (!rc)
+ rc = gcry_md_algo_info (hash_algo, GCRYCTL_GET_ASNOID, NULL, &asnlen);
if (rc)
log_fatal ("can't get OID of algo %d: %s\n",
hash_algo, gpg_strerror (rc));
Modified: trunk/g10/status.c
===================================================================
--- trunk/g10/status.c 2006-10-04 21:23:47 UTC (rev 4288)
+++ trunk/g10/status.c 2006-10-05 11:06:42 UTC (rev 4289)
@@ -45,15 +45,17 @@
static void
-progress_cb ( void *ctx, int c )
+progress_cb (void *ctx, const char *what, int printchar,
+ int current, int total)
{
- char buf[50];
+ char buf[50];
- if ( c == '\n' )
- sprintf ( buf, "%.20s X 100 100", (char*)ctx );
- else
- sprintf ( buf, "%.20s %c 0 0", (char*)ctx, c );
- write_status_text ( STATUS_PROGRESS, buf );
+ if ( printchar == '\n' && !strcmp (what, "primegen") )
+ snprintf (buf, sizeof buf -1, "%.20s X 100 100", what );
+ else
+ snprintf (buf, sizeof buf -1, "%.20s %c %d %d",
+ what, printchar=='\n'?'X':printchar, current, total );
+ write_status_text (STATUS_PROGRESS, buf);
}
static const char *
@@ -209,10 +211,8 @@
fd, strerror(errno));
}
last_fd = fd;
-#warning Use libgrypt calls for progress indicators
-/* register_primegen_progress ( progress_cb, "primegen" ); */
-/* register_pk_dsa_progress ( progress_cb, "pk_dsa" ); */
-/* register_pk_elg_progress ( progress_cb, "pk_elg" ); */
+
+ gcry_set_progress_handler ( progress_cb, NULL );
}
int
Modified: trunk/scd/app-openpgp.c
===================================================================
--- trunk/scd/app-openpgp.c 2006-10-04 21:23:47 UTC (rev 4288)
+++ trunk/scd/app-openpgp.c 2006-10-05 11:06:42 UTC (rev 4289)
@@ -1926,7 +1926,7 @@
start_at = time (NULL);
rc = iso7816_generate_keypair
#else
-#warning key generation temporary replaced by reading an existing key.
+# warning key generation temporary replaced by reading an existing key.
rc = iso7816_read_public_key
#endif
(app->slot, (const unsigned char*)(keyno == 0? "\xB6" :
Modified: trunk/sm/ChangeLog
===================================================================
--- trunk/sm/ChangeLog 2006-10-04 21:23:47 UTC (rev 4288)
+++ trunk/sm/ChangeLog 2006-10-05 11:06:42 UTC (rev 4289)
@@ -1,3 +1,7 @@
+2006-10-05 Werner Koch <wk at g10code.com>
+
+ * certcheck.c (do_encode_md): Check that the has algo is valid.
+
2006-10-02 Marcus Brinkmann <marcus at g10code.de>
* server.c (register_commands): New commands DUMPKEYS and
Modified: trunk/sm/certcheck.c
===================================================================
--- trunk/sm/certcheck.c 2006-10-04 21:23:47 UTC (rev 4288)
+++ trunk/sm/certcheck.c 2006-10-05 11:06:42 UTC (rev 4289)
@@ -68,6 +68,8 @@
nframe = (nbits+7) / 8;
asnlen = DIM(asn);
+ if (!algo || gcry_md_test_algo (algo))
+ return gpg_error (GPG_ERR_DIGEST_ALGO);
if (gcry_md_algo_info (algo, GCRYCTL_GET_ASNOID, asn, &asnlen))
{
log_error ("no object identifier for algo %d\n", algo);
More information about the Gnupg-commits
mailing list