From cvs at cvs.gnupg.org Sat Jan 26 23:12:24 2008 From: cvs at cvs.gnupg.org (svn author wk) Date: Sat, 26 Jan 2008 23:12:24 +0100 Subject: [svn] GnuPG - r4680 - in trunk: . sm tests Message-ID: Author: wk Date: 2008-01-26 23:12:23 +0100 (Sat, 26 Jan 2008) New Revision: 4680 Modified: trunk/NEWS trunk/configure.ac trunk/sm/keylist.c trunk/tests/ChangeLog trunk/tests/asschk.c Log: Typo fixes. Portability fix for asschk.c Modified: trunk/NEWS =================================================================== --- trunk/NEWS 2008-01-26 13:12:00 UTC (rev 4679) +++ trunk/NEWS 2008-01-26 22:12:23 UTC (rev 4680) @@ -1,3 +1,7 @@ +Noteworthy changes in version 2.0.9 (unreleased) +------------------------------------------------ + + Noteworthy changes in version 2.0.8 (2007-12-20) ------------------------------------------------ Modified: trunk/configure.ac =================================================================== --- trunk/configure.ac 2008-01-26 13:12:00 UTC (rev 4679) +++ trunk/configure.ac 2008-01-26 22:12:23 UTC (rev 4680) @@ -24,8 +24,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], [2.0.8]) -m4_define([my_issvn], [no]) +m4_define([my_version], [2.0.9]) +m4_define([my_issvn], [yes]) m4_define([svn_revision], m4_esyscmd([echo -n $( (svn info 2>/dev/null \ Modified: trunk/sm/keylist.c =================================================================== --- trunk/sm/keylist.c 2008-01-26 13:12:00 UTC (rev 4679) +++ trunk/sm/keylist.c 2008-01-26 22:12:23 UTC (rev 4680) @@ -491,8 +491,8 @@ kludge_uid = NULL; for (idx=0; (p = ksba_cert_get_subject (cert,idx)); idx++) { - /* In the case that the same email address is in the subecj DN - as weel as in an alternate subject name we avoid printing it + /* In the case that the same email address is in the subject DN + as well as in an alternate subject name we avoid printing it a second time. */ if (kludge_uid && !strcmp (kludge_uid, p)) continue; Modified: trunk/tests/ChangeLog =================================================================== --- trunk/tests/ChangeLog 2008-01-26 13:12:00 UTC (rev 4679) +++ trunk/tests/ChangeLog 2008-01-26 22:12:23 UTC (rev 4680) @@ -1,3 +1,7 @@ +2008-01-17 Werner Koch + + * asschk.c (read_assuan): Use __func__ instead of __FUNCTION__. + 2006-11-05 Werner Koch * asschk.c (read_assuan): Minor cleanups. Modified: trunk/tests/asschk.c =================================================================== --- trunk/tests/asschk.c 2008-01-26 13:12:00 UTC (rev 4679) +++ trunk/tests/asschk.c 2008-01-26 22:12:23 UTC (rev 4680) @@ -308,7 +308,7 @@ { int i; - printf ("%s: read \"", __FUNCTION__); + printf ("%s: read \"", __func__); for (i = 0; i < n; i ++) putc (buf[i], stdout); printf ("\"\n"); From cvs at cvs.gnupg.org Mon Jan 28 09:03:10 2008 From: cvs at cvs.gnupg.org (svn author wk) Date: Mon, 28 Jan 2008 09:03:10 +0100 Subject: [svn] GnuPG - r4682 - trunk/doc Message-ID: Author: wk Date: 2008-01-28 09:03:08 +0100 (Mon, 28 Jan 2008) New Revision: 4682 Modified: trunk/doc/ChangeLog trunk/doc/gpg-agent.texi trunk/doc/gpgsm.texi trunk/doc/scdaemon.texi trunk/doc/tools.texi trunk/doc/yat2m.c Log: Typo and grammer fixes by Justin Pryzby. Modified: trunk/doc/ChangeLog =================================================================== --- trunk/doc/ChangeLog 2008-01-27 14:43:52 UTC (rev 4681) +++ trunk/doc/ChangeLog 2008-01-28 08:03:08 UTC (rev 4682) @@ -1,3 +1,8 @@ +2008-01-28 Justin Pryzby (wk) + + * gpg-agent.texi, yat2m.c, scdaemon.texi, qualified.txt + * tools.texi, gpgsm.texi: Typo fixes and minor grammer fixes. + 2008-01-10 Werner Koch * qualified.txt: Add missing country tag to the last entries. Modified: trunk/doc/gpg-agent.texi =================================================================== --- trunk/doc/gpg-agent.texi 2008-01-27 14:43:52 UTC (rev 4681) +++ trunk/doc/gpg-agent.texi 2008-01-28 08:03:08 UTC (rev 4682) @@ -117,8 +117,8 @@ @node Agent Commands @section Commands -Commands are not distinguished from options execpt for the fact that -only one one command is allowed. +Commands are not distinguished from options except for the fact that +only one command is allowed. @table @gnupgtabopt @item --version @@ -214,7 +214,7 @@ @end table How these messages are mapped to the actual debugging flags is not -specified and may change with newer releaes of this program. They are +specified and may change with newer releases of this program. They are however carefully selected to best aid in debugging. @item --debug @var{flags} @@ -256,7 +256,7 @@ @item --no-detach @opindex no-detach -Don't detach the process from the console. This is manly usefule for +Don't detach the process from the console. This is mainly useful for debugging. @item -s @@ -268,9 +268,9 @@ @opindex c @opindex csh Format the info output in daemon mode for use with the standard Bourne -shell respective the C-shell . The default is to guess it based on the +shell respective the C-shell. The default is to guess it based on the environment variable @code{SHELL} which is in almost all cases -sufficient. +correct. @item --write-env-file @var{file} @opindex write-env-file @@ -304,7 +304,7 @@ @opindex allow-mark-trusted Allow clients to mark keys as trusted, i.e. put them into the @file{trustlist.txt} file. This is by default not allowed to make it -harder for users to inadvertly accept Root-CA keys. +harder for users to inadvertently accept Root-CA keys. @item --ignore-cache-for-signing @opindex ignore-cache-for-signing @@ -314,25 +314,25 @@ @item --default-cache-ttl @var{n} @opindex default-cache-ttl -Set the time a cache entry is valid to @var{n} seconds. The default are +Set the time a cache entry is valid to @var{n} seconds. The default is 600 seconds. @item --default-cache-ttl-ssh @var{n} @opindex default-cache-ttl Set the time a cache entry used for SSH keys is valid to @var{n} -seconds. The default are 1800 seconds. +seconds. The default is 1800 seconds. @item --max-cache-ttl @var{n} @opindex max-cache-ttl Set the maximum time a cache entry is valid to @var{n} seconds. After -this time a cache entry will get expired even if it has been accessed -recently. The default are 2 hours (7200 seconds). +this time a cache entry will be expired even if it has been accessed +recently. The default is 2 hours (7200 seconds). @item --max-cache-ttl-ssh @var{n} @opindex max-cache-ttl-ssh Set the maximum time a cache entry used for SSH keys is valid to @var{n} -seconds. After this time a cache entry will get expired even if it has -been accessed recently. The default are 2 hours (7200 seconds). +seconds. After this time a cache entry will be expired even if it has +been accessed recently. The default is 2 hours (7200 seconds). @item --enforce-passphrase-constraints @opindex enforce-passphrase-constraints @@ -362,8 +362,8 @@ pattern or even against a complete dictionary is not very effective to enforce good passphrases. Users will soon figure up ways to bypass such a policy. A better policy is to educate users on good security -behavior and optional to run a passphrase cracker regularly on all -users passphrases t catch the very simple ones. +behavior and optionally to run a passphrase cracker regularly on all +users passphrases to catch the very simple ones. @item --max-passphrase-days @var{n} @opindex max-passphrase-days @@ -378,11 +378,11 @@ @item --pinentry-program @var{filename} @opindex pinentry-program Use program @var{filename} as the PIN entry. The default is installation -dependend and can be shown with the @code{--version} command. +dependent and can be shown with the @code{--version} command. @item --pinentry-touch-file @var{filename} @opindex pinentry-touch-file -By default the file name of the socket gpg-agent is listening for +By default the filename of the socket gpg-agent is listening for requests is passed to Pinentry, so that it can touch that file before exiting (it does this only in curses mode). This option changes the file passed to Pinentry to @var{filename}. The special name @@ -394,7 +394,7 @@ @item --scdaemon-program @var{filename} @opindex scdaemon-program Use program @var{filename} as the Smartcard daemon. The default is -installation dependend and can be shown with the @code{--version} +installation dependent and can be shown with the @code{--version} command. @item --disable-scdaemon @@ -411,7 +411,7 @@ named @file{S.gpg-agent}, located in the home directory, and not create a random socket below a temporary directory. Tools connecting to @command{gpg-agent} should first try to connect to the socket given in -environment variable @var{GPG_AGENT_INFO} and the fall back to this +environment variable @var{GPG_AGENT_INFO} and then fall back to this socket. This option may not be used if the home directory is mounted as a remote file system. Note, that @option{--use-standard-socket} is the default on Windows systems. @@ -436,7 +436,7 @@ @itemx --keep-display @opindex keep-tty @opindex keep-display -Ignore requests to change change the current @code{tty} respective the X +Ignore requests to change the current @code{tty} respective the X window system's @code{DISPLAY} variable. This is useful to lock the pinentry to pop up at the @code{tty} or display you started the agent. @@ -448,7 +448,7 @@ In this mode of operation, the agent does not only implement the gpg-agent protocol, but also the agent protocol used by OpenSSH -(through a seperate socket). Consequently, it should possible to use +(through a separate socket). Consequently, it should be possible to use the gpg-agent as a drop-in replacement for the well known ssh-agent. SSH Keys, which are to be used through the agent, need to be added to @@ -459,7 +459,7 @@ the newly received key and storing it in a gpg-agent specific directory. -Once, a key has been added to the gpg-agent this way, the gpg-agent +Once a key has been added to the gpg-agent this way, the gpg-agent will be ready to use the key. Note: in case the gpg-agent receives a signature request, the user might @@ -468,7 +468,7 @@ mechanism for telling the agent on which display/terminal it is running, gpg-agent's ssh-support will use the TTY or X display where gpg-agent has been started. To switch this display to the current one, the -follwing command may be used: +following command may be used: @smallexample echo UPDATESTARTUPTTY | gpg-connect-agent @@ -556,17 +556,17 @@ This file is used when support for the secure shell agent protocol has been enabled (@pxref{option --enable-ssh-support}). Only keys present in this file are used in the SSH protocol. The @command{ssh-add} tool -y be used to add new entries to this file; you may also add them +may be used to add new entries to this file; you may also add them manually. Comment lines, indicated by a leading hash mark, as well as -empty lines are ignored. An entry starts with optional white spaces, +empty lines are ignored. An entry starts with optional whitespace, followed by the keygrip of the key given as 40 hex digits, optionally followed by the caching TTL in seconds and another optional field for -arbitrary flags. A @code{!} may be prepended to the keygrip to +arbitrary flags. The keygrip may be prefixed with a @code{!} to disable this entry. -The follwoing example lists exactly one key. Note that keys available +The following example lists exactly one key. Note that keys available through a OpenPGP smartcard in the active smartcard reader are -implictly added to this list; i.e. there is no need to list them. +implicitly added to this list; i.e. there is no need to list them. @example # Key added on 2005-02-25 15:08:29 @@ -585,7 +585,7 @@ Note that on larger installations, it is useful to put predefined files into the directory @file{/etc/skel/.gnupg/} so that newly created users start up with a working configuration. For existing users the -a small helper script is provied to create these files (@pxref{addgnupghome}). +a small helper script is provided to create these files (@pxref{addgnupghome}). @@ -604,7 +604,7 @@ @item SIGHUP @cpindex SIGHUP -This signal flushes all chached passphrases and if the program has been +This signal flushes all cached passphrases and if the program has been started with a configuration file, the configuration file is read again. Only certain options are honored: @code{quiet}, @code{verbose}, @code{debug}, @code{debug-all}, @code{debug-level}, @code{no-grab}, @@ -650,7 +650,7 @@ An alternative way is by replacing @command{ssh-agent} with @command{gpg-agent}. If for example @command{ssh-agent} is started as -part of the Xsession intialization you may simply replace +part of the Xsession initialization, you may simply replace @command{ssh-agent} by a script like: @cartouche Modified: trunk/doc/gpgsm.texi =================================================================== --- trunk/doc/gpgsm.texi 2008-01-27 14:43:52 UTC (rev 4681) +++ trunk/doc/gpgsm.texi 2008-01-28 08:03:08 UTC (rev 4682) @@ -58,7 +58,7 @@ @node GPGSM Commands @section Commands -Commands are not distinguished from options execpt for the fact that +Commands are not distinguished from options except for the fact that only one command is allowed. @menu @@ -612,7 +612,7 @@ @end table How these messages are mapped to the actual debugging flags is not -specified and may change with newer releaes of this program. They are +specified and may change with newer releases of this program. They are however carefully selected to best aid in debugging. @item --debug @var{flags} @@ -738,7 +738,7 @@ start with a hash mark and empty lines are ignored. Lines do have a length limit but this is not a serious limitation as the format of the entries is fixed and checked by gpgsm: A non-comment line starts with -optional white spaces, followed by exactly 40 hex character, white space +optional whitespace, followed by exactly 40 hex character, white space and a lowercased 2 letter country code. Additional data delimited with by a white space is current ignored but might late be used for other purposes. Modified: trunk/doc/scdaemon.texi =================================================================== --- trunk/doc/scdaemon.texi 2008-01-27 14:43:52 UTC (rev 4681) +++ trunk/doc/scdaemon.texi 2008-01-28 08:03:08 UTC (rev 4682) @@ -58,8 +58,8 @@ @node Scdaemon Commands @section Commands -Commands are not distinguished from options execpt for the fact that -only one one command is allowed. +Commands are not distinguished from options except for the fact that +only one command is allowed. @table @gnupgtabopt @item --version @@ -140,7 +140,7 @@ @end table How these messages are mapped to the actual debugging flags is not -specified and may change with newer releaes of this program. They are +specified and may change with newer releases of this program. They are however carefully selected to best aid in debugging. @quotation Note @@ -208,7 +208,7 @@ @item --no-detach @opindex no-detach -Don't detach the process from the console. This is manly usefule for +Don't detach the process from the console. This is mainly useful for debugging. @item --log-file @var{file} @@ -646,7 +646,7 @@ level functions and sends the data directly to the card. @var{hexstring} is expected to be a proper APDU. If @var{hexstring} is not given no commands are send to the card; However the command will -implictly check whether the card is ready for use. +implicitly check whether the card is ready for use. Using the option @code{--atr} returns the ATR of the card as a status message before any data like this: Modified: trunk/doc/tools.texi =================================================================== --- trunk/doc/tools.texi 2008-01-27 14:43:52 UTC (rev 4681) +++ trunk/doc/tools.texi 2008-01-28 08:03:08 UTC (rev 4682) @@ -1187,7 +1187,7 @@ @item unescape @var{args} Remove C-style escapes from @var{args}. Note that @code{\0} and - at code{\x00} terminate the returned string implictly. The string to be + at code{\x00} terminate the returned string implicitly. The string to be converted are the entire arguments right behind the delimiting space of the function name. @@ -1274,7 +1274,7 @@ @itemx /nosubst Enable and disable variable substitution. It defaults to disabled unless the command line option @option{--subst} has been used. -If /subst as been enabled once, leading white spaces are removed from +If /subst as been enabled once, leading whitespace is removed from input lines which makes scripts easier to read. @item /while @var{condition} Modified: trunk/doc/yat2m.c =================================================================== --- trunk/doc/yat2m.c 2008-01-27 14:43:52 UTC (rev 4681) +++ trunk/doc/yat2m.c 2008-01-28 08:03:08 UTC (rev 4682) @@ -42,7 +42,7 @@ the next input line if that line begins with @section, @subsection or @chapheading. - To insert verbatim troff markup, the follwing texinfo code may be + To insert verbatim troff markup, the following texinfo code may be used: @ifset manverb @@ -842,7 +842,7 @@ { char *line; int lnr = 0; - /* Fixme: The follwing state variables don't carry over to include + /* Fixme: The following state variables don't carry over to include files. */ int in_verbatim = 0; int skip_to_end = 0; /* Used to skip over menu entries. */ From cvs at cvs.gnupg.org Mon Jan 28 19:46:10 2008 From: cvs at cvs.gnupg.org (svn author wk) Date: Mon, 28 Jan 2008 19:46:10 +0100 Subject: [svn] gpgme - r1296 - trunk/gpgme Message-ID: Author: wk Date: 2008-01-28 19:46:08 +0100 (Mon, 28 Jan 2008) New Revision: 1296 Modified: trunk/gpgme/ChangeLog trunk/gpgme/gpgme.h trunk/gpgme/keylist.c Log: Fixed bug 876 Modified: trunk/gpgme/ChangeLog =================================================================== --- trunk/gpgme/ChangeLog 2008-01-14 17:34:21 UTC (rev 1295) +++ trunk/gpgme/ChangeLog 2008-01-28 18:46:08 UTC (rev 1296) @@ -1,3 +1,7 @@ +2008-01-28 Werner Koch + + * keylist.c (gpgme_get_key): Skip duplicated keys. Fixes bug 876. + 2008-01-14 Marcus Brinkmann * engine-gpgconf.c (gpgconf_config_load_cb): Fix program_name Modified: trunk/gpgme/gpgme.h =================================================================== --- trunk/gpgme/gpgme.h 2008-01-14 17:34:21 UTC (rev 1295) +++ trunk/gpgme/gpgme.h 2008-01-28 18:46:08 UTC (rev 1296) @@ -72,7 +72,7 @@ AM_PATH_GPGME macro) check that this header matches the installed library. Warning: Do not edit the next line. configure will do that for you! */ -#define GPGME_VERSION "1.1.6-svn1282" +#define GPGME_VERSION "1.1.7-svn1295" Modified: trunk/gpgme/keylist.c =================================================================== --- trunk/gpgme/keylist.c 2008-01-14 17:34:21 UTC (rev 1295) +++ trunk/gpgme/keylist.c 2008-01-28 18:46:08 UTC (rev 1296) @@ -1,6 +1,7 @@ /* keylist.c - Listing keys. Copyright (C) 2000 Werner Koch (dd9jn) - Copyright (C) 2001, 2002, 2003, 2004, 2006, 2007 g10 Code GmbH + Copyright (C) 2001, 2002, 2003, 2004, 2006, 2007, + 2008 g10 Code GmbH This file is part of GPGME. @@ -15,9 +16,8 @@ Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public - License along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. */ + License along with this program; if not, see . + */ #if HAVE_CONFIG_H #include @@ -964,11 +964,26 @@ err = gpgme_op_keylist_next (listctx, r_key); if (!err) { + try_next_key: err = gpgme_op_keylist_next (listctx, &key); if (gpgme_err_code (err) == GPG_ERR_EOF) - err = gpg_error (GPG_ERR_NO_ERROR); + err = 0; else { + if (!err + && *r_key && (*r_key)->subkeys && (*r_key)->subkeys->fpr + && key && key->subkeys && key->subkeys->fpr + && !strcmp ((*r_key)->subkeys->fpr, key->subkeys->fpr)) + { + /* The fingerprint is identical. We assume that this is + the same key and don't mark it as an ambiguous. This + problem may occur with corrupted keyrings and has + been noticed often with gpgsm. In fact gpgsm uses a + similar hack to sort out such duplicates but it can't + do that while listing keys. */ + gpgme_key_unref (key); + goto try_next_key; + } if (!err) { gpgme_key_unref (key); From cvs at cvs.gnupg.org Mon Jan 28 20:25:39 2008 From: cvs at cvs.gnupg.org (svn author marcus) Date: Mon, 28 Jan 2008 20:25:39 +0100 Subject: [svn] gpgme - r1297 - trunk/gpgme Message-ID: Author: marcus Date: 2008-01-28 20:25:35 +0100 (Mon, 28 Jan 2008) New Revision: 1297 Modified: trunk/gpgme/ChangeLog trunk/gpgme/engine-gpgsm.c Log: 2008-01-28 Marcus Brinkmann * engine-gpgsm.c (map_input_enc): Rename to ... (map_data_enc): ... this. Also change all callers. (gpgsm_encrypt, gpgsm_export, gpgsm_export_ext, gpgsm_genkey) (gpgsm_sign): Set encoding for output. Modified: trunk/gpgme/ChangeLog =================================================================== --- trunk/gpgme/ChangeLog 2008-01-28 18:46:08 UTC (rev 1296) +++ trunk/gpgme/ChangeLog 2008-01-28 19:25:35 UTC (rev 1297) @@ -1,3 +1,10 @@ +2008-01-28 Marcus Brinkmann + + * engine-gpgsm.c (map_input_enc): Rename to ... + (map_data_enc): ... this. Also change all callers. + (gpgsm_encrypt, gpgsm_export, gpgsm_export_ext, gpgsm_genkey) + (gpgsm_sign): Set encoding for output. + 2008-01-28 Werner Koch * keylist.c (gpgme_get_key): Skip duplicated keys. Fixes bug 876. Modified: trunk/gpgme/engine-gpgsm.c =================================================================== --- trunk/gpgme/engine-gpgsm.c 2008-01-28 18:46:08 UTC (rev 1296) +++ trunk/gpgme/engine-gpgsm.c 2008-01-28 19:25:35 UTC (rev 1297) @@ -788,7 +788,7 @@ static const char * -map_input_enc (gpgme_data_t d) +map_data_enc (gpgme_data_t d) { switch (gpgme_data_get_encoding (d)) { @@ -1132,7 +1132,7 @@ return gpg_error (GPG_ERR_INV_VALUE); gpgsm->input_cb.data = ciph; - err = gpgsm_set_fd (gpgsm, INPUT_FD, map_input_enc (gpgsm->input_cb.data)); + err = gpgsm_set_fd (gpgsm, INPUT_FD, map_data_enc (gpgsm->input_cb.data)); if (err) return gpg_error (GPG_ERR_GENERAL); /* FIXME */ gpgsm->output_cb.data = plain; @@ -1288,11 +1288,12 @@ return gpg_error (GPG_ERR_NOT_IMPLEMENTED); gpgsm->input_cb.data = plain; - err = gpgsm_set_fd (gpgsm, INPUT_FD, map_input_enc (gpgsm->input_cb.data)); + err = gpgsm_set_fd (gpgsm, INPUT_FD, map_data_enc (gpgsm->input_cb.data)); if (err) return err; gpgsm->output_cb.data = ciph; - err = gpgsm_set_fd (gpgsm, OUTPUT_FD, use_armor ? "--armor" : 0); + err = gpgsm_set_fd (gpgsm, OUTPUT_FD, use_armor ? "--armor" + : map_data_enc (gpgsm->output_cb.data)); if (err) return err; gpgsm_clear_fd (gpgsm, MESSAGE_FD); @@ -1328,7 +1329,8 @@ strcpy (&cmd[7], pattern); gpgsm->output_cb.data = keydata; - err = gpgsm_set_fd (gpgsm, OUTPUT_FD, use_armor ? "--armor" : 0); + err = gpgsm_set_fd (gpgsm, OUTPUT_FD, use_armor ? "--armor" + : map_data_enc (gpgsm->output_cb.data)); if (err) return err; gpgsm_clear_fd (gpgsm, INPUT_FD); @@ -1420,7 +1422,8 @@ *linep = '\0'; gpgsm->output_cb.data = keydata; - err = gpgsm_set_fd (gpgsm, OUTPUT_FD, use_armor ? "--armor" : 0); + err = gpgsm_set_fd (gpgsm, OUTPUT_FD, use_armor ? "--armor" + : map_data_enc (gpgsm->output_cb.data)); if (err) return err; gpgsm_clear_fd (gpgsm, INPUT_FD); @@ -1444,11 +1447,12 @@ return gpg_error (GPG_ERR_INV_VALUE); gpgsm->input_cb.data = help_data; - err = gpgsm_set_fd (gpgsm, INPUT_FD, map_input_enc (gpgsm->input_cb.data)); + err = gpgsm_set_fd (gpgsm, INPUT_FD, map_data_enc (gpgsm->input_cb.data)); if (err) return err; gpgsm->output_cb.data = pubkey; - err = gpgsm_set_fd (gpgsm, OUTPUT_FD, use_armor ? "--armor" : 0); + err = gpgsm_set_fd (gpgsm, OUTPUT_FD, use_armor ? "--armor" + : map_data_enc (gpgsm->output_cb.data)); if (err) return err; gpgsm_clear_fd (gpgsm, MESSAGE_FD); @@ -1469,7 +1473,7 @@ return gpg_error (GPG_ERR_INV_VALUE); gpgsm->input_cb.data = keydata; - err = gpgsm_set_fd (gpgsm, INPUT_FD, map_input_enc (gpgsm->input_cb.data)); + err = gpgsm_set_fd (gpgsm, INPUT_FD, map_data_enc (gpgsm->input_cb.data)); if (err) return err; gpgsm_clear_fd (gpgsm, OUTPUT_FD); @@ -1717,11 +1721,12 @@ } gpgsm->input_cb.data = in; - err = gpgsm_set_fd (gpgsm, INPUT_FD, map_input_enc (gpgsm->input_cb.data)); + err = gpgsm_set_fd (gpgsm, INPUT_FD, map_data_enc (gpgsm->input_cb.data)); if (err) return err; gpgsm->output_cb.data = out; - err = gpgsm_set_fd (gpgsm, OUTPUT_FD, use_armor ? "--armor" : 0); + err = gpgsm_set_fd (gpgsm, OUTPUT_FD, use_armor ? "--armor" + : map_data_enc (gpgsm->output_cb.data)); if (err) return err; gpgsm_clear_fd (gpgsm, MESSAGE_FD); @@ -1744,7 +1749,7 @@ return gpg_error (GPG_ERR_INV_VALUE); gpgsm->input_cb.data = sig; - err = gpgsm_set_fd (gpgsm, INPUT_FD, map_input_enc (gpgsm->input_cb.data)); + err = gpgsm_set_fd (gpgsm, INPUT_FD, map_data_enc (gpgsm->input_cb.data)); if (err) return err; if (plaintext) From cvs at cvs.gnupg.org Mon Jan 28 20:41:27 2008 From: cvs at cvs.gnupg.org (svn author marcus) Date: Mon, 28 Jan 2008 20:41:27 +0100 Subject: [svn] gpgme - r1298 - in trunk: . doc Message-ID: Author: marcus Date: 2008-01-28 20:41:26 +0100 (Mon, 28 Jan 2008) New Revision: 1298 Modified: trunk/NEWS trunk/doc/ChangeLog trunk/doc/gpgme.texi Log: 2008-01-28 Marcus Brinkmann * gpgme.texi: Document that data encoding affects some output data objects now. Modified: trunk/NEWS =================================================================== --- trunk/NEWS 2008-01-28 19:25:35 UTC (rev 1297) +++ trunk/NEWS 2008-01-28 19:41:26 UTC (rev 1298) @@ -1,10 +1,25 @@ Noteworthy changes in version 1.1.7 (unreleased) ------------------------------------------------ - * + * The encoding of gpgme_data_t objects can affect the output encoding + of export, sign and encrypt operations now (the same operations + that are also affected by the ASCII mode switch). We believe this + change in the ABI is innocent enough not to break existing + applications (it only affects the S/MIME backend on certain + operations). * Interface changes relative to the 1.1.6 release: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +gpgme_op_encrypt CHANGED: Output encoding can affect result. +gpgme_op_encrypt_start CHANGED: Output encoding can affect result. +gpgme_op_encrypt_sign CHANGED: Output encoding can affect result. +gpgme_op_encrypt_sign_start CHANGED: Output encoding can affect result. +gpgme_op_sign CHANGED: Output encoding can affect result. +gpgme_op_sign_start CHANGED: Output encoding can affect result. +gpgme_op_export CHANGED: Output encoding can affect result. +gpgme_op_export_start CHANGED: Output encoding can affect result. +gpgme_op_export_ext CHANGED: Output encoding can affect result. +gpgme_op_export_ext_start CHANGED: Output encoding can affect result. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Modified: trunk/doc/ChangeLog =================================================================== --- trunk/doc/ChangeLog 2008-01-28 19:25:35 UTC (rev 1297) +++ trunk/doc/ChangeLog 2008-01-28 19:41:26 UTC (rev 1298) @@ -1,3 +1,8 @@ +2008-01-28 Marcus Brinkmann + + * gpgme.texi: Document that data encoding affects some output data + objects now. + 2007-09-27 Marcus Brinkmann * gpgme.texi (Protocols and Engines): Document GPGME_PROTOCOL_UNKNOWN. Modified: trunk/doc/gpgme.texi =================================================================== --- trunk/doc/gpgme.texi 2008-01-28 19:25:35 UTC (rev 1297) +++ trunk/doc/gpgme.texi 2008-01-28 19:41:26 UTC (rev 1298) @@ -1868,8 +1868,11 @@ @deftp {Data type} {enum gpgme_data_encoding_t} @tindex gpgme_data_encoding_t The @code{gpgme_data_encoding_t} type specifies the encoding of a - at code{gpgme_data_t} object. This encoding is useful to give the backend -a hint on the type of data. The following data types are available: + at code{gpgme_data_t} object. For input data objects, the encoding is +useful to give the backend a hint on the type of data. For output +data objects, the encoding can specify the output data format on +certain operations. Please note that not all backends support all +encodings on all operations. The following data types are available: @table @code @item GPGME_DATA_ENCODING_NONE @@ -3264,7 +3267,8 @@ The function @code{gpgme_op_export} extracts public keys and returns them in the data buffer @var{keydata}. The output format of the key data returned is determined by the @acronym{ASCII} armor attribute set -for the context @var{ctx}. +for the context @var{ctx}, or, if that is not set, by the encoding +specified for @var{keydata}. If @var{pattern} is @code{NULL}, all available keys are returned. Otherwise, @var{pattern} contains an engine specific expression that @@ -3292,7 +3296,8 @@ The function @code{gpgme_op_export} extracts public keys and returns them in the data buffer @var{keydata}. The output format of the key data returned is determined by the @acronym{ASCII} armor attribute set -for the context @var{ctx}. +for the context @var{ctx}, or, if that is not set, by the encoding +specified for @var{keydata}. If @var{pattern} or @var{*pattern} is @code{NULL}, all available keys are returned. Otherwise, @var{pattern} is a @code{NULL} terminated @@ -4490,7 +4495,8 @@ The function @code{gpgme_op_sign} creates a signature for the text in the data object @var{plain} and returns it in the data object @var{sig}. The type of the signature created is determined by the - at acronym{ASCII} armor and text mode attributes set for the context + at acronym{ASCII} armor (or, if that is not set, by the encoding +specified for @var{sig}), the text mode attributes set for the context @var{ctx} and the requested signature mode @var{mode}. After the operation completed successfully, the result can be @@ -4650,11 +4656,12 @@ @subsubsection Encrypting a Plaintext @deftypefun gpgme_error_t gpgme_op_encrypt (@w{gpgme_ctx_t @var{ctx}}, @w{gpgme_key_t @var{recp}[]}, @w{gpgme_encrypt_flags_t @var{flags}}, @w{gpgme_data_t @var{plain}}, @w{gpgme_data_t @var{cipher}}) -The function @code{gpgme_op_encrypt} encrypts the plaintext in the data -object @var{plain} for the recipients @var{recp} and stores the +The function @code{gpgme_op_encrypt} encrypts the plaintext in the +data object @var{plain} for the recipients @var{recp} and stores the ciphertext in the data object @var{cipher}. The type of the -ciphertext created is determined by the @acronym{ASCII} armor and text -mode attributes set for the context @var{ctx}. +ciphertext created is determined by the @acronym{ASCII} armor (or, if +that is not set, by the encoding specified for @var{cipher}) and the +text mode attributes set for the context @var{ctx}. @var{key} must be a @code{NULL}-terminated array of keys. The user must keep references for all keys during the whole duration of the From cvs at cvs.gnupg.org Mon Jan 28 20:49:41 2008 From: cvs at cvs.gnupg.org (svn author marcus) Date: Mon, 28 Jan 2008 20:49:41 +0100 Subject: [svn] gpgme - r1299 - in trunk/tests: . gpg Message-ID: Author: marcus Date: 2008-01-28 20:49:40 +0100 (Mon, 28 Jan 2008) New Revision: 1299 Modified: trunk/tests/ChangeLog trunk/tests/gpg/Makefile.am Log: 2008-01-28 Marcus Brinkmann * gpg/Makefile.am (DISTCLEANFILES): Add pubring.kbx~. Modified: trunk/tests/ChangeLog =================================================================== --- trunk/tests/ChangeLog 2008-01-28 19:41:26 UTC (rev 1298) +++ trunk/tests/ChangeLog 2008-01-28 19:49:40 UTC (rev 1299) @@ -1,3 +1,7 @@ +2008-01-28 Marcus Brinkmann + + * gpg/Makefile.am (DISTCLEANFILES): Add pubring.kbx~. + 2008-01-10 Marcus Brinkmann * gpg/t-gpgconf.c (main): Allow for dirmngr not to be available. Modified: trunk/tests/gpg/Makefile.am =================================================================== --- trunk/tests/gpg/Makefile.am 2008-01-28 19:41:26 UTC (rev 1298) +++ trunk/tests/gpg/Makefile.am 2008-01-28 19:49:40 UTC (rev 1299) @@ -38,7 +38,7 @@ t-encrypt-large t-file-name t-gpgconf $(tests_unix) CLEANFILES = secring.gpg pubring.gpg pubring.kbx trustdb.gpg dirmngr.conf -DISTCLEANFILES = pubring.gpg~ random_seed gpg.conf gpg-agent.conf +DISTCLEANFILES = pubring.gpg~ pubring.kbx~ random_seed gpg.conf gpg-agent.conf EXTRA_DIST = mkdemodirs pubdemo.asc secdemo.asc cipher-1.asc cipher-2.asc \ geheim.txt pubkey-1.asc seckey-1.asc pinentry From cvs at cvs.gnupg.org Tue Jan 29 16:14:53 2008 From: cvs at cvs.gnupg.org (svn author wk) Date: Tue, 29 Jan 2008 16:14:53 +0100 Subject: [svn] GpgOL - r213 - trunk/src Message-ID: Author: wk Date: 2008-01-29 16:14:52 +0100 (Tue, 29 Jan 2008) New Revision: 213 Modified: trunk/src/ChangeLog trunk/src/mimemaker.c Log: Fixed creation of signatures. Modified: trunk/src/ChangeLog =================================================================== --- trunk/src/ChangeLog 2008-01-18 14:51:50 UTC (rev 212) +++ trunk/src/ChangeLog 2008-01-29 15:14:52 UTC (rev 213) @@ -1,3 +1,9 @@ +2008-01-29 Werner Koch + + * mimemaker.c (do_mime_sign): Set CTE for SMIME. + (delete_all_attachments): Remove extra semicolon accidently + inserted with revision 916. + 2008-01-18 Marcus Brinkmann * mimeparser.c (mime_verify): New variable sig_len, and pass it on Modified: trunk/src/mimemaker.c =================================================================== --- trunk/src/mimemaker.c 2008-01-18 14:51:50 UTC (rev 212) +++ trunk/src/mimemaker.c 2008-01-29 15:14:52 UTC (rev 213) @@ -890,7 +890,7 @@ return count; } -/* Write old all attachments from TABLE separated by BOUNDARY to SINK. +/* Write out all attachments from TABLE separated by BOUNDARY to SINK. This function needs to be syncronized with count_usable_attachments. */ static int write_attachments (sink_t sink, @@ -934,7 +934,7 @@ { if (table[idx].attach_type == ATTACHTYPE_MOSSTEMPL && table[idx].filename - && !strcmp (table[idx].filename, MIMEATTACHFILENAME)); + && !strcmp (table[idx].filename, MIMEATTACHFILENAME)) continue; hr = IMessage_DeleteAttach (message, table[idx].mapipos, 0, NULL, 0); if (hr) @@ -1144,7 +1144,7 @@ /* Main body of mime_sign without the the code to delete the original attachments. On success the function returns the current attachment table at R_ATT_TABLE or sets this to NULL on error. If - TMPSINK is set not atcghment will be created but the output + TMPSINK is set no attachment will be created but the output written to that sink. */ static int do_mime_sign (LPMESSAGE message, HWND hwnd, protocol_t protocol, @@ -1277,7 +1277,9 @@ if ((rc=write_string (sink, (protocol == PROTOCOL_OPENPGP ? "Content-Type: application/pgp-signature\r\n" - : "Content-Type: application/pkcs7-signature\r\n")))) + : ("Content-Transfer-Encoding: base64\r\n" + "Content-Type: application/pkcs7-signature\r\n") + )))) goto failure; /* If we would add "Content-Transfer-Encoding: 7bit\r\n" to this @@ -1286,8 +1288,10 @@ header itself, it detects that it already exists and somehow gets into a problem. It is not a problem with the other parts, though. Hmmm, triggered by the top levels CT protocol parameter? - Anyway, it is not required that we add it as we won't hash - it. */ + Anyway, it is not required that we add it as we won't hash it. + Note, that this only holds for OpenPGP; for S/MIME we need to set + set CTE. We even write it before the CT because that is the same + as Outlook would do it for a missing CTE. */ if ((rc = write_string (sink, "\r\n"))) goto failure; From cvs at cvs.gnupg.org Tue Jan 29 17:04:59 2008 From: cvs at cvs.gnupg.org (svn author wk) Date: Tue, 29 Jan 2008 17:04:59 +0100 Subject: [svn] GnuPG - r4683 - in trunk: g10 kbx sm Message-ID: Author: wk Date: 2008-01-29 17:04:57 +0100 (Tue, 29 Jan 2008) New Revision: 4683 Modified: trunk/g10/ChangeLog trunk/g10/keydb.c trunk/kbx/keybox-blob.c trunk/sm/certlist.c Log: Fixed a W32 crash in gpg2 when creating a new keyring. Typo fixes. Modified: trunk/g10/ChangeLog =================================================================== --- trunk/g10/ChangeLog 2008-01-28 08:03:08 UTC (rev 4682) +++ trunk/g10/ChangeLog 2008-01-29 16:04:57 UTC (rev 4683) @@ -1,3 +1,8 @@ +2008-01-29 Werner Koch + + * keydb.c (maybe_create_keyring): Take care of a missing slash. + (maybe_create_keyring) [W32]: Also test for forward slash. + 2008-01-26 Werner Koch * card-util.c (get_manufacturer): Add vendor 0004. Modified: trunk/g10/keydb.c =================================================================== --- trunk/g10/keydb.c 2008-01-28 08:03:08 UTC (rev 4682) +++ trunk/g10/keydb.c 2008-01-29 16:04:57 UTC (rev 4683) @@ -1,5 +1,6 @@ /* keydb.c - key database dispatcher - * Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. + * Copyright (C) 2001, 2002, 2003, 2004, 2005, + * 2008 Free Software Foundation, Inc. * * This file is part of GnuPG. * @@ -82,6 +83,7 @@ int rc; mode_t oldmask; char *last_slash_in_filename; + int save_slash; /* A quick test whether the filename already exists. */ if (!access (filename, F_OK)) @@ -98,6 +100,18 @@ tricky auto-creation which is anyway only done for some home directory name patterns. */ last_slash_in_filename = strrchr (filename, DIRSEP_C); +#if HAVE_W32_SYSTEM + { + /* Windows may either have a slash or a backslash. Take care of it. */ + char *p = strrchr (filename, '/'); + if (!last_slash_in_filename || p > last_slash_in_filename) + last_slash_in_filename = p; + } +#endif /*HAVE_W32_SYSTEM*/ + if (!last_slash_in_filename) + return gpg_error (GPG_ERR_ENOENT); /* No slash at all - should + not happen though. */ + save_slash = *last_slash_in_filename; *last_slash_in_filename = 0; if (access(filename, F_OK)) { @@ -115,9 +129,8 @@ goto leave; } } - *last_slash_in_filename = DIRSEP_C; + *last_slash_in_filename = save_slash; - /* To avoid races with other instances of gpg trying to create or update the keyring (it is removed during an update for a short time), we do the next stuff in a locked state. */ Modified: trunk/kbx/keybox-blob.c =================================================================== --- trunk/kbx/keybox-blob.c 2008-01-28 08:03:08 UTC (rev 4682) +++ trunk/kbx/keybox-blob.c 2008-01-29 16:04:57 UTC (rev 4683) @@ -103,7 +103,7 @@ b16 MD5 checksum (useful for KS syncronisation), we might also want to use a mac here. - b4 resevered + b4 reserved */ Modified: trunk/sm/certlist.c =================================================================== --- trunk/sm/certlist.c 2008-01-28 08:03:08 UTC (rev 4682) +++ trunk/sm/certlist.c 2008-01-29 16:04:57 UTC (rev 4683) @@ -367,7 +367,7 @@ /* We have to ignore ambigious names as long as there only fault is a bad key usage. This is required to support encryption and signing - certifciates of the same subject. + certificates of the same subject. Further we ignore them if they are due to an identical certificate (which may happen if a From cvs at cvs.gnupg.org Wed Jan 30 14:24:22 2008 From: cvs at cvs.gnupg.org (svn author marcus) Date: Wed, 30 Jan 2008 14:24:22 +0100 Subject: [svn] gpgme - r1300 - trunk/gpgme Message-ID: Author: marcus Date: 2008-01-30 14:24:21 +0100 (Wed, 30 Jan 2008) New Revision: 1300 Modified: trunk/gpgme/ChangeLog trunk/gpgme/kdpipeiodevice.cpp Log: 2008-01-30 Marcus Brinkmann * kdpipeiodevice.cpp: New version by Frank Osterfeld, fixes race condition. Modified: trunk/gpgme/ChangeLog =================================================================== --- trunk/gpgme/ChangeLog 2008-01-28 19:49:40 UTC (rev 1299) +++ trunk/gpgme/ChangeLog 2008-01-30 13:24:21 UTC (rev 1300) @@ -1,3 +1,8 @@ +2008-01-30 Marcus Brinkmann + + * kdpipeiodevice.cpp: New version by Frank Osterfeld, fixes race + condition. + 2008-01-28 Marcus Brinkmann * engine-gpgsm.c (map_input_enc): Rename to ... Modified: trunk/gpgme/kdpipeiodevice.cpp =================================================================== --- trunk/gpgme/kdpipeiodevice.cpp 2008-01-28 19:49:40 UTC (rev 1299) +++ trunk/gpgme/kdpipeiodevice.cpp 2008-01-30 13:24:21 UTC (rev 1300) @@ -106,6 +106,7 @@ bool error; bool eofShortCut; int errorCode; + bool isReading; bool consumerBlocksOnUs; private: @@ -127,6 +128,7 @@ error( false ), eofShortCut( false ), errorCode( 0 ), + isReading( false ), consumerBlocksOnUs( false ), rptr( 0 ), wptr( 0 ) { @@ -321,24 +323,28 @@ void KDPipeIODevice::Private::emitReadyRead() { - static int s_counter = 0; - const int counter = s_counter++; QPointer thisPointer( this ); - qDebug( "KDPipeIODevice::Private::emitReadyRead %p, %d", this, counter ); + qDebug( "KDPipeIODevice::Private::emitReadyRead %p", this ); emit q->readyRead(); if ( !thisPointer ) return; - + + bool mustNotify = false; + if ( reader ) { - qDebug( "KDPipeIODevice::Private::emitReadyRead %p, %d: locking reader (CONSUMER THREAD)", this, counter ); + qDebug( "KDPipeIODevice::Private::emitReadyRead %p: locking reader (CONSUMER THREAD)", this ); synchronized( reader ) { - qDebug( "KDPipeIODevice::Private::emitReadyRead %p, %d: locked reader (CONSUMER THREAD)", this, counter ); + qDebug( "KDPipeIODevice::Private::emitReadyRead %p: locked reader (CONSUMER THREAD)", this ); reader->readyReadSentCondition.wakeAll(); + mustNotify = !reader->bufferEmpty() && reader->isReading; + qDebug( "KDPipeIODevice::emitReadyRead %p: bufferEmpty: %d reader in ReadFile: %d", this, reader->bufferEmpty(), reader->isReading ); } } - qDebug( "KDPipeIODevice::Private::emitReadyRead %p leaving %d", this, counter ); + if ( mustNotify ) + QTimer::singleShot( 100, this, SLOT( emitReadyRead() ) ); + qDebug( "KDPipeIODevice::Private::emitReadyRead %p leaving", this ); } @@ -732,10 +738,12 @@ qDebug( "%p: Reader::run: trying to read %d bytes", this, numBytes ); #ifdef Q_OS_WIN32 + isReading = true; mutex.unlock(); DWORD numRead; const bool ok = ReadFile( handle, buffer + wptr, numBytes, &numRead, 0 ); mutex.lock(); + isReading = false; if ( ok ) { if ( numRead == 0 ) { qDebug( "%p: Reader::run: got eof (numRead==0)", this ); From cvs at cvs.gnupg.org Wed Jan 30 14:26:34 2008 From: cvs at cvs.gnupg.org (svn author wk) Date: Wed, 30 Jan 2008 14:26:34 +0100 Subject: [svn] GnuPG - r4684 - in trunk: doc g10 Message-ID: Author: wk Date: 2008-01-30 14:26:32 +0100 (Wed, 30 Jan 2008) New Revision: 4684 Modified: trunk/doc/ChangeLog trunk/doc/DETAILS trunk/doc/gpg-agent.texi trunk/doc/qualified.txt trunk/g10/ChangeLog trunk/g10/tdbio.c Log: W32 fix for trustdb creation. Modified: trunk/doc/ChangeLog =================================================================== --- trunk/doc/ChangeLog 2008-01-29 16:04:57 UTC (rev 4683) +++ trunk/doc/ChangeLog 2008-01-30 13:26:32 UTC (rev 4684) @@ -1,3 +1,9 @@ +2008-01-29 Justin Pryzby (wk) + + * gpg-agent.texi (Agent Options): Grammar fixes + + * qualified.txt: Spelling fixes. + 2008-01-28 Justin Pryzby (wk) * gpg-agent.texi, yat2m.c, scdaemon.texi, qualified.txt @@ -559,7 +565,7 @@ * Makefile.am, gpgsm.texi: New. - Copyright 2002, 2004, 2005 Free Software Foundation, Inc. + Copyright 2002, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This file is free software; as a special exception the author gives unlimited permission to copy and/or distribute it, with or without Modified: trunk/doc/DETAILS =================================================================== --- trunk/doc/DETAILS 2008-01-29 16:04:57 UTC (rev 4683) +++ trunk/doc/DETAILS 2008-01-30 13:26:32 UTC (rev 4684) @@ -319,8 +319,8 @@ indicate how trustworthy the signature is. The error token values are currently only emitted by gpgsm. VALIDATION_MODEL describes the algorithm used to check the validity of the key. - The default is the standard gpg Web of Trust model respective - the standard X.509 model. The defined values are + The defaults are the standard Web of Trust model for gpg and the + the standard X.509 model for gpgsm. The defined values are "pgp" for the standard PGP WoT. "shell" for the standard X.509 model. Modified: trunk/doc/gpg-agent.texi =================================================================== --- trunk/doc/gpg-agent.texi 2008-01-29 16:04:57 UTC (rev 4683) +++ trunk/doc/gpg-agent.texi 2008-01-30 13:26:32 UTC (rev 4684) @@ -268,9 +268,9 @@ @opindex c @opindex csh Format the info output in daemon mode for use with the standard Bourne -shell respective the C-shell. The default is to guess it based on the -environment variable @code{SHELL} which is in almost all cases -correct. +shell or the C-shell respectively. The default is to guess it based on +the environment variable @code{SHELL} which is correct in almost all +cases. @item --write-env-file @var{file} @opindex write-env-file @@ -436,8 +436,8 @@ @itemx --keep-display @opindex keep-tty @opindex keep-display -Ignore requests to change the current @code{tty} respective the X -window system's @code{DISPLAY} variable. This is useful to lock the +Ignore requests to change the current @code{tty} or X window system's + at code{DISPLAY} variable respectively. This is useful to lock the pinentry to pop up at the @code{tty} or display you started the agent. @anchor{option --enable-ssh-support} Modified: trunk/doc/qualified.txt =================================================================== --- trunk/doc/qualified.txt 2008-01-29 16:04:57 UTC (rev 4683) +++ trunk/doc/qualified.txt 2008-01-30 13:26:32 UTC (rev 4684) @@ -4,9 +4,9 @@ # signatures are. Comments like this one and empty lines are allowed # Lines do have a length limit but this is not a serious limitation as # the format of the entries is fixed and checked by gpgsm: A -# non-comment line starts with optional white spaces, followed by -# exactly 40 hex character, white space and a lowercased 2 letter -# country code. Additional data delimited with by a white space is +# non-comment line starts with optional whitespaces, followed by +# exactly 40 hex character, whitespace and a lowercased 2 letter +# country code. Additional data delimited with by a whitespace is # current ignored but might late be used for other purposes. # # Note: The subversion copy of this file carries a gpg:signature Property changes on: trunk/doc/qualified.txt ___________________________________________________________________ Name: gpg:signature - -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (GNU/Linux) iEYEABECAAYFAkeFz40ACgkQzT/NXj1SwoL5QgCaAqT7klYFPeAiYY8AtP9NCWuz 6eIAn0BwaIEr/+CnuY8qNEctIMsNv2/8 =G3f1 -----END PGP SIGNATURE----- + -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (GNU/Linux) iEYEABECAAYFAkefYsgACgkQzT/NXj1SwoI+/wCeNYbFKlAPqVP9AZ+GBzsANnLv 18YAn1KYjowfJ4ZMFYFNlcr8jdF185oM =gSzo -----END PGP SIGNATURE----- Modified: trunk/g10/ChangeLog =================================================================== --- trunk/g10/ChangeLog 2008-01-29 16:04:57 UTC (rev 4683) +++ trunk/g10/ChangeLog 2008-01-30 13:26:32 UTC (rev 4684) @@ -1,3 +1,7 @@ +2008-01-30 Werner Koch + + * tdbio.c (tdbio_set_dbname): Also test for forward slash. + 2008-01-29 Werner Koch * keydb.c (maybe_create_keyring): Take care of a missing slash. Modified: trunk/g10/tdbio.c =================================================================== --- trunk/g10/tdbio.c 2008-01-29 16:04:57 UTC (rev 4683) +++ trunk/g10/tdbio.c 2008-01-30 13:26:32 UTC (rev 4684) @@ -505,14 +505,25 @@ int rc; char *p = strrchr( fname, DIRSEP_C ); mode_t oldmask; + int save_slash; - assert(p); +#if HAVE_W32_SYSTEM + { + /* Windows may either have a slash or a backslash. Take + care of it. */ + char *pp = strrchr (fname, '/'); + if (!p || pp > p) + p = pp; + } +#endif /*HAVE_W32_SYSTEM*/ + assert (p); + save_slash = *p; *p = 0; if( access( fname, F_OK ) ) { try_make_homedir( fname ); log_fatal( _("%s: directory does not exist!\n"), fname ); } - *p = DIRSEP_C; + *p = save_slash; xfree(db_name); db_name = fname; From cvs at cvs.gnupg.org Wed Jan 30 15:17:27 2008 From: cvs at cvs.gnupg.org (svn author marcus) Date: Wed, 30 Jan 2008 15:17:27 +0100 Subject: [svn] gpgme - r1301 - in trunk: . gpgme Message-ID: Author: marcus Date: 2008-01-30 15:17:26 +0100 (Wed, 30 Jan 2008) New Revision: 1301 Modified: trunk/ChangeLog trunk/autogen.sh trunk/configure.ac trunk/gpgme/gpgme.h Log: Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2008-01-30 13:24:21 UTC (rev 1300) +++ trunk/ChangeLog 2008-01-30 14:17:26 UTC (rev 1301) @@ -1,3 +1,8 @@ +2008-01-30 Marcus Brinkmann + + * configure.ac: Bump required version of automake up to 1.10. + * autogen.sh: Fix aclocal check. + 2008-01-04 Marcus Brinkmann Release GPGME 1.1.6. Modified: trunk/autogen.sh =================================================================== --- trunk/autogen.sh 2008-01-30 13:24:21 UTC (rev 1300) +++ trunk/autogen.sh 2008-01-30 14:17:26 UTC (rev 1301) @@ -134,7 +134,7 @@ check_version $AUTOHEADER $autoconf_vers_num $autoconf_vers autoconf fi if check_version $AUTOMAKE $automake_vers_num $automake_vers; then - check_version $ACLOCAL $automake_vers_num $autoconf_vers automake + check_version $ACLOCAL $automake_vers_num $automake_vers automake fi #if check_version $GETTEXT $gettext_vers_num $gettext_vers; then # check_version $MSGMERGE $gettext_vers_num $gettext_vers gettext Modified: trunk/configure.ac =================================================================== --- trunk/configure.ac 2008-01-30 13:24:21 UTC (rev 1300) +++ trunk/configure.ac 2008-01-30 14:17:26 UTC (rev 1301) @@ -20,7 +20,7 @@ # (Process this file with autoconf to produce a configure script.) AC_PREREQ(2.59) -min_automake_version="1.9.3" +min_automake_version="1.10" # Version number: Remember to change it immediately *after* a release. # Make sure to run "svn up" and "./autogen.sh --force" Modified: trunk/gpgme/gpgme.h =================================================================== --- trunk/gpgme/gpgme.h 2008-01-30 13:24:21 UTC (rev 1300) +++ trunk/gpgme/gpgme.h 2008-01-30 14:17:26 UTC (rev 1301) @@ -72,7 +72,7 @@ AM_PATH_GPGME macro) check that this header matches the installed library. Warning: Do not edit the next line. configure will do that for you! */ -#define GPGME_VERSION "1.1.7-svn1295" +#define GPGME_VERSION "1.1.7-svn1300" From cvs at cvs.gnupg.org Wed Jan 30 15:26:59 2008 From: cvs at cvs.gnupg.org (svn author wk) Date: Wed, 30 Jan 2008 15:26:59 +0100 Subject: [svn] GnuPG - r4685 - trunk/g10 Message-ID: Author: wk Date: 2008-01-30 15:26:57 +0100 (Wed, 30 Jan 2008) New Revision: 4685 Modified: trunk/g10/ChangeLog trunk/g10/keydb.c Log: Fixed yesterday's W32 fix. Modified: trunk/g10/ChangeLog =================================================================== --- trunk/g10/ChangeLog 2008-01-30 13:26:32 UTC (rev 4684) +++ trunk/g10/ChangeLog 2008-01-30 14:26:57 UTC (rev 4685) @@ -1,5 +1,6 @@ 2008-01-30 Werner Koch + * keydb.c (maybe_create_keyring): Fixed last change. * tdbio.c (tdbio_set_dbname): Also test for forward slash. 2008-01-29 Werner Koch Modified: trunk/g10/keydb.c =================================================================== --- trunk/g10/keydb.c 2008-01-30 13:26:32 UTC (rev 4684) +++ trunk/g10/keydb.c 2008-01-30 14:26:57 UTC (rev 4685) @@ -125,7 +125,7 @@ if (access (filename, F_OK)) { rc = gpg_error_from_syserror (); - *last_slash_in_filename = DIRSEP_C; + *last_slash_in_filename = save_slash; goto leave; } } From cvs at cvs.gnupg.org Wed Jan 30 18:21:30 2008 From: cvs at cvs.gnupg.org (svn author marcus) Date: Wed, 30 Jan 2008 18:21:30 +0100 Subject: [svn] GnuPG - r4686 - trunk/sm Message-ID: Author: marcus Date: 2008-01-30 18:21:28 +0100 (Wed, 30 Jan 2008) New Revision: 4686 Modified: trunk/sm/ChangeLog trunk/sm/keylist.c Log: 2008-01-29 Marcus Brinkmann * keylist.c (list_internal_keys): New variable lastcert. Use it to suppress duplicates which immediately follow each other. Modified: trunk/sm/ChangeLog =================================================================== --- trunk/sm/ChangeLog 2008-01-30 14:26:57 UTC (rev 4685) +++ trunk/sm/ChangeLog 2008-01-30 17:21:28 UTC (rev 4686) @@ -1,3 +1,8 @@ +2008-01-29 Marcus Brinkmann + + * keylist.c (list_internal_keys): New variable lastcert. Use it + to suppress duplicates which immediately follow each other. + 2008-01-27 Werner Koch * import.c (popen_protect_tool): Set bit 7 in the flags for Modified: trunk/sm/keylist.c =================================================================== --- trunk/sm/keylist.c 2008-01-30 14:26:57 UTC (rev 4685) +++ trunk/sm/keylist.c 2008-01-30 17:21:28 UTC (rev 4686) @@ -1171,6 +1171,7 @@ strlist_t sl; int ndesc; ksba_cert_t cert = NULL; + ksba_cert_t lastcert = NULL; gpg_error_t rc = 0; const char *lastresname, *resname; int have_secret; @@ -1228,6 +1229,7 @@ currently we stop at the first match. To do this we need an extra flag to enable this feature so */ + /* Suppress duplicates at least when they follow each other. */ lastresname = NULL; while (!(rc = keydb_search (hd, desc, ndesc))) { @@ -1248,7 +1250,15 @@ log_error ("keydb_get_cert failed: %s\n", gpg_strerror (rc)); goto leave; } - + /* Skip duplicated certificates, at least if they follow each + others. This works best if a single key is searched for and + expected. FIXME: Non-sequential duplicates remain. */ + if (gpgsm_certs_identical_p (cert, lastcert)) + { + ksba_cert_release (cert); + continue; + } + resname = keydb_get_resource_name (hd); if (lastresname != resname ) @@ -1301,7 +1311,9 @@ es_putc ('\n', fp); } } - ksba_cert_release (cert); + + ksba_cert_release (lastcert); + lastcert = cert; cert = NULL; } if (gpg_err_code (rc) == GPG_ERR_EOF || rc == -1 ) @@ -1311,6 +1323,7 @@ leave: ksba_cert_release (cert); + ksba_cert_release (lastcert); xfree (desc); keydb_release (hd); return rc; From cvs at cvs.gnupg.org Thu Jan 31 16:46:51 2008 From: cvs at cvs.gnupg.org (svn author wk) Date: Thu, 31 Jan 2008 16:46:51 +0100 Subject: [svn] GpgOL - r214 - in trunk: po src Message-ID: Author: wk Date: 2008-01-31 16:46:49 +0100 (Thu, 31 Jan 2008) New Revision: 214 Modified: trunk/po/de.po trunk/po/sv.po trunk/src/ChangeLog trunk/src/ext-commands.cpp trunk/src/mapihelp.cpp trunk/src/mapihelp.h trunk/src/message.cpp trunk/src/olflange.cpp trunk/src/session-events.cpp trunk/src/user-events.cpp Log: Another take on the sent-folder problem. Not yet finished. Modified: trunk/po/de.po =================================================================== --- trunk/po/de.po 2008-01-29 15:14:52 UTC (rev 213) +++ trunk/po/de.po 2008-01-31 15:46:49 UTC (rev 214) @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: GpgOL 0.10.0\n" "Report-Msgid-Bugs-To: bug-gpgol at g10code.com\n" -"POT-Creation-Date: 2008-01-03 12:18+0100\n" +"POT-Creation-Date: 2008-01-29 20:07+0100\n" "PO-Revision-Date: 2007-12-07 08:44+0100\n" "Last-Translator: Werner Koch \n" "Language-Team: de\n" @@ -56,7 +56,7 @@ msgid "Select Certificate Manager" msgstr "GnuPG Zertifikats&verwaltung" -#: src/engine.c:364 +#: src/engine.c:365 msgid "" "The user interface server is not available or does not work. Using an " "internal user interface.\n" @@ -70,7 +70,7 @@ "Diese ist allerdings sehr vereinfacht und kann z.B. keine S/MIME " "verschl?sselten Nachrichten entschl?sseln." -#: src/engine.c:368 src/ext-commands.cpp:672 src/main.c:603 src/main.c:609 +#: src/engine.c:369 src/ext-commands.cpp:682 src/main.c:603 src/main.c:609 msgid "GpgOL" msgstr "GpgOL" @@ -208,111 +208,111 @@ msgid "*** End Notation ***\n" msgstr "*** Ende Notation ***\n" -#: src/ext-commands.cpp:431 +#: src/ext-commands.cpp:441 msgid "&Decrypt and verify message" msgstr "Entschl?sseln/Pr?fen der Nachricht" -#: src/ext-commands.cpp:432 +#: src/ext-commands.cpp:442 msgid "&Verify signature" msgstr "&Unterschrift pr?fen" -#: src/ext-commands.cpp:433 +#: src/ext-commands.cpp:443 msgid "&Display crypto information" msgstr "~Krypto Informationen anzeigen" -#: src/ext-commands.cpp:443 +#: src/ext-commands.cpp:453 msgid ">GnuPG protocol" msgstr ">GnuPG Protokoll" -#: src/ext-commands.cpp:444 +#: src/ext-commands.cpp:454 msgid "auto" msgstr "automatisch" -#: src/ext-commands.cpp:445 +#: src/ext-commands.cpp:455 msgid "PGP/MIME" msgstr "PGP/MIME" -#: src/ext-commands.cpp:446 +#: src/ext-commands.cpp:456 msgid "S/MIME" msgstr "S/MIME" -#: src/ext-commands.cpp:448 +#: src/ext-commands.cpp:458 msgid "&encrypt message with GnuPG" msgstr "Nachricht mit GnuPG verschl?sseln" -#: src/ext-commands.cpp:449 +#: src/ext-commands.cpp:459 msgid "&sign message with GnuPG" msgstr "Nachricht mit GnuPG unterschreiben" -#: src/ext-commands.cpp:453 src/ext-commands.cpp:849 +#: src/ext-commands.cpp:463 src/ext-commands.cpp:859 msgid "Encrypt message with GnuPG" msgstr "Nachricht mit GnuPG verschl?sseln" -#: src/ext-commands.cpp:454 src/ext-commands.cpp:859 +#: src/ext-commands.cpp:464 src/ext-commands.cpp:869 msgid "Sign message with GnuPG" msgstr "Nachricht mit GnuPG unterschreiben" -#: src/ext-commands.cpp:489 +#: src/ext-commands.cpp:499 msgid "GnuPG Certificate &Manager" msgstr "GnuPG Zertifikats&verwaltung" -#: src/ext-commands.cpp:493 +#: src/ext-commands.cpp:503 msgid "Open the certificate manager" msgstr "Die Zertifikatsverwaltung ?ffnen" -#: src/ext-commands.cpp:671 +#: src/ext-commands.cpp:681 msgid "Could not start certificate manager" msgstr "Die Zertifikatsverwaltung konnte nicht aufgerufen werden" -#: src/ext-commands.cpp:733 +#: src/ext-commands.cpp:743 msgid "Select this option to decrypt and verify the message." msgstr "" "W?hlen Sie diese Option um die Nachricht zu entschl?sseln bzw. zu " "verifizieren." -#: src/ext-commands.cpp:740 +#: src/ext-commands.cpp:750 msgid "Select this option to show information on the crypto status" msgstr "" "W?hlen Sie diese Option um Informationen ?ber den Krypto-Status der " "Nachricht anzuzeigen." -#: src/ext-commands.cpp:748 src/ext-commands.cpp:829 +#: src/ext-commands.cpp:758 src/ext-commands.cpp:839 msgid "Check the signature now and display the result" msgstr "Die digitale Unterschrift jetzt pr?fen und das Resultat anzeigen" -#: src/ext-commands.cpp:755 +#: src/ext-commands.cpp:765 msgid "Select this option to automatically select the protocol." msgstr "W?hlen Sie diese Option zum das Protokoll automatisch auszuw?hlen." -#: src/ext-commands.cpp:762 +#: src/ext-commands.cpp:772 msgid "Select this option to select the PGP/MIME protocol." msgstr "W?hlen Sie diese Option zum das PGP/MIME Protokoll auszuw?hlen." -#: src/ext-commands.cpp:769 +#: src/ext-commands.cpp:779 msgid "Select this option to select the S/MIME protocol." msgstr "W?hlen Sie diese Option zum das S/MIME Protokoll auszuw?hlen." -#: src/ext-commands.cpp:776 +#: src/ext-commands.cpp:786 msgid "Select this option to encrypt the message." msgstr "W?hlen Sie diese Option zum Verschl?sseln der Nachricht." -#: src/ext-commands.cpp:783 +#: src/ext-commands.cpp:793 msgid "Select this option to sign the message." msgstr "W?hlen Sie diese Option zum Unterschreiben der Nachricht." -#: src/ext-commands.cpp:790 +#: src/ext-commands.cpp:800 msgid "Select this option to open the certificate manager" msgstr "W?hlen Sie diese Option zum die Zertifikatsverwaltung zu ?ffenen." -#: src/ext-commands.cpp:819 +#: src/ext-commands.cpp:829 msgid "Show S/MIME status info" msgstr "S/MIME Status Informationen anzeigen" -#: src/ext-commands.cpp:839 +#: src/ext-commands.cpp:849 msgid "Use S/MIME for sign/encrypt" msgstr "S/MIME zum signieren/verschl?sseln verwenden" -#: src/ext-commands.cpp:869 +#: src/ext-commands.cpp:879 msgid "Open the GpgOL certificate manager" msgstr "Zertifikatsverwaltung von GpgOL ?ffnen" @@ -334,7 +334,7 @@ "\n" "geschrieben." -#: src/mapihelp.cpp:1228 +#: src/mapihelp.cpp:1284 msgid "" "[The content of this message is not visible because it has been decrypted by " "another Outlook session. Use the \"decrypt/verify\" command to make it " @@ -344,7 +344,7 @@ "Outlook Sitzung entschl?sselt wurde. Verwenden Sie den Men?punkt " "\"entschl?sseln/verifizieren\" um den Inhalt wieder sichtbar zu machen.]" -#: src/mapihelp.cpp:1774 +#: src/mapihelp.cpp:1859 msgid "" "[The content of this message is not visible due to an processing error in " "GpgOL.]" @@ -352,7 +352,7 @@ "[Aufgrund eines Verarbeitungsfehlers in GpgOL ist der Inhalt dieser " "Nachricht nicht sichtbar.]" -#: src/message-events.cpp:215 +#: src/message-events.cpp:219 msgid "" "Sorry, we can only encrypt plain text messages and\n" "no RTF messages. Please make sure that only the text\n" @@ -363,13 +363,13 @@ "Sie sicher, da? lediglich das Text Format ausgew?hlt wurde.\n" "(In der Men?leiste: \"Format\" => \"Nur Text\")" -#: src/message.cpp:152 +#: src/message.cpp:161 msgid "[Crypto operation failed - can't show the body of the message]" msgstr "" "[Krypto-Operation ist fehlgeschlagen - Der Text der Nachricht kann nicht " "angezeigt werden.]" -#: src/message.cpp:241 +#: src/message.cpp:250 #, c-format msgid "" "Message class: %s\n" @@ -382,29 +382,29 @@ "Struktur der Nachricht:\n" "%s" -#: src/message.cpp:249 +#: src/message.cpp:258 msgid "GpgOL - Message Information" msgstr "GpgOL - Informationen zu der Nachricht" -#: src/message.cpp:837 +#: src/message.cpp:867 msgid "No recipients to encrypt to are given" msgstr "Empf?nger zum Verschl?sseln wurde nicht angegeben" -#: src/message.cpp:853 +#: src/message.cpp:883 #, c-format msgid "Encryption failed (%s)" msgstr "Verschl?sselungsfehler (%s)" -#: src/message.cpp:874 +#: src/message.cpp:904 #, c-format msgid "Signing failed (%s)" msgstr "Unterschrifterstellungsfehler (%s)" -#: src/mimeparser.c:956 +#: src/mimeparser.c:1063 msgid "Error writing to stream" msgstr "Dateischreibfehler" -#: src/mimeparser.c:957 +#: src/mimeparser.c:1064 msgid "I/O-Error" msgstr "Ein-/Ausgabefehler" @@ -510,7 +510,7 @@ msgid "This is GpgOL version %s" msgstr "Dies ist GpgOL Version %s" -#: src/olflange.cpp:483 +#: src/olflange.cpp:481 msgid "" "This version of Outlook is too old!\n" "\n" Modified: trunk/po/sv.po =================================================================== --- trunk/po/sv.po 2008-01-29 15:14:52 UTC (rev 213) +++ trunk/po/sv.po 2008-01-31 15:46:49 UTC (rev 214) @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: GPGol\n" "Report-Msgid-Bugs-To: bug-gpgol at g10code.com\n" -"POT-Creation-Date: 2008-01-03 12:18+0100\n" +"POT-Creation-Date: 2008-01-29 20:07+0100\n" "PO-Revision-Date: 2006-12-12 23:52+0100\n" "Last-Translator: Daniel Nylander \n" "Language-Team: Swedish \n" @@ -57,7 +57,7 @@ msgid "Select Certificate Manager" msgstr "GPG-nyckel&hanterare" -#: src/engine.c:364 +#: src/engine.c:365 msgid "" "The user interface server is not available or does not work. Using an " "internal user interface.\n" @@ -66,7 +66,7 @@ "are not readable." msgstr "" -#: src/engine.c:368 src/ext-commands.cpp:672 src/main.c:603 src/main.c:609 +#: src/engine.c:369 src/ext-commands.cpp:682 src/main.c:603 src/main.c:609 msgid "GpgOL" msgstr "" @@ -207,121 +207,121 @@ msgid "*** End Notation ***\n" msgstr "*** Notation slut ***\n" -#: src/ext-commands.cpp:431 +#: src/ext-commands.cpp:441 msgid "&Decrypt and verify message" msgstr "&Dekryptera och validera meddelandet" -#: src/ext-commands.cpp:432 +#: src/ext-commands.cpp:442 #, fuzzy msgid "&Verify signature" msgstr "FELAKTIG signatur!" -#: src/ext-commands.cpp:433 +#: src/ext-commands.cpp:443 msgid "&Display crypto information" msgstr "" -#: src/ext-commands.cpp:443 +#: src/ext-commands.cpp:453 msgid ">GnuPG protocol" msgstr "" -#: src/ext-commands.cpp:444 +#: src/ext-commands.cpp:454 msgid "auto" msgstr "" -#: src/ext-commands.cpp:445 +#: src/ext-commands.cpp:455 #, fuzzy msgid "PGP/MIME" msgstr "[PGP/MIME-meddelande]" -#: src/ext-commands.cpp:446 +#: src/ext-commands.cpp:456 msgid "S/MIME" msgstr "" -#: src/ext-commands.cpp:448 +#: src/ext-commands.cpp:458 #, fuzzy msgid "&encrypt message with GnuPG" msgstr "Signera meddelandet med GPG" -#: src/ext-commands.cpp:449 +#: src/ext-commands.cpp:459 #, fuzzy msgid "&sign message with GnuPG" msgstr "Signera meddelandet med GPG" -#: src/ext-commands.cpp:453 src/ext-commands.cpp:849 +#: src/ext-commands.cpp:463 src/ext-commands.cpp:859 #, fuzzy msgid "Encrypt message with GnuPG" msgstr "Signera meddelandet med GPG" -#: src/ext-commands.cpp:454 src/ext-commands.cpp:859 +#: src/ext-commands.cpp:464 src/ext-commands.cpp:869 #, fuzzy msgid "Sign message with GnuPG" msgstr "Signera meddelandet med GPG" -#: src/ext-commands.cpp:489 +#: src/ext-commands.cpp:499 #, fuzzy msgid "GnuPG Certificate &Manager" msgstr "GPG-nyckel&hanterare" -#: src/ext-commands.cpp:493 +#: src/ext-commands.cpp:503 msgid "Open the certificate manager" msgstr "" -#: src/ext-commands.cpp:671 +#: src/ext-commands.cpp:681 #, fuzzy msgid "Could not start certificate manager" msgstr "Kunde inte starta nyckelhanteraren" -#: src/ext-commands.cpp:733 +#: src/ext-commands.cpp:743 #, fuzzy msgid "Select this option to decrypt and verify the message." msgstr "V?lj det h?r alternativet f?r att kryptera meddelandet." -#: src/ext-commands.cpp:740 +#: src/ext-commands.cpp:750 #, fuzzy msgid "Select this option to show information on the crypto status" msgstr "V?lj det h?r alternativet f?r att signera meddelandet." -#: src/ext-commands.cpp:748 src/ext-commands.cpp:829 +#: src/ext-commands.cpp:758 src/ext-commands.cpp:839 msgid "Check the signature now and display the result" msgstr "" -#: src/ext-commands.cpp:755 +#: src/ext-commands.cpp:765 #, fuzzy msgid "Select this option to automatically select the protocol." msgstr "V?lj det h?r alternativet f?r att kryptera meddelandet." -#: src/ext-commands.cpp:762 +#: src/ext-commands.cpp:772 #, fuzzy msgid "Select this option to select the PGP/MIME protocol." msgstr "V?lj det h?r alternativet f?r att kryptera meddelandet." -#: src/ext-commands.cpp:769 +#: src/ext-commands.cpp:779 #, fuzzy msgid "Select this option to select the S/MIME protocol." msgstr "V?lj det h?r alternativet f?r att kryptera meddelandet." -#: src/ext-commands.cpp:776 +#: src/ext-commands.cpp:786 msgid "Select this option to encrypt the message." msgstr "V?lj det h?r alternativet f?r att kryptera meddelandet." -#: src/ext-commands.cpp:783 +#: src/ext-commands.cpp:793 msgid "Select this option to sign the message." msgstr "V?lj det h?r alternativet f?r att signera meddelandet." -#: src/ext-commands.cpp:790 +#: src/ext-commands.cpp:800 #, fuzzy msgid "Select this option to open the certificate manager" msgstr "V?lj det h?r alternativet f?r att kryptera meddelandet." -#: src/ext-commands.cpp:819 +#: src/ext-commands.cpp:829 msgid "Show S/MIME status info" msgstr "" -#: src/ext-commands.cpp:839 +#: src/ext-commands.cpp:849 msgid "Use S/MIME for sign/encrypt" msgstr "" -#: src/ext-commands.cpp:869 +#: src/ext-commands.cpp:879 msgid "Open the GpgOL certificate manager" msgstr "" @@ -338,21 +338,21 @@ "\"%s\"" msgstr "" -#: src/mapihelp.cpp:1228 +#: src/mapihelp.cpp:1284 msgid "" "[The content of this message is not visible because it has been decrypted by " "another Outlook session. Use the \"decrypt/verify\" command to make it " "visible]" msgstr "" -#: src/mapihelp.cpp:1774 +#: src/mapihelp.cpp:1859 msgid "" "[The content of this message is not visible due to an processing error in " "GpgOL.]" msgstr "" # A bit unclear in the original text -#: src/message-events.cpp:215 +#: src/message-events.cpp:219 msgid "" "Sorry, we can only encrypt plain text messages and\n" "no RTF messages. Please make sure that only the text\n" @@ -362,11 +362,11 @@ "och inte RTF-meddelanden. Se till att endast textformatet\n" "har valts i inst?llningarna." -#: src/message.cpp:152 +#: src/message.cpp:161 msgid "[Crypto operation failed - can't show the body of the message]" msgstr "" -#: src/message.cpp:241 +#: src/message.cpp:250 #, c-format msgid "" "Message class: %s\n" @@ -375,30 +375,30 @@ "%s" msgstr "" -#: src/message.cpp:249 +#: src/message.cpp:258 msgid "GpgOL - Message Information" msgstr "" -#: src/message.cpp:837 +#: src/message.cpp:867 msgid "No recipients to encrypt to are given" msgstr "" -#: src/message.cpp:853 +#: src/message.cpp:883 #, fuzzy, c-format msgid "Encryption failed (%s)" msgstr "Kryptering misslyckades" -#: src/message.cpp:874 +#: src/message.cpp:904 #, fuzzy, c-format msgid "Signing failed (%s)" msgstr "Signering misslyckades" -#: src/mimeparser.c:956 +#: src/mimeparser.c:1063 #, fuzzy msgid "Error writing to stream" msgstr "Fel vid skrivning av fil" -#: src/mimeparser.c:957 +#: src/mimeparser.c:1064 msgid "I/O-Error" msgstr "In-/Ut-fel" @@ -477,7 +477,7 @@ msgid "This is GpgOL version %s" msgstr "" -#: src/olflange.cpp:483 +#: src/olflange.cpp:481 msgid "" "This version of Outlook is too old!\n" "\n" Modified: trunk/src/ChangeLog =================================================================== --- trunk/src/ChangeLog 2008-01-29 15:14:52 UTC (rev 213) +++ trunk/src/ChangeLog 2008-01-31 15:46:49 UTC (rev 214) @@ -1,3 +1,15 @@ +2008-01-31 Werner Koch + + * message.cpp (message_verify): Check that the body attachment is + available before shortcutting the verification. + * user-events.cpp (OnSelectionChange): Change SMIME message + class. + * mapihelp.cpp (mapi_change_message_class): Add arg + SYNC_OVERRIDE. Changed all callers to pass false. + (mapi_test_sig_status): Take care of sent messages. + (mapi_get_gpgol_body_attachment): Change args to allow use as + testing fucntion too. Adjusted caller. + 2008-01-29 Werner Koch * mimemaker.c (do_mime_sign): Set CTE for SMIME. Modified: trunk/src/ext-commands.cpp =================================================================== --- trunk/src/ext-commands.cpp 2008-01-29 15:14:52 UTC (rev 213) +++ trunk/src/ext-commands.cpp 2008-01-31 15:46:49 UTC (rev 214) @@ -703,7 +703,8 @@ hr = eecb->GetObject (&mdb, (LPMAPIPROP *)&message); if (SUCCEEDED (hr)) { - mapi_change_message_class (message); + /* We sync here. */ + mapi_change_message_class (message, 1); } ul_release (message, __func__, __LINE__); ul_release (mdb, __func__, __LINE__); Modified: trunk/src/mapihelp.cpp =================================================================== --- trunk/src/mapihelp.cpp 2008-01-29 15:14:52 UTC (rev 213) +++ trunk/src/mapihelp.cpp 2008-01-31 15:46:49 UTC (rev 214) @@ -485,10 +485,12 @@ /* This function checks whether MESSAGE requires processing by us and - adjusts the message class to our own. Return true if the message - was changed. */ + adjusts the message class to our own. By passing true for + SYNC_OVERRIDE the actual MAPI message class will be updated to our + own message class overide. Return true if the message was + changed. */ int -mapi_change_message_class (LPMESSAGE message) +mapi_change_message_class (LPMESSAGE message, int sync_override) { HRESULT hr; ULONG tag; @@ -496,6 +498,7 @@ LPSPropValue propval = NULL; char *newvalue = NULL; int need_save = 0; + int have_override = 0; if (!message) return 0; /* No message: Nop. */ @@ -515,7 +518,10 @@ } } else - log_debug ("%s:%s: have override message class\n", SRCNAME, __func__); + { + have_override = 1; + log_debug ("%s:%s: have override message class\n", SRCNAME, __func__); + } if ( PROP_TYPE (propval->ulPropTag) == PT_STRING8 ) { @@ -610,6 +616,21 @@ newvalue = (char*)xmalloc (strlen (s) + 1); strcpy (stpcpy (newvalue, "IPM.Note.GpgOL"), s+14); } + else if (opt.enable_smime && sync_override && have_override + && !strncmp (s, "IPM.Note.GpgOL", 14) && (!s[14]||s[14] =='.')) + { + /* In case the original message class is not yet an GpgOL + class we set it here. This is needed to convince Outlook + not to do any special processing for IPM.Note.SMIME etc. */ + LPSPropValue propval2 = NULL; + + hr = HrGetOneProp ((LPMAPIPROP)message, PR_MESSAGE_CLASS_A, + &propval2); + if (SUCCEEDED (hr) && PROP_TYPE (propval2->ulPropTag) == PT_STRING8 + && propval2->Value.lpszA && strcmp (propval2->Value.lpszA, s)) + newvalue = (char*)xstrdup (s); + MAPIFreeBuffer (propval2); + } else if (opt.enable_smime && !strcmp (s, "IPM.Note.Secure.CexSig")) { /* This is a CryptoEx generated signature. */ @@ -661,6 +682,8 @@ } else { + log_debug ("%s:%s: setting message class to `%s'\n", + SRCNAME, __func__, newvalue); prop.ulPropTag = PR_MESSAGE_CLASS_A; prop.Value.lpszA = newvalue; hr = message->SetProps (1, &prop, NULL); @@ -743,12 +766,10 @@ hr = HrGetOneProp ((LPMAPIPROP)message, tag, &propval); if (FAILED (hr)) { - log_error ("%s:%s: HrGetOneProp(GpgOLMsgClass) failed: hr=%#lx\n", - SRCNAME, __func__, hr); hr = HrGetOneProp ((LPMAPIPROP)message, PR_MESSAGE_CLASS_A, &propval); if (FAILED (hr)) { - log_error ("%s:%s: HrGetOneProp() failed: hr=%#lx\n", + log_error ("%s:%s: HrGetOneProp(PR_MESSAGE_CLASS) failed: hr=%#lx\n", SRCNAME, __func__, hr); return msgtype; } @@ -1446,8 +1467,12 @@ hr = HrGetOneProp ((LPMAPIPROP)msg, tag, &propval); if (FAILED (hr)) return 0; /* No. */ + + /* We return False if we have an unknown signature status (?) or the + message has been setn by us and not yet checked (@). */ if (PROP_TYPE (propval->ulPropTag) == PT_STRING8) - yes = !(propval->Value.lpszA && !strcmp (propval->Value.lpszA, "?")); + yes = !(propval->Value.lpszA && (!strcmp (propval->Value.lpszA, "?") + || !strcmp (propval->Value.lpszA, "@"))); else yes = 0; @@ -1765,10 +1790,15 @@ is stored there. If R_ISHTML is not NULL a flag indicating whether the HTML is html formatted is stored there. If R_PROTECTED is not NULL a flag indicating whether the message was protected is stored - there. If no body attachment can be found or on any other error - NULL is returned. Caller must free the returned string. */ -char * -mapi_get_gpgol_body_attachment (LPMESSAGE message, size_t *r_nbytes, + there. If no body attachment can be found or on any other error an + error codes is returned and NULL is stored at R_BODY. Caller must + free the returned string. If NULL is passed for R_BODY, the + function will only test whether a body attachment is available and + return an error code if not. R_IS_HTML and R_PROTECTED are not + defined in this case. */ +int +mapi_get_gpgol_body_attachment (LPMESSAGE message, + char **r_body, size_t *r_nbytes, int *r_ishtml, int *r_protected) { HRESULT hr; @@ -1779,21 +1809,24 @@ ULONG moss_tag; char *body = NULL; int bodytype; + int found = 0; + if (r_body) + *r_body = NULL; if (r_ishtml) *r_ishtml = 0; if (r_protected) *r_protected = 0; if (get_gpgolattachtype_tag (message, &moss_tag) ) - return NULL; + return -1; hr = message->GetAttachmentTable (0, &mapitable); if (FAILED (hr)) { log_debug ("%s:%s: GetAttachmentTable failed: hr=%#lx", SRCNAME, __func__, hr); - return NULL; + return -1; } hr = HrQueryAllRows (mapitable, (LPSPropTagArray)&propAttNum, @@ -1803,7 +1836,7 @@ log_debug ("%s:%s: HrQueryAllRows failed: hr=%#lx", SRCNAME, __func__, hr); mapitable->Release (); - return NULL; + return -1; } n_attach = mapirows->cRows > 0? mapirows->cRows : 0; if (!n_attach) @@ -1811,7 +1844,7 @@ FreeProws (mapirows); mapitable->Release (); log_debug ("%s:%s: No attachments at all", SRCNAME, __func__); - return NULL; + return -1; } log_debug ("%s:%s: message has %u attachments\n", SRCNAME, __func__, n_attach); @@ -1842,8 +1875,12 @@ if ((bodytype=has_gpgol_body_name (att)) && get_gpgolattachtype (att, moss_tag) == ATTACHTYPE_FROMMOSS) { - if (get_attach_method (att) == ATTACH_BY_VALUE) - body = attach_to_buffer (att, r_nbytes, 1, r_protected); + found = 1; + if (r_body) + { + if (get_attach_method (att) == ATTACH_BY_VALUE) + body = attach_to_buffer (att, r_nbytes, 1, r_protected); + } att->Release (); if (r_ishtml) *r_ishtml = (bodytype == 2); @@ -1853,13 +1890,20 @@ } FreeProws (mapirows); mapitable->Release (); - if (!body) + if (!found) { log_error ("%s:%s: no suitable body attachment found", SRCNAME,__func__); - body = native_to_utf8 (_("[The content of this message is not visible" - " due to an processing error in GpgOL.]")); + if (r_body) + *r_body = native_to_utf8 + (_("[The content of this message is not visible" + " due to an processing error in GpgOL.]")); + return -1; } - - return body; + + if (r_body) + *r_body = body; + else + xfree (body); /* (Should not happen.) */ + return 0; } Modified: trunk/src/mapihelp.h =================================================================== --- trunk/src/mapihelp.h 2008-01-29 15:14:52 UTC (rev 213) +++ trunk/src/mapihelp.h 2008-01-31 15:46:49 UTC (rev 214) @@ -91,7 +91,7 @@ int mapi_set_header (LPMESSAGE msg, const char *name, const char *val); -int mapi_change_message_class (LPMESSAGE message); +int mapi_change_message_class (LPMESSAGE message, int sync_override); char *mapi_get_message_class (LPMESSAGE message); msgtype_t mapi_get_message_type (LPMESSAGE message); int mapi_to_mime (LPMESSAGE message, const char *filename); @@ -123,7 +123,8 @@ int mapi_has_last_decrypted (LPMESSAGE message); int mapi_test_last_decrypted (LPMESSAGE message); -char *mapi_get_gpgol_body_attachment (LPMESSAGE message, size_t *r_nbytes, +int mapi_get_gpgol_body_attachment (LPMESSAGE message, + char **r_body, size_t *r_nbytes, int *r_ishtml, int *r_protected); Modified: trunk/src/message.cpp =================================================================== --- trunk/src/message.cpp 2008-01-29 15:14:52 UTC (rev 213) +++ trunk/src/message.cpp 2008-01-31 15:46:49 UTC (rev 214) @@ -77,7 +77,7 @@ { log_debug ("%s:%s: message class not yet checked - doing now\n", SRCNAME, __func__); - if (mapi_change_message_class (message)) + if (mapi_change_message_class (message, 0)) goto retry; } break; @@ -86,7 +86,7 @@ { log_debug ("%s:%s: message class not checked with smime enabled " "- doing now\n", SRCNAME, __func__); - if (mapi_change_message_class (message)) + if (mapi_change_message_class (message, 0)) goto retry; } break; @@ -140,6 +140,7 @@ bool message_display_handler (LPEXCHEXTCALLBACK eecb, HWND hwnd) { + int err; HRESULT hr; LPMESSAGE message = NULL; LPMDB mdb = NULL; @@ -151,10 +152,10 @@ { /* (old: If the message was protected we don't allow a fallback to the OOM display methods.) Now: As it is difficult to find the - actual winodw we now use the OOM display always. */ - body = mapi_get_gpgol_body_attachment (message, NULL, - &ishtml, &wasprotected); - if (body) + actual window we now use the OOM display always. */ + err = mapi_get_gpgol_body_attachment (message, &body, NULL, + &ishtml, &wasprotected); + if (!err && body) update_display (hwnd, /*wasprotected? NULL:*/ eecb, ishtml, body); else update_display (hwnd, NULL, 0, @@ -485,10 +486,15 @@ } /* If a verification is forced, we set the cached signature status - first to "?" to mark that no verification has yet happened. */ + first to "?" to mark that no verification has yet happened. If a + verification status has been set and the body attachment is + available we don't do a verification again. The need to check + for the body attachment is to avoid problems if that attachment + has accidently be deleted. */ if (force) mapi_set_sig_status (message, "?"); - else if (mapi_test_sig_status (message)) + else if (mapi_test_sig_status (message) + && !mapi_get_gpgol_body_attachment (message, NULL,NULL,NULL,NULL)) return 0; /* Already checked that message. */ if (msgtype == MSGTYPE_GPGOL_CLEAR_SIGNED) Modified: trunk/src/olflange.cpp =================================================================== --- trunk/src/olflange.cpp 2008-01-29 15:14:52 UTC (rev 213) +++ trunk/src/olflange.cpp 2008-01-31 15:46:49 UTC (rev 214) @@ -500,6 +500,7 @@ || lContext == EECONTEXT_VIEWER || lContext == EECONTEXT_SESSION) { + // LPUNKNOWN pApplication = get_outlook_application_object (pEECB); // log_debug ("%s:%s: pApplication=%p\n", // SRCNAME, __func__, pApplication); Modified: trunk/src/session-events.cpp =================================================================== --- trunk/src/session-events.cpp 2008-01-29 15:14:52 UTC (rev 213) +++ trunk/src/session-events.cpp 2008-01-31 15:46:49 UTC (rev 214) @@ -108,7 +108,7 @@ message class IPM.Note.SMIME.MultipartSigned. If we would not change the message class here, OL will change it later (before an OnRead) to IPM.Note. */ - mapi_change_message_class (pMessage); + mapi_change_message_class (pMessage, 0); log_mapi_property (pMessage, PR_MESSAGE_CLASS,"PR_MESSAGE_CLASS"); ul_release (pMessage); ul_release (pMDB); Modified: trunk/src/user-events.cpp =================================================================== --- trunk/src/user-events.cpp 2008-01-29 15:14:52 UTC (rev 213) +++ trunk/src/user-events.cpp 2008-01-31 15:46:49 UTC (rev 214) @@ -43,17 +43,17 @@ /* Wrapper around UlRelease with error checking. */ -// static void -// ul_release (LPVOID punk, const char *func, int lnr) -// { -// ULONG res; +static void +ul_release (LPVOID punk, const char *func, int lnr) +{ + ULONG res; -// if (!punk) -// return; -// res = UlRelease (punk); -// log_debug ("%s:%s:%d: UlRelease(%p) had %lu references\n", -// SRCNAME, func, lnr, punk, res); -// } + if (!punk) + return; + res = UlRelease (punk); + log_debug ("%s:%s:%d: UlRelease(%p) had %lu references\n", + SRCNAME, func, lnr, punk, res); +} @@ -95,8 +95,10 @@ GpgolUserEvents::OnSelectionChange (LPEXCHEXTCALLBACK eecb) { HRESULT hr; - ULONG count, objtype; + ULONG count, objtype, msgflags; char msgclass[256]; + LPENTRYID entryid = NULL; + ULONG entryidlen; log_debug ("%s:%s: received\n", SRCNAME, __func__); @@ -104,8 +106,9 @@ if (SUCCEEDED (hr) && count > 0) { /* Get the first selected item. */ - hr = eecb->GetSelectionItem (0L, NULL, NULL, &objtype, - msgclass, sizeof msgclass -1, NULL, 0L); + hr = eecb->GetSelectionItem (0L, &entryidlen, &entryid, &objtype, + msgclass, sizeof msgclass -1, + &msgflags, 0L); if (SUCCEEDED(hr) && objtype == MAPI_MESSAGE) { log_debug ("%s:%s: message class: %s\n", @@ -113,29 +116,49 @@ /* If SMIME has been enabled and the current message is of class SMIME or in the past processed by CryptoEx, we - change the message class. */ - // Unfortunaltely we can't use this because: - // 1. GetSelectionItem is as usual heavily undocumented and - // we need to guess a bit to see how to get message from the - // EntryID (2nd and 3rd arg). 2. There are reports that - // OL2007 crashes when changing the message here. -// if (opt.enable_smime -// && (!strncmp (msgclass, "IPM.Note.SMIME", 14) -// || !strncmp (msgclass, "IPM.Note.Secure.Cex", 19))) -// { -// LPMESSAGE message = NULL; -// LPMDB mdb = NULL; + change the message class. -// hr = eecb->GetObject (&mdb, (LPMAPIPROP *)&message); -// if (SUCCEEDED (hr) && !mapi_has_sig_status (message)) -// { -// log_debug ("%s:%s: message class not yet checked" -// " - doing now\n", SRCNAME, __func__); -// mapi_change_message_class (message); -// } -// ul_release (message, __func__, __LINE__); -// ul_release (mdb, __func__, __LINE__); -// } + Note that there is a report on the Net that OL2007 + crashes when changing the message here. */ + if (opt.enable_smime + && (!strncmp (msgclass, "IPM.Note.SMIME", 14) + || !strncmp (msgclass, "IPM.Note.Secure.Cex", 19))) + { + LPMAPIFOLDER folder = NULL; + LPMDB mdb = NULL; + LPMESSAGE message = NULL; + + if (entryid) + log_hexdump (entryid, entryidlen, "selected entryid="); + else + log_debug ("no selected entry id"); + + hr = eecb->GetObject (&mdb, (LPMAPIPROP *)&folder); + if (SUCCEEDED (hr) && entryid) + { + hr = mdb->OpenEntry (entryidlen, entryid, + &IID_IMessage, MAPI_BEST_ACCESS, + &objtype, (IUnknown**)&message); + if (SUCCEEDED (hr)) + { + if (objtype == MAPI_MESSAGE) + { + log_debug ("%s:%s: about to change or sync " + "the message class", + SRCNAME, __func__); + /* We sync the message class here to get rid + of IPM.Note.SMIME etc. */ + mapi_change_message_class (message, 1); + } + } + else + log_error ("%s:%s: OpenEntry failed: hr=%#lx\n", + SRCNAME, __func__, hr); + ul_release (message, __func__, __LINE__); + } + ul_release (folder, __func__, __LINE__); + ul_release (mdb, __func__, __LINE__); + } } else if (SUCCEEDED(hr) && objtype == MAPI_FOLDER) { @@ -143,9 +166,12 @@ SRCNAME, __func__, objtype); } } - + + if (entryid) + MAPIFreeBuffer (entryid); } + /* I assume this is called from Outlook for all object changes. PEECB is a pointer to the IExchExtCallback interface. */ From cvs at cvs.gnupg.org Thu Jan 31 21:20:50 2008 From: cvs at cvs.gnupg.org (svn author wk) Date: Thu, 31 Jan 2008 21:20:50 +0100 Subject: [svn] dirmngr - r282 - trunk/po Message-ID: Author: wk Date: 2008-01-31 20:58:23 +0100 (Thu, 31 Jan 2008) New Revision: 282 Modified: trunk/po/ChangeLog trunk/po/de.po Log: Updates to the German po file. Modified: trunk/po/ChangeLog =================================================================== --- trunk/po/ChangeLog 2008-01-10 12:26:04 UTC (rev 281) +++ trunk/po/ChangeLog 2008-01-31 19:58:23 UTC (rev 282) @@ -1,3 +1,7 @@ +2008-01-22 Werner Koch + + * de.po: Two minor changes suggested by Ludwig Reiter. + 2007-09-14 Werner Koch * de.po: Typo fix. Modified: trunk/po/de.po [not shown]