[svn] GpgOL - r272 - in trunk: . po src
svn author wk
cvs at cvs.gnupg.org
Fri Oct 17 20:22:02 CEST 2008
Author: wk
Date: 2008-10-17 20:22:02 +0200 (Fri, 17 Oct 2008)
New Revision: 272
Modified:
trunk/NEWS
trunk/configure.ac
trunk/po/sv.po
trunk/src/ChangeLog
trunk/src/engine-assuan.c
trunk/src/engine.c
trunk/src/mimeparser.c
Log:
Fixed opaque signature verification.
Other minor changes.
Modified: trunk/src/ChangeLog
===================================================================
--- trunk/src/ChangeLog 2008-10-17 09:14:16 UTC (rev 271)
+++ trunk/src/ChangeLog 2008-10-17 18:22:02 UTC (rev 272)
@@ -1,3 +1,14 @@
+2008-10-17 Werner Koch <wk at g10code.com>
+
+ * mimeparser.c (mime_verify_opaque): Remove extra semicolon which
+ shortcuted most of the code. Why didn't gcc notice that? Bug
+ was introduced on 2008-06-12.
+
+ * engine-assuan.c (create_io_pipe, send_options)
+ (op_assuan_encrypt, op_assuan_sign, op_assuan_decrypt)
+ (op_assuan_verify): Replace use of long in snprint by int to
+ workaround a bug in mingw32. Doesn't matter on w32 anyway.
+
2008-10-16 Werner Koch <wk at g10code.com>
* mimeparser.c (start_attachment): Take care not to set the file
Modified: trunk/NEWS
===================================================================
--- trunk/NEWS 2008-10-17 09:14:16 UTC (rev 271)
+++ trunk/NEWS 2008-10-17 18:22:02 UTC (rev 272)
@@ -1,3 +1,9 @@
+Noteworthy changes for version 0.10.16
+===================================================
+
+ * Fixed a regression in the last release with opaque signatures.
+
+
Noteworthy changes for version 0.10.15 (2008-08-06)
===================================================
Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac 2008-10-17 09:14:16 UTC (rev 271)
+++ trunk/configure.ac 2008-10-17 18:22:02 UTC (rev 272)
@@ -16,8 +16,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], [0.10.15])
-m4_define([my_issvn], [no])
+m4_define([my_version], [0.10.16])
+m4_define([my_issvn], [yes])
m4_define([svn_revision], m4_esyscmd([echo -n $( (svn info 2>/dev/null \
|| echo 'Revision: 0')|sed -n '/^Revision:/ {s/[^0-9]//gp;q;}')]))
Modified: trunk/po/sv.po [not shown]
Modified: trunk/src/engine-assuan.c
===================================================================
--- trunk/src/engine-assuan.c 2008-10-17 09:14:16 UTC (rev 271)
+++ trunk/src/engine-assuan.c 2008-10-17 18:22:02 UTC (rev 272)
@@ -240,8 +240,8 @@
only one instance, use the standard timeout of 120 seconds and
buffers of 4k. */
pipeno = InterlockedIncrement (&pipenumber);
- snprintf (pipename, sizeof pipename, "\\\\.\\pipe\\GpgOL_anon.%08lx.%08lx",
- (unsigned long)GetCurrentProcessId(), pipeno);
+ snprintf (pipename, sizeof pipename, "\\\\.\\pipe\\GpgOL_anon.%08x.%08x",
+ (unsigned int)GetCurrentProcessId(), (unsigned int)pipeno);
sec_attr.bInheritHandle = /*for_write? TRUE :*/FALSE;
r = CreateNamedPipe (pipename, (PIPE_ACCESS_INBOUND
| (for_write? 0:FILE_FLAG_OVERLAPPED)),
@@ -437,7 +437,7 @@
if (!err && hwnd)
{
- snprintf (numbuf, sizeof numbuf, "%lx", (unsigned long)hwnd);
+ snprintf (numbuf, sizeof numbuf, "%x", (unsigned int)hwnd);
err = send_one_option (ctx, "window-id", numbuf);
}
@@ -1513,7 +1513,7 @@
cld->status_cbs.write = status_in_cb;
cld->assctx = ctx;
/* Fixme: We might want to have reference counting for CLD to cope
- with thye problem that the gpgme data object uses CLD which might
+ with the problem that the gpgme data object uses CLD which might
get invalidated at any time. */
err = gpgme_data_new_from_cbs (&cld->status_data, &cld->status_cbs, cld);
if (err)
@@ -1669,11 +1669,11 @@
duplicate the handle into the server process and the server then
uses this handle. Eventually we should put this code into
assuan_sendfd. */
- snprintf (line, sizeof line, "INPUT FD=%ld", (unsigned long int)inpipe[0]);
+ snprintf (line, sizeof line, "INPUT FD=%d", (unsigned int)inpipe[0]);
err = assuan_transact (ctx, line, NULL, NULL, NULL, NULL, NULL, NULL);
if (err)
goto leave;
- snprintf (line, sizeof line, "OUTPUT FD=%ld", (unsigned long int)outpipe[1]);
+ snprintf (line, sizeof line, "OUTPUT FD=%d", (unsigned int)outpipe[1]);
err = assuan_transact (ctx, line, NULL, NULL, NULL, NULL, NULL, NULL);
if (err)
goto leave;
@@ -1843,11 +1843,11 @@
*r_used_protocol = protocol;
log_debug ("%s:%s: using protocol %s", SRCNAME, __func__, protocol_name);
- snprintf (line, sizeof line, "INPUT FD=%ld", (unsigned long int)inpipe[0]);
+ snprintf (line, sizeof line, "INPUT FD=%d", (unsigned int)inpipe[0]);
err = assuan_transact (ctx, line, NULL, NULL, NULL, NULL, NULL, NULL);
if (err)
goto leave;
- snprintf (line, sizeof line, "OUTPUT FD=%ld", (unsigned long int)outpipe[1]);
+ snprintf (line, sizeof line, "OUTPUT FD=%d", (unsigned int)outpipe[1]);
err = assuan_transact (ctx, line, NULL, NULL, NULL, NULL, NULL, NULL);
if (err)
goto leave;
@@ -1941,11 +1941,11 @@
goto leave;
}
- snprintf (line, sizeof line, "INPUT FD=%ld", (unsigned long int)inpipe[0]);
+ snprintf (line, sizeof line, "INPUT FD=%d", (unsigned int)inpipe[0]);
err = assuan_transact (ctx, line, NULL, NULL, NULL, NULL, NULL, NULL);
if (err)
goto leave;
- snprintf (line, sizeof line, "OUTPUT FD=%ld", (unsigned long int)outpipe[1]);
+ snprintf (line, sizeof line, "OUTPUT FD=%d", (unsigned int)outpipe[1]);
err = assuan_transact (ctx, line, NULL, NULL, NULL, NULL, NULL, NULL);
if (err)
goto leave;
@@ -2081,13 +2081,11 @@
if (!opaque_mode)
{
- snprintf (line, sizeof line, "MESSAGE FD=%ld",
- (unsigned long int)msgpipe[0]);
+ snprintf (line, sizeof line, "MESSAGE FD=%d", (unsigned int)msgpipe[0]);
err = assuan_transact (ctx, line, NULL, NULL, NULL, NULL, NULL, NULL);
if (err)
goto leave;
- snprintf (line, sizeof line, "INPUT FD=%ld",
- (unsigned long int)sigpipe[0]);
+ snprintf (line, sizeof line, "INPUT FD=%d", (unsigned int)sigpipe[0]);
err = assuan_transact (ctx, line, NULL, NULL, NULL, NULL, NULL, NULL);
if (err)
goto leave;
@@ -2098,13 +2096,11 @@
}
else
{
- snprintf (line, sizeof line, "INPUT FD=%ld",
- (unsigned long int)msgpipe[0]);
+ snprintf (line, sizeof line, "INPUT FD=%d", (unsigned int)msgpipe[0]);
err = assuan_transact (ctx, line, NULL, NULL, NULL, NULL, NULL, NULL);
if (err)
goto leave;
- snprintf (line, sizeof line, "OUTPUT FD=%ld",
- (unsigned long int)outpipe[1]);
+ snprintf (line, sizeof line, "OUTPUT FD=%d", (unsigned int)outpipe[1]);
err = assuan_transact (ctx, line, NULL, NULL, NULL, NULL, NULL, NULL);
if (err)
goto leave;
Modified: trunk/src/engine.c
===================================================================
--- trunk/src/engine.c 2008-10-17 09:14:16 UTC (rev 271)
+++ trunk/src/engine.c 2008-10-17 18:22:02 UTC (rev 272)
@@ -257,7 +257,7 @@
}
if (debug_filter)
- log_debug ("%s:%s: enter\n", SRCNAME, __func__);
+ log_debug ("%s:%s: filter %p: enter\n", SRCNAME, __func__, filter );
take_in_lock (filter, __func__);
while (!filter->in.length)
{
@@ -265,7 +265,8 @@
{
release_in_lock (filter, __func__);
if (debug_filter)
- log_debug ("%s:%s: returning EOF\n", SRCNAME, __func__);
+ log_debug ("%s:%s: filter %p: returning EOF\n",
+ SRCNAME, __func__, filter );
return 0; /* Return EOF. */
}
release_in_lock (filter, __func__);
@@ -273,23 +274,26 @@
{
errno = EAGAIN;
if (debug_filter_extra)
- log_debug ("%s:%s: leave; result=EAGAIN\n", SRCNAME, __func__);
+ log_debug ("%s:%s: filter %p: leave; result=EAGAIN\n",
+ SRCNAME, __func__, filter);
switch_threads (filter);
return -1;
}
else
clear_switch_threads (filter);
if (debug_filter)
- log_debug ("%s:%s: waiting for in.condvar\n", SRCNAME, __func__);
+ log_debug ("%s:%s: filter %p: waiting for in.condvar\n",
+ SRCNAME, __func__, filter);
WaitForSingleObject (filter->in.condvar, 500);
take_in_lock (filter, __func__);
if (debug_filter)
- log_debug ("%s:%s: continuing\n", SRCNAME, __func__);
+ log_debug ("%s:%s: filter %p: continuing\n",
+ SRCNAME, __func__, filter);
}
if (debug_filter)
- log_debug ("%s:%s: requested read size=%d (filter.in.length=%d)\n",
- SRCNAME, __func__, (int)size, (int)filter->in.length);
+ log_debug ("%s:%s: filter %p: requested read size=%d (in.length=%d)\n",
+ SRCNAME, __func__, filter, (int)size, (int)filter->in.length);
nbytes = size < filter->in.length ? size : filter->in.length;
memcpy (buffer, filter->in.buffer, nbytes);
if (filter->in.length > nbytes)
@@ -299,8 +303,8 @@
release_in_lock (filter, __func__);
if (debug_filter)
- log_debug ("%s:%s: leave; result=%d\n",
- SRCNAME, __func__, (int)nbytes);
+ log_debug ("%s:%s: filter %p: leave; result=%d\n",
+ SRCNAME, __func__, filter, (int)nbytes);
return nbytes;
}
@@ -627,6 +631,9 @@
if (err)
goto failure;
+ if (debug_filter)
+ log_debug ("%s:%s: filter %p: created\n",
+ SRCNAME, __func__, filter );
*r_filter = filter;
return 0;
@@ -822,7 +829,8 @@
engine_gpgme_cancel (cancel_data);
if (WaitForSingleObject (filter->in.ready_event, INFINITE)
!= WAIT_OBJECT_0)
- log_error_w32 (-1, "%s:%s: WFSO failed", SRCNAME, __func__);
+ log_error_w32 (-1, "%s:%s: filter %p: WFSO failed",
+ SRCNAME, __func__, filter);
else
log_debug ("%s:%s: filter %p: backend has been canceled",
SRCNAME, __func__, filter);
Modified: trunk/src/mimeparser.c
===================================================================
--- trunk/src/mimeparser.c 2008-10-17 09:14:16 UTC (rev 271)
+++ trunk/src/mimeparser.c 2008-10-17 18:22:02 UTC (rev 272)
@@ -1378,7 +1378,7 @@
err = engine_verify_start (filter, hwnd, NULL, 0, protocol, from);
xfree (from);
}
- if (err);
+ if (err)
goto leave;
if (instream)
@@ -1399,16 +1399,27 @@
}
else if (nread)
{
+/* if (debug_mime_data) */
+/* log_hexdump (buffer, nread, "%s:%s: ctx=%p, data: ", */
+/* SRCNAME, __func__, ctx); */
err = engine_filter (filter, buffer, nread);
}
else
- break; /* EOF */
+ {
+/* if (debug_mime_data) */
+/* log_debug ("%s:%s: ctx=%p, data: EOF\n", */
+/* SRCNAME, __func__, ctx); */
+ break; /* EOF */
+ }
}
while (!err);
}
else
{
/* Filter the buffer. */
+/* if (debug_mime_data) */
+/* log_hexdump (inbuffer, inbufferlen, "%s:%s: ctx=%p, data: ", */
+/* SRCNAME, __func__, ctx); */
err = engine_filter (filter, inbuffer, inbufferlen);
}
if (err)
More information about the Gnupg-commits
mailing list