From cvs at cvs.gnupg.org Mon Apr 2 20:09:29 2012 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Mon, 02 Apr 2012 20:09:29 +0200 Subject: [git] GnuPG - branch, STABLE-BRANCH-2-0, updated. gnupg-2.0.19-4-g1731ed8 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Guard". The branch, STABLE-BRANCH-2-0 has been updated via 1731ed88491559aca395bc0596cdc0ee3ea1fa3e (commit) via 3656aa9343c01a735b1a28a7e067e4cbb1bb1608 (commit) from 295c43bc361b1faa840668c9dab73e4772d31fb1 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 1731ed88491559aca395bc0596cdc0ee3ea1fa3e Author: Werner Koch Date: Fri Mar 30 15:29:35 2012 +0200 Cast second value of a ?: to void in estream.c. * common/estream.c (ESTREAM_MUTEX_LOCK): Cast pth_mutex_acquire result to void. Some compilers choke on mixing void and int in an conditional operator. Reported by Nelson H. F. Beebe. diff --git a/common/estream.c b/common/estream.c index 2d68415..3b6139e 100644 --- a/common/estream.c +++ b/common/estream.c @@ -176,7 +176,7 @@ static int estream_pth_killed; # define ESTREAM_MUTEX_INITIALIZER PTH_MUTEX_INIT # define ESTREAM_MUTEX_LOCK(mutex) \ (estream_pth_killed ? dummy_mutex_call_void ((mutex)) \ - : pth_mutex_acquire (&(mutex), 0, NULL)) + : (void)pth_mutex_acquire (&(mutex), 0, NULL)) # define ESTREAM_MUTEX_UNLOCK(mutex) \ (estream_pth_killed ? dummy_mutex_call_void ((mutex)) \ : pth_mutex_release (&(mutex))) commit 3656aa9343c01a735b1a28a7e067e4cbb1bb1608 Author: Werner Koch Date: Fri Mar 30 15:21:30 2012 +0200 Fix --with-pth-prefix help string. -- diff --git a/m4/gnupg-pth.m4 b/m4/gnupg-pth.m4 index 6dc9e0e..712d6e8 100644 --- a/m4/gnupg-pth.m4 +++ b/m4/gnupg-pth.m4 @@ -11,7 +11,7 @@ dnl implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNUPG_PTH_VERSION_CHECK(REQUIRED) -# +# # If the version is sufficient, HAVE_PTH will be set to yes. # # Taken and modified from the m4 macros which come with Pth. @@ -69,7 +69,7 @@ AC_DEFUN([GNUPG_PTH_VERSION_CHECK], AC_MSG_RESULT($gnupg_cv_pth_is_sane) else AC_MSG_RESULT(no) - fi + fi ]) @@ -82,7 +82,7 @@ AC_DEFUN([GNUPG_PTH_VERSION_CHECK], AC_DEFUN([GNUPG_PATH_PTH], [ AC_ARG_WITH(pth-prefix, AC_HELP_STRING([--with-pth-prefix=PFX], - [prefix where GNU Pth is installed (optional)]), + [prefix where GNU Pth is installed]), pth_config_prefix="$withval", pth_config_prefix="") if test x$pth_config_prefix != x ; then PTH_CONFIG="$pth_config_prefix/bin/pth-config" @@ -91,7 +91,7 @@ AC_DEFUN([GNUPG_PATH_PTH], tmp=ifelse([$1], ,1.3.7,$1) if test "$PTH_CONFIG" != "no"; then GNUPG_PTH_VERSION_CHECK($tmp) - if test $have_pth = yes; then + if test $have_pth = yes; then PTH_CFLAGS=`$PTH_CONFIG --cflags` PTH_LIBS=`$PTH_CONFIG --ldflags` PTH_LIBS="$PTH_LIBS `$PTH_CONFIG --libs --all`" ----------------------------------------------------------------------- Summary of changes: common/estream.c | 2 +- m4/gnupg-pth.m4 | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Tue Apr 3 16:28:03 2012 From: cvs at cvs.gnupg.org (by W. Trevor King) Date: Tue, 03 Apr 2012 16:28:03 +0200 Subject: [git] GPGME - branch, master, updated. gpgme-1.3.1-19-gc318e69 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GnuPG Made Easy". The branch, master has been updated via c318e69d8fa5f9e92d4aac3dd44fae5adcaade72 (commit) via bb62104adf78e8416b3c56b8b2621edd723b56cd (commit) via 6ec9e21dd1ea2f8509700bce018aef6ad7e9a927 (commit) from ff0a640a18e7b7457e6c2edfdc8307bf44628b60 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit c318e69d8fa5f9e92d4aac3dd44fae5adcaade72 Author: W. Trevor King Date: Tue Mar 27 15:10:02 2012 -0400 gpgme-tool: add help messages for a number of commands. * src/gpgme-tool.c (hlp_engine, hlp_sub_protocol, hlp_armor, hlp_textmode, hlp_include_certs, hlp_keylist_mode, hlp_input, hlp_output, hlp_message, hlp_recipient, hlp_signer, hlp_signers_clear, hlp_decrypt, hlp_decrypt_verify, hlp_encrypt, hlp_sign_encrypt, hlp_sign, hlp_verify, hlp_import): New strings. (hlp_protocol): Fix typo. (register_commands): Add documentation strings. (doc): Mention Assuan. diff --git a/src/gpgme-tool.c b/src/gpgme-tool.c index e424c38..9591d15 100644 --- a/src/gpgme-tool.c +++ b/src/gpgme-tool.c @@ -1,4 +1,4 @@ -/* gpgme-tool.c - GnuPG Made Easy. +/* gpgme-tool.c - Assuan server exposing GnuPG Made Easy operations. Copyright (C) 2009, 2010 g10 Code GmbH This file is part of GPGME. @@ -2053,6 +2053,10 @@ cmd_version (assuan_context_t ctx, char *line) } +static const char hlp_engine[] = + "ENGINE []\n" + "\n" + "Get information about a GPGME engine (a.k.a. protocol)."; static gpg_error_t cmd_engine (assuan_context_t ctx, char *line) { @@ -2064,7 +2068,8 @@ cmd_engine (assuan_context_t ctx, char *line) static const char hlp_protocol[] = "PROTOCOL []\n" "\n" - "With NAME, set the protocol. Without return the current protocol."; + "With NAME, set the protocol. Without, return the current\n" + "protocol."; static gpg_error_t cmd_protocol (assuan_context_t ctx, char *line) { @@ -2076,6 +2081,11 @@ cmd_protocol (assuan_context_t ctx, char *line) } +static const char hlp_sub_protocol[] = + "SUB_PROTOCOL []\n" + "\n" + "With NAME, set the sub-protocol. Without, return the\n" + "current sub-protocol."; static gpg_error_t cmd_sub_protocol (assuan_context_t ctx, char *line) { @@ -2087,6 +2097,11 @@ cmd_sub_protocol (assuan_context_t ctx, char *line) } +static const char hlp_armor[] = + "ARMOR [true|false]\n" + "\n" + "With 'true' or 'false', turn output ASCII armoring on or\n" + "off. Without, return the current armoring status."; static gpg_error_t cmd_armor (assuan_context_t ctx, char *line) { @@ -2106,6 +2121,11 @@ cmd_armor (assuan_context_t ctx, char *line) } +static const char hlp_textmode[] = + "TEXTMODE [true|false]\n" + "\n" + "With 'true' or 'false', turn text mode on or off.\n" + "Without, return the current text mode status."; static gpg_error_t cmd_textmode (assuan_context_t ctx, char *line) { @@ -2125,6 +2145,13 @@ cmd_textmode (assuan_context_t ctx, char *line) } +static const char hlp_include_certs[] = + "INCLUDE_CERTS [default|]\n" + "\n" + "With DEFAULT or N, set how many certificates should be\n" + "included in the next S/MIME signed message. See the\n" + "GPGME documentation for details on the meaning of" + "various N. Without either, return the current setting."; static gpg_error_t cmd_include_certs (assuan_context_t ctx, char *line) { @@ -2146,6 +2173,11 @@ cmd_include_certs (assuan_context_t ctx, char *line) } +static const char hlp_keylist_mode[] = + "KEYLIST_MODE [local] [extern] [sigs] [sig_notations]\n" + " [ephemeral] [validate]\n" + "\n" + "Set the mode for the next KEYLIST command."; static gpg_error_t cmd_keylist_mode (assuan_context_t ctx, char *line) { @@ -2175,6 +2207,11 @@ cmd_keylist_mode (assuan_context_t ctx, char *line) } +static const char hlp_input[] = + "INPUT [|FILE=]\n" + "\n" + "Set the input for the next command. Use either the\n" + "Assuan file descriptor FD or a filesystem PATH."; static gpg_error_t cmd_input (assuan_context_t ctx, char *line) { @@ -2193,6 +2230,11 @@ cmd_input (assuan_context_t ctx, char *line) } +static const char hlp_output[] = + "OUTPUT [|FILE=]\n" + "\n" + "Set the output for the next command. Use either the\n" + "Assuan file descriptor FD or a filesystem PATH."; static gpg_error_t cmd_output (assuan_context_t ctx, char *line) { @@ -2211,6 +2253,12 @@ cmd_output (assuan_context_t ctx, char *line) } +static const char hlp_message[] = + "MESSAGE [|FILE=]\n" + "\n" + "Set the plaintext message for the next VERIFY command\n" + "with a detached signature. Use either the Assuan file\n" + "descriptor FD or a filesystem PATH."; static gpg_error_t cmd_message (assuan_context_t ctx, char *line) { @@ -2229,6 +2277,11 @@ cmd_message (assuan_context_t ctx, char *line) } +static const char hlp_recipient[] = + "RECIPIENT \n" + "\n" + "Add the key matching PATTERN to the list of recipients\n" + "for the next encryption command."; static gpg_error_t cmd_recipient (assuan_context_t ctx, char *line) { @@ -2238,6 +2291,11 @@ cmd_recipient (assuan_context_t ctx, char *line) } +static const char hlp_signer[] = + "SIGNER \n" + "\n" + "Add the key with FINGERPRINT to the list of signers to\n" + "be used for the next signing command."; static gpg_error_t cmd_signer (assuan_context_t ctx, char *line) { @@ -2247,6 +2305,11 @@ cmd_signer (assuan_context_t ctx, char *line) } +static const char hlp_signers_clear[] = + "SIGNERS_CLEAR\n" + "\n" + "Clear the list of signers specified by previous SIGNER\n" + "commands."; static gpg_error_t cmd_signers_clear (assuan_context_t ctx, char *line) { @@ -2300,6 +2363,12 @@ _cmd_decrypt_verify (assuan_context_t ctx, char *line, int verify) } +static const char hlp_decrypt[] = + "DECRYPT\n" + "\n" + "Decrypt the object set by the last INPUT command and\n" + "write the decrypted message to the object set by the\n" + "last OUTPUT command."; static gpg_error_t cmd_decrypt (assuan_context_t ctx, char *line) { @@ -2307,6 +2376,12 @@ cmd_decrypt (assuan_context_t ctx, char *line) } +static const char hlp_decrypt_verify[] = + "DECRYPT_VERIFY\n" + "\n" + "Decrypt the object set by the last INPUT command and\n" + "verify any embedded signatures. Write the decrypted\n" + "message to the object set by the last OUTPUT command."; static gpg_error_t cmd_decrypt_verify (assuan_context_t ctx, char *line) { @@ -2369,6 +2444,14 @@ _cmd_sign_encrypt (assuan_context_t ctx, char *line, int sign) } +static const char hlp_encrypt[] = + "ENCRYPT [--always-trust] [--no-encrypt-to]\n" + " [--prepare] [--expect-sign]\n" + "\n" + "Encrypt the object set by the last INPUT command to\n" + "the keys specified by previous RECIPIENT commands. \n" + "Write the signed and encrypted message to the object\n" + "set by the last OUTPUT command."; static gpg_error_t cmd_encrypt (assuan_context_t ctx, char *line) { @@ -2376,6 +2459,15 @@ cmd_encrypt (assuan_context_t ctx, char *line) } +static const char hlp_sign_encrypt[] = + "SIGN_ENCRYPT [--always-trust] [--no-encrypt-to]\n" + " [--prepare] [--expect-sign]\n" + "\n" + "Sign the object set by the last INPUT command with the\n" + "keys specified by previous SIGNER commands and encrypt\n" + "it to the keys specified by previous RECIPIENT\n" + "commands. Write the signed and encrypted message to\n" + "the object set by the last OUTPUT command."; static gpg_error_t cmd_sign_encrypt (assuan_context_t ctx, char *line) { @@ -2383,6 +2475,15 @@ cmd_sign_encrypt (assuan_context_t ctx, char *line) } +static const char hlp_sign[] = + "SIGN [--clear|--detach]\n" + "\n" + "Sign the object set by the last INPUT command with the\n" + "keys specified by previous SIGNER commands. Write the\n" + "signed message to the object set by the last OUTPUT\n" + "command. With `--clear`, generate a clear text\n" + "signature. With `--detach`, generate a detached\n" + "signature."; static gpg_error_t cmd_sign (assuan_context_t ctx, char *line) { @@ -2432,6 +2533,13 @@ cmd_sign (assuan_context_t ctx, char *line) } +static const char hlp_verify[] = + "VERIFY\n" + "\n" + "Verify signatures on the object set by the last INPUT\n" + "and MESSAGE commands. If the message was encrypted,\n" + "write the plaintext to the object set by the last\n" + "OUTPUT command."; static gpg_error_t cmd_verify (assuan_context_t ctx, char *line) { @@ -2496,6 +2604,12 @@ cmd_verify (assuan_context_t ctx, char *line) } +static const char hlp_import[] = + "IMPORT []\n" + "\n" + "With PATTERN, import the keys described by PATTERN.\n" + "Without, read a key (or keys) from the object set by the\n" + "last INPUT command."; static gpg_error_t cmd_import (assuan_context_t ctx, char *line) { @@ -2919,31 +3033,31 @@ register_commands (assuan_context_t ctx) /* RESET, BYE are implicit. */ { "VERSION", cmd_version, hlp_version }, /* TODO: Set engine info. */ - { "ENGINE", cmd_engine }, + { "ENGINE", cmd_engine, hlp_engine }, { "PROTOCOL", cmd_protocol, hlp_protocol }, - { "SUB_PROTOCOL", cmd_sub_protocol }, - { "ARMOR", cmd_armor }, - { "TEXTMODE", cmd_textmode }, - { "INCLUDE_CERTS", cmd_include_certs }, - { "KEYLIST_MODE", cmd_keylist_mode }, - { "INPUT", cmd_input }, - { "OUTPUT", cmd_output }, - { "MESSAGE", cmd_message }, - { "RECIPIENT", cmd_recipient }, - { "SIGNER", cmd_signer }, - { "SIGNERS_CLEAR", cmd_signers_clear }, + { "SUB_PROTOCOL", cmd_sub_protocol, hlp_sub_protocol }, + { "ARMOR", cmd_armor, hlp_armor }, + { "TEXTMODE", cmd_textmode, hlp_textmode }, + { "INCLUDE_CERTS", cmd_include_certs, hlp_include_certs }, + { "KEYLIST_MODE", cmd_keylist_mode, hlp_keylist_mode }, + { "INPUT", cmd_input, hlp_input }, + { "OUTPUT", cmd_output, hlp_output }, + { "MESSAGE", cmd_message, hlp_message }, + { "RECIPIENT", cmd_recipient, hlp_recipient }, + { "SIGNER", cmd_signer, hlp_signer }, + { "SIGNERS_CLEAR", cmd_signers_clear, hlp_signers_clear }, /* TODO: SIGNOTATION missing. */ /* TODO: Could add wait interface if we allow more than one context */ /* and add _START variants. */ /* TODO: Could add data interfaces if we allow multiple data objects. */ - { "DECRYPT", cmd_decrypt }, - { "DECRYPT_VERIFY", cmd_decrypt_verify }, - { "ENCRYPT", cmd_encrypt }, - { "ENCRYPT_SIGN", cmd_sign_encrypt }, - { "SIGN_ENCRYPT", cmd_sign_encrypt }, - { "SIGN", cmd_sign }, - { "VERIFY", cmd_verify }, - { "IMPORT", cmd_import }, + { "DECRYPT", cmd_decrypt, hlp_decrypt }, + { "DECRYPT_VERIFY", cmd_decrypt_verify, hlp_decrypt_verify }, + { "ENCRYPT", cmd_encrypt, hlp_encrypt }, + { "ENCRYPT_SIGN", cmd_sign_encrypt, hlp_sign_encrypt }, + { "SIGN_ENCRYPT", cmd_sign_encrypt, hlp_sign_encrypt }, + { "SIGN", cmd_sign, hlp_sign }, + { "VERIFY", cmd_verify, hlp_verify }, + { "IMPORT", cmd_import, hlp_import }, { "EXPORT", cmd_export, hlp_export }, { "GENKEY", cmd_genkey }, { "DELETE", cmd_delete }, @@ -3056,7 +3170,7 @@ const char *argp_program_version = VERSION; const char *argp_program_bug_address = "bug-gpgme at gnupg.org"; error_t argp_err_exit_status = 1; -static char doc[] = "GPGME Tool -- invoke GPGME operations"; +static char doc[] = "GPGME Tool -- Assuan server exposing GPGME operations"; static char args_doc[] = "COMMAND [OPTIONS...]"; static struct argp_option options[] = { commit bb62104adf78e8416b3c56b8b2621edd723b56cd Author: W. Trevor King Date: Tue Mar 27 15:10:01 2012 -0400 uiserver.texi: fix decryption -> encryption typo in PREP_ENCRYPT discussion. * doc/uiserver.texi (PREP_ENCRYPT): Fix documentation. diff --git a/doc/uiserver.texi b/doc/uiserver.texi index c6da5ad..f3cd8ad 100644 --- a/doc/uiserver.texi +++ b/doc/uiserver.texi @@ -121,7 +121,7 @@ selected keys, the server MAY implement the command: @deffn Command PREP_ENCRYPT [- at w{}-protocol=@var{name}] [- at w{}-expect-sign] This commands considers all recipients set so far and decides whether it -is able to take input and start the actual decryption. This is kind of +is able to take input and start the actual encryption. This is kind of a dry-run @command{ENCRYPT} without requiring or using the input and output file descriptors. The server shall cache the result of any user selection to avoid asking this again when the actual @command{ENCRYPT} commit 6ec9e21dd1ea2f8509700bce018aef6ad7e9a927 Author: W. Trevor King Date: Tue Mar 27 15:10:00 2012 -0400 Update Werner Koch's distribution signing key in the README. * README: Update signing key. diff --git a/README b/README index a3ce1f4..f4d806d 100644 --- a/README +++ b/README @@ -85,7 +85,7 @@ a) If you have a trusted Version of GnuPG installed, you can simply check indeed a a signature of gpgme-x.y.z.tar.gz. The key used to create this signature is either of: - "pub 1024D/57548DCD 1998-07-07 Werner Koch (gnupg sig) " + "pub 2048R/4F25E3B6 2011-01-12 Werner Koch (dist sig)" "pub 1024D/87978569 1999-05-13 Marcus Brinkmann Marcus Brinkmann " @@ -94,7 +94,7 @@ a) If you have a trusted Version of GnuPG installed, you can simply check have to make sure that this is really the key and not a faked one. You can do this by comparing the output of: - $ gpg --fingerprint 0x57548DCD + $ gpg --fingerprint 0x4F25E3B6 with the fingerprint published elsewhere. ----------------------------------------------------------------------- Summary of changes: README | 4 +- doc/uiserver.texi | 2 +- src/gpgme-tool.c | 160 +++++++++++++++++++++++++++++++++++++++++++++-------- 3 files changed, 140 insertions(+), 26 deletions(-) hooks/post-receive -- GnuPG Made Easy http://git.gnupg.org From cvs at cvs.gnupg.org Wed Apr 4 13:01:37 2012 From: cvs at cvs.gnupg.org (by Ben Kibbey) Date: Wed, 04 Apr 2012 13:01:37 +0200 Subject: [git] GnuPG - branch, master, updated. gnupg-2.1.0beta3-64-g99fc61f Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Guard". The branch, master has been updated via 99fc61f1cf09c7f72a9037d91d3cf0cd2e035ae6 (commit) via a577f06c4aecc0af5b492e15812e9150c747cbe4 (commit) via 108e8f622ef9cfa256707debec1d379ce3cf21ca (commit) via 96e107fc29db625b247022ae1bf2cbe90b939c5d (commit) via 26b59d78c43d72fa28609fb2c0d80fb377393127 (commit) from 17499e761e8cd0fe867b5b5f3e42a71b6d45f954 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 99fc61f1cf09c7f72a9037d91d3cf0cd2e035ae6 Author: Ben Kibbey Date: Tue Apr 3 20:53:23 2012 -0400 Mention status messages in the documentation. Note INQUIRE_MAXLEN. diff --git a/doc/gpg-agent.texi b/doc/gpg-agent.texi index 1c4d92f..dcd96fb 100644 --- a/doc/gpg-agent.texi +++ b/doc/gpg-agent.texi @@ -796,6 +796,14 @@ certificate is that it will be possible to use the same keypair for different protocols, thereby saving space on the token used to keep the secret keys. + at ifset gpgtwoone +The @command{gpg-agent} may send status messages during a command or when +returning from a command to inform a client about the progress or result of an +operation. For example, the @var{INQUIRE_MAXLEN} status message may be sent +during a server inquire to inform the client of the maximum usable length of +the inquired data (which should not be exceeded). + at end ifset + @menu * Agent PKDECRYPT:: Decrypting a session key * Agent PKSIGN:: Signing a Hash commit a577f06c4aecc0af5b492e15812e9150c747cbe4 Author: Ben Kibbey Date: Tue Apr 3 20:53:22 2012 -0400 Document PASSWD --preset. diff --git a/doc/gpg-agent.texi b/doc/gpg-agent.texi index a7b9865..1c4d92f 100644 --- a/doc/gpg-agent.texi +++ b/doc/gpg-agent.texi @@ -1287,12 +1287,22 @@ option given the certificates are send back. @subsection Change a Passphrase @example + at ifset gpgtwoone + PASSWD [--cache-nonce=] [--passwd-nonce=] [--preset] @var{keygrip} + at end ifset + at ifclear gpgtwoone PASSWD @var{keygrip} + at end ifclear @end example This command is used to interactively change the passphrase of the key identified by the hex string @var{keygrip}. + at ifset gpgtwoone +The @option{--preset} option may be used to add the new passphrase to the +cache using the default cache parameters. + at end ifset + @node Agent UPDATESTARTUPTTY @subsection Change the standard display commit 108e8f622ef9cfa256707debec1d379ce3cf21ca Author: Ben Kibbey Date: Tue Apr 3 20:53:21 2012 -0400 Document GENKEY options. diff --git a/doc/gpg-agent.texi b/doc/gpg-agent.texi index eb5b334..a7b9865 100644 --- a/doc/gpg-agent.texi +++ b/doc/gpg-agent.texi @@ -976,7 +976,12 @@ option allows to choose the storage location. To get the secret key out of the PSE, a special export tool has to be used. @example + at ifset gpgtwoone + GENKEY [--no-protection] [--preset] [] + at end ifset + at ifclear gpgtwoone GENKEY + at end ifclear @end example Invokes the key generation process and the server will then inquire @@ -1021,6 +1026,13 @@ Here is an example session: S OK key created @end example + at ifset gpgtwoone +The @option{--no-protection} option may be used to prevent prompting for a +passphrase to protect the secret key while leaving the secret key unprotected. +The @option{--preset} option may be used to add the passphrase to the cache +using the default cache parameters. + at end ifset + @node Agent IMPORT @subsection Importing a Secret Key commit 96e107fc29db625b247022ae1bf2cbe90b939c5d Author: Ben Kibbey Date: Tue Apr 3 20:53:20 2012 -0400 Document PRESET_PASSPHRASE. diff --git a/doc/gpg-agent.texi b/doc/gpg-agent.texi index 19f7c30..eb5b334 100644 --- a/doc/gpg-agent.texi +++ b/doc/gpg-agent.texi @@ -805,6 +805,9 @@ secret keys. * Agent ISTRUSTED:: Importing a Root Certificate * Agent GET_PASSPHRASE:: Ask for a passphrase * Agent CLEAR_PASSPHRASE:: Expire a cached passphrase + at ifset gpgtwoone +* Agent PRESET_PASSPHRASE:: Set a passphrase for a keygrip + at end ifset * Agent GET_CONFIRMATION:: Ask for confirmation * Agent HAVEKEY:: Check whether a key is available * Agent LEARN:: Register a smartcard @@ -1196,6 +1199,30 @@ was set by gpg-agent. + at ifset gpgtwoone + at node Agent PRESET_PASSPHRASE + at subsection Set a passphrase for a keygrip + +This command adds a passphrase to the cache for the specified @var{keygrip}. + + at example + PRESET_PASSPHRASE [--inquire] [] + at end example + +The passphrase is a hexidecimal string when specified. When not specified, the +passphrase will be retrieved from the pinentry module unless the + at option{--inquire} option was specified in which case the passphrase will be +retrieved from the client. + +The @var{timeout} parameter keeps the passphrase cached for the specified +number of seconds. A value of @code{-1} means infinate while @code{0} means +the default (currently only a timeout of -1 is allowed, which means to never +expire it). + at end ifset + + + + @node Agent GET_CONFIRMATION @subsection Ask for confirmation commit 26b59d78c43d72fa28609fb2c0d80fb377393127 Author: Ben Kibbey Date: Tue Apr 3 20:53:19 2012 -0400 Document CLEAR_PASSPHRASE. And describe the --mode=normal option. diff --git a/doc/gpg-agent.texi b/doc/gpg-agent.texi index 4c7f13f..19f7c30 100644 --- a/doc/gpg-agent.texi +++ b/doc/gpg-agent.texi @@ -804,6 +804,7 @@ secret keys. * Agent EXPORT:: Exporting a Secret Key * Agent ISTRUSTED:: Importing a Root Certificate * Agent GET_PASSPHRASE:: Ask for a passphrase +* Agent CLEAR_PASSPHRASE:: Expire a cached passphrase * Agent GET_CONFIRMATION:: Ask for confirmation * Agent HAVEKEY:: Check whether a key is available * Agent LEARN:: Register a smartcard @@ -1173,6 +1174,28 @@ may be used to invalidate the cache entry for a passphrase. The function returns with OK even when there is no cached passphrase. + + at node Agent CLEAR_PASSPHRASE + at subsection Remove a cached passphrase + +Use this command to remove a cached passphrase. + + at example + at ifset gpgtwoone + CLEAR_PASSPHRASE [--mode=normal] + at end ifset + at ifclear gpgtwoone + CLEAR_PASSPHRASE + at end ifclear + at end example + + at ifset gpgtwoone +The @option{--mode=normal} option can be used to clear a @var{cache_id} that +was set by gpg-agent. + at end ifset + + + @node Agent GET_CONFIRMATION @subsection Ask for confirmation ----------------------------------------------------------------------- Summary of changes: doc/gpg-agent.texi | 80 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 80 insertions(+), 0 deletions(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Wed Apr 4 17:10:24 2012 From: cvs at cvs.gnupg.org (by Tomas Mraz) Date: Wed, 04 Apr 2012 17:10:24 +0200 Subject: [git] GCRYPT - branch, LIBGCRYPT-1-5-BRANCH, updated. libgcrypt-1.5.0-8-g5a4a9a1 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU crypto library". The branch, LIBGCRYPT-1-5-BRANCH has been updated via 5a4a9a1c7b817e49163537286e50572afe408685 (commit) from 5898c577034cbc2883f6f788c7deb5903f172bc8 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 5a4a9a1c7b817e49163537286e50572afe408685 Author: Tomas Mraz Date: Wed Apr 4 14:17:09 2012 +0200 Add GCRYCTL_SET_ENFORCED_FIPS_FLAG command. * doc/gcrypt.texi: Add documentation of the new command. * src/fips.c (_gcry_enforced_fips_mode): Report the enforced fips mode only when fips mode is enabled. (_gcry_set_enforced_fips_mode): New function. * src/g10lib.h: Add the _gcry_set_enforced_fips_mode prototype. * src/gcrypt.h.in: Add the GCRYCTL_SET_ENFORCED_FIPS_FLAG. * src/global.c (_gcry_vcontrol): Handle the new command. diff --git a/doc/gcrypt.texi b/doc/gcrypt.texi index 561a826..5d73578 100644 --- a/doc/gcrypt.texi +++ b/doc/gcrypt.texi @@ -577,8 +577,10 @@ initialization (i.e. before @code{gcry_check_version}). In addition to the standard FIPS mode, Libgcrypt may also be put into an Enforced FIPS mode by writing a non-zero value into the file - at file{/etc/gcrypt/fips_enabled}. The Enforced FIPS mode helps to -detect applications which don't fulfill all requirements for using + at file{/etc/gcrypt/fips_enabled} or by using the control command + at code{GCRYCTL_SET_ENFORCED_FIPS_FLAG} before any other calls to +libgcrypt. The Enforced FIPS mode helps to detect applications +which don't fulfill all requirements for using Libgcrypt in FIPS mode (@pxref{FIPS Mode}). Once Libgcrypt has been put into FIPS mode, it is not possible to @@ -787,20 +789,20 @@ proper random device. This command dumps information pertaining to the configuration of the library to the given stream. If NULL is given for @var{stream}, the log system is used. This command may be used before the intialization has -been finished but not before a gcry_version_check. +been finished but not before a @code{gcry_check_version}. @item GCRYCTL_OPERATIONAL_P; Arguments: none This command returns true if the library is in an operational state. This information makes only sense in FIPS mode. In contrast to other functions, this is a pure test function and won't put the library into FIPS mode or change the internal state. This command may be used before -the intialization has been finished but not before a gcry_version_check. +the intialization has been finished but not before a @code{gcry_check_version}. @item GCRYCTL_FIPS_MODE_P; Arguments: none This command returns true if the library is in FIPS mode. Note, that this is no indication about the current state of the library. This command may be used before the intialization has been finished but not -before a gcry_version_check. An application may use this command or +before a @code{gcry_check_version}. An application may use this command or the convenience macro below to check whether FIPS mode is actually active. @@ -816,10 +818,19 @@ implemented as a macro. Running this command puts the library into FIPS mode. If the library is already in FIPS mode, a self-test is triggered and thus the library will be put into operational state. This command may be used before a call -to gcry_check_version and that is actually the recommended way to let an +to @code{gcry_check_version} and that is actually the recommended way to let an application switch the library into FIPS mode. Note that Libgcrypt will reject an attempt to switch to fips mode during or after the intialization. + at item GCRYCTL_SET_ENFORCED_FIPS_FLAG; Arguments: none +Running this command sets the internal flag that puts the library into +the enforced FIPS mode during the FIPS mode initialization. This command +does not affect the library if the library is not put into the FIPS mode and +it must be used before any other libgcrypt library calls that initialize +the library such as @code{gcry_check_version}. Note that Libgcrypt will +reject an attempt to switch to the enforced fips mode during or after +the intialization. + @item GCRYCTL_SELFTEST; Arguments: none This may be used at anytime to have the library run all implemented self-tests. It works in standard and in FIPS mode. Returns 0 on diff --git a/src/fips.c b/src/fips.c index 8bc45e7..c5737a7 100644 --- a/src/fips.c +++ b/src/fips.c @@ -274,9 +274,17 @@ _gcry_fips_mode (void) int _gcry_enforced_fips_mode (void) { + if (!_gcry_fips_mode ()) + return 0; return enforced_fips_mode; } +/* Set a flag telling whether we are in the enforced fips mode. */ +void +_gcry_set_enforced_fips_mode (void) +{ + enforced_fips_mode = 1; +} /* If we do not want to enforce the fips mode, we can set a flag so that the application may check whether it is still in fips mode. diff --git a/src/g10lib.h b/src/g10lib.h index 8d98ae3..30706a2 100644 --- a/src/g10lib.h +++ b/src/g10lib.h @@ -326,6 +326,8 @@ int _gcry_fips_mode (void); int _gcry_enforced_fips_mode (void); +void _gcry_set_enforced_fips_mode (void); + void _gcry_inactivate_fips_mode (const char *text); int _gcry_is_fips_mode_inactive (void); diff --git a/src/gcrypt.h.in b/src/gcrypt.h.in index 44070bc..dab7033 100644 --- a/src/gcrypt.h.in +++ b/src/gcrypt.h.in @@ -415,7 +415,8 @@ enum gcry_ctl_cmds GCRYCTL_FORCE_FIPS_MODE = 56, GCRYCTL_SELFTEST = 57, /* Note: 58 .. 62 are used internally. */ - GCRYCTL_DISABLE_HWF = 63 + GCRYCTL_DISABLE_HWF = 63, + GCRYCTL_SET_ENFORCED_FIPS_FLAG = 64 }; /* Perform various operations defined by CMD. */ diff --git a/src/global.c b/src/global.c index d65b068..24cfca5 100644 --- a/src/global.c +++ b/src/global.c @@ -596,6 +596,16 @@ _gcry_vcontrol (enum gcry_ctl_cmds cmd, va_list arg_ptr) } break; + case GCRYCTL_SET_ENFORCED_FIPS_FLAG: + if (!any_init_done) + { + /* Not yet intialized at all. Set the enforced fips mode flag */ + _gcry_set_enforced_fips_mode (); + } + else + err = GPG_ERR_GENERAL; + break; + default: /* A call to make sure that the dummy code is linked in. */ _gcry_compat_identification (); ----------------------------------------------------------------------- Summary of changes: doc/gcrypt.texi | 23 +++++++++++++++++------ src/fips.c | 8 ++++++++ src/g10lib.h | 2 ++ src/gcrypt.h.in | 3 ++- src/global.c | 10 ++++++++++ 5 files changed, 39 insertions(+), 7 deletions(-) hooks/post-receive -- The GNU crypto library http://git.gnupg.org From cvs at cvs.gnupg.org Wed Apr 4 17:17:49 2012 From: cvs at cvs.gnupg.org (by Tomas Mraz) Date: Wed, 04 Apr 2012 17:17:49 +0200 Subject: [git] GCRYPT - branch, master, updated. libgcrypt-1.5.0-28-g90e49a1 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU crypto library". The branch, master has been updated via 90e49a11733bfba9c3c505ac487282d35757f682 (commit) from 70cca617ed75ea292e1fed769114dda5cc1d76f1 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 90e49a11733bfba9c3c505ac487282d35757f682 Author: Tomas Mraz Date: Wed Apr 4 14:17:09 2012 +0200 Add GCRYCTL_SET_ENFORCED_FIPS_FLAG command. * doc/gcrypt.texi: Add documentation of the new command. * src/fips.c (_gcry_enforced_fips_mode): Report the enforced fips mode only when fips mode is enabled. (_gcry_set_enforced_fips_mode): New function. * src/g10lib.h: Add the _gcry_set_enforced_fips_mode prototype. * src/gcrypt.h.in: Add the GCRYCTL_SET_ENFORCED_FIPS_FLAG. * src/global.c (_gcry_vcontrol): Handle the new command. diff --git a/doc/gcrypt.texi b/doc/gcrypt.texi index b7817d9..3bd2686 100644 --- a/doc/gcrypt.texi +++ b/doc/gcrypt.texi @@ -595,8 +595,10 @@ initialization (i.e. before @code{gcry_check_version}). In addition to the standard FIPS mode, Libgcrypt may also be put into an Enforced FIPS mode by writing a non-zero value into the file - at file{/etc/gcrypt/fips_enabled}. The Enforced FIPS mode helps to -detect applications which don't fulfill all requirements for using + at file{/etc/gcrypt/fips_enabled} or by using the control command + at code{GCRYCTL_SET_ENFORCED_FIPS_FLAG} before any other calls to +libgcrypt. The Enforced FIPS mode helps to detect applications +which don't fulfill all requirements for using Libgcrypt in FIPS mode (@pxref{FIPS Mode}). Once Libgcrypt has been put into FIPS mode, it is not possible to @@ -804,20 +806,20 @@ proper random device. This command dumps information pertaining to the configuration of the library to the given stream. If NULL is given for @var{stream}, the log system is used. This command may be used before the intialization has -been finished but not before a gcry_version_check. +been finished but not before a @code{gcry_check_version}. @item GCRYCTL_OPERATIONAL_P; Arguments: none This command returns true if the library is in an operational state. This information makes only sense in FIPS mode. In contrast to other functions, this is a pure test function and won't put the library into FIPS mode or change the internal state. This command may be used before -the intialization has been finished but not before a gcry_version_check. +the intialization has been finished but not before a @code{gcry_check_version}. @item GCRYCTL_FIPS_MODE_P; Arguments: none This command returns true if the library is in FIPS mode. Note, that this is no indication about the current state of the library. This command may be used before the intialization has been finished but not -before a gcry_version_check. An application may use this command or +before a @code{gcry_check_version}. An application may use this command or the convenience macro below to check whether FIPS mode is actually active. @@ -833,10 +835,19 @@ implemented as a macro. Running this command puts the library into FIPS mode. If the library is already in FIPS mode, a self-test is triggered and thus the library will be put into operational state. This command may be used before a call -to gcry_check_version and that is actually the recommended way to let an +to @code{gcry_check_version} and that is actually the recommended way to let an application switch the library into FIPS mode. Note that Libgcrypt will reject an attempt to switch to fips mode during or after the intialization. + at item GCRYCTL_SET_ENFORCED_FIPS_FLAG; Arguments: none +Running this command sets the internal flag that puts the library into +the enforced FIPS mode during the FIPS mode initialization. This command +does not affect the library if the library is not put into the FIPS mode and +it must be used before any other libgcrypt library calls that initialize +the library such as @code{gcry_check_version}. Note that Libgcrypt will +reject an attempt to switch to the enforced fips mode during or after +the intialization. + @item GCRYCTL_SELFTEST; Arguments: none This may be used at anytime to have the library run all implemented self-tests. It works in standard and in FIPS mode. Returns 0 on diff --git a/src/fips.c b/src/fips.c index a3445eb..e45baba 100644 --- a/src/fips.c +++ b/src/fips.c @@ -274,9 +274,17 @@ _gcry_fips_mode (void) int _gcry_enforced_fips_mode (void) { + if (!_gcry_fips_mode ()) + return 0; return enforced_fips_mode; } +/* Set a flag telling whether we are in the enforced fips mode. */ +void +_gcry_set_enforced_fips_mode (void) +{ + enforced_fips_mode = 1; +} /* If we do not want to enforce the fips mode, we can set a flag so that the application may check whether it is still in fips mode. diff --git a/src/g10lib.h b/src/g10lib.h index 46d5229..ec86c97 100644 --- a/src/g10lib.h +++ b/src/g10lib.h @@ -327,6 +327,8 @@ int _gcry_fips_mode (void); int _gcry_enforced_fips_mode (void); +void _gcry_set_enforced_fips_mode (void); + void _gcry_inactivate_fips_mode (const char *text); int _gcry_is_fips_mode_inactive (void); diff --git a/src/gcrypt.h.in b/src/gcrypt.h.in index 8e23ec4..1e9d11d 100644 --- a/src/gcrypt.h.in +++ b/src/gcrypt.h.in @@ -285,7 +285,8 @@ enum gcry_ctl_cmds GCRYCTL_FORCE_FIPS_MODE = 56, GCRYCTL_SELFTEST = 57, /* Note: 58 .. 62 are used internally. */ - GCRYCTL_DISABLE_HWF = 63 + GCRYCTL_DISABLE_HWF = 63, + GCRYCTL_SET_ENFORCED_FIPS_FLAG = 64 }; /* Perform various operations defined by CMD. */ diff --git a/src/global.c b/src/global.c index bde8791..4ce869a 100644 --- a/src/global.c +++ b/src/global.c @@ -599,6 +599,16 @@ _gcry_vcontrol (enum gcry_ctl_cmds cmd, va_list arg_ptr) } break; + case GCRYCTL_SET_ENFORCED_FIPS_FLAG: + if (!any_init_done) + { + /* Not yet intialized at all. Set the enforced fips mode flag */ + _gcry_set_enforced_fips_mode (); + } + else + err = GPG_ERR_GENERAL; + break; + default: /* A call to make sure that the dummy code is linked in. */ _gcry_compat_identification (); ----------------------------------------------------------------------- Summary of changes: doc/gcrypt.texi | 23 +++++++++++++++++------ src/fips.c | 8 ++++++++ src/g10lib.h | 2 ++ src/gcrypt.h.in | 3 ++- src/global.c | 10 ++++++++++ 5 files changed, 39 insertions(+), 7 deletions(-) hooks/post-receive -- The GNU crypto library http://git.gnupg.org From cvs at cvs.gnupg.org Thu Apr 5 21:42:03 2012 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Thu, 05 Apr 2012 21:42:03 +0200 Subject: [git] GnuPG - branch, master, updated. gnupg-2.1.0beta3-65-gf1e1387 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Guard". The branch, master has been updated via f1e1387bee286c7434f0462185048872bcdb4484 (commit) from 99fc61f1cf09c7f72a9037d91d3cf0cd2e035ae6 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit f1e1387bee286c7434f0462185048872bcdb4484 Author: Werner Koch Date: Thu Apr 5 20:32:42 2012 +0200 Do not mix test result with progress lines. This makes parsing of the results easier. Fixes bug#1400. * tests/openpgp/defs.inc (progress_cancel, progress_end) (progress_new): New. * tests/openpgp/conventional-mdc.test: Use progress functions * tests/openpgp/conventional.test: Ditto. * tests/openpgp/encrypt-dsa.test: Ditto. * tests/openpgp/encrypt.test: Ditto. * tests/openpgp/sigs.test: Ditto. -- The new output style is now: > MD5 SHA1 RIPEMD160 SHA256 SHA384 SHA512 SHA224 < PASS: sigs.test or if the test fails: > MD5 SHA1 sigs.test: ooops FAIL: sigs.test diff --git a/tests/openpgp/conventional-mdc.test b/tests/openpgp/conventional-mdc.test index a5e5c4e..15b525f 100755 --- a/tests/openpgp/conventional-mdc.test +++ b/tests/openpgp/conventional-mdc.test @@ -12,7 +12,7 @@ #info Checking conventional encryption for ciph in `all_cipher_algos`; do - echo_n "$ciph " + progress "$ciph" for i in 0 1 2 3 9 10 11 19 20 21 22 23 39 40 41 8192 32000 ; do # *BSD's dd can't cope with a count of 0 if test "$i" = "0"; then @@ -27,4 +27,5 @@ for ciph in `all_cipher_algos`; do cmp z y || error "$ciph/$i: mismatch" done done -echo_n "| " + +progress_end diff --git a/tests/openpgp/conventional.test b/tests/openpgp/conventional.test index 1464ee2..5028b29 100755 --- a/tests/openpgp/conventional.test +++ b/tests/openpgp/conventional.test @@ -18,7 +18,7 @@ for i in plain-2 data-32000 ; do done for a in `all_cipher_algos`; do - echo_n "$a " + progress "$a" for i in plain-1 data-80000 ; do echo "Hier spricht HAL" | $GPG --passphrase-fd 0 \ --cipher-algo $a -c -o x --yes $i @@ -26,4 +26,5 @@ for a in `all_cipher_algos`; do cmp $i y || error "$i: ($a) mismatch" done done -echo_n "| " + +progress_end diff --git a/tests/openpgp/defs.inc b/tests/openpgp/defs.inc index b9af8fe..49e085e 100755 --- a/tests/openpgp/defs.inc +++ b/tests/openpgp/defs.inc @@ -41,12 +41,21 @@ LC_MESSAGES= # Internal use. defs_stop_on_error=no defs_error_seen=no +defs_progress_active=no #-------------------------------- #------ utility functions ------- #-------------------------------- +progress_cancel () { + if [ x$defs_progress_active = xyes ]; then + echo + defs_progress_active=no + fi +} + fatal () { + progress_cancel echo "$pgmname: fatal:" $* >&2 echo "$pgmname: fatal:" $* >&5 echo stop >gnupg-test.stop @@ -54,6 +63,7 @@ fatal () { } error () { + progress_cancel echo "$pgmname:" $* >&2 defs_error_seen=yes echo "$pgmname:" $* >&5 @@ -77,6 +87,7 @@ resume_error () { } info () { + progress_cancel echo "$pgmname:" $* >&2 if [ -n "${verbose+set}" ]; then echo "$pgmname:" $* >&5 @@ -87,7 +98,6 @@ linefeed () { echo >&2 } - echo_n_init=no echo_n () { if test "$echo_n_init" = "no"; then @@ -110,6 +120,23 @@ echo_n () { } +progress_end () { + if [ x$defs_progress_active = xyes ]; then + echo "<" + defs_progress_active=no + fi +} + +progress () { + if [ x$defs_progress_active != xyes ]; then + echo_n " > " + defs_progress_active=yes + fi + echo_n "$* " +} + + + #cleanup () { # rm $cleanup_files 2>/dev/null || true # echo "#empty" >./gpg.conf diff --git a/tests/openpgp/encrypt-dsa.test b/tests/openpgp/encrypt-dsa.test index ed474d0..8ae93d8 100755 --- a/tests/openpgp/encrypt-dsa.test +++ b/tests/openpgp/encrypt-dsa.test @@ -18,7 +18,7 @@ for i in $plain_files $data_files ; do done for ca in `all_cipher_algos` ; do - echo_n "$ca " + progress "$ca" for i in $plain_files $data_files ; do $GPG --always-trust --cipher-algo $ca -e \ -o x --yes -r "$dsa_usrname2" $i @@ -26,4 +26,5 @@ for ca in `all_cipher_algos` ; do cmp $i y || error "$i: mismatch" done done -echo_n "| " + +progress_end diff --git a/tests/openpgp/encrypt.test b/tests/openpgp/encrypt.test index c50c66c..5ef5196 100755 --- a/tests/openpgp/encrypt.test +++ b/tests/openpgp/encrypt.test @@ -17,6 +17,7 @@ for i in $plain_files $data_files ; do cmp $i y || error "$i: mismatch" done +echo_n " > " for ca in `all_cipher_algos` ; do echo_n "$ca " for i in $plain_files $data_files ; do @@ -25,4 +26,4 @@ for ca in `all_cipher_algos` ; do cmp $i y || error "$i: mismatch" done done -echo_n "| " +echo "<" diff --git a/tests/openpgp/sigs.test b/tests/openpgp/sigs.test index 28ce9f1..d6d8898 100755 --- a/tests/openpgp/sigs.test +++ b/tests/openpgp/sigs.test @@ -17,7 +17,7 @@ for i in $plain_files $data_files; do done for da in `all_hash_algos` ; do - echo_n "$da " + progress "$da" # RSA key, so any hash is okay if have_pubkey_algo "RSA"; then @@ -42,4 +42,5 @@ for da in `all_hash_algos` ; do done fi done -echo_n "| " + +progress_end ----------------------------------------------------------------------- Summary of changes: tests/openpgp/conventional-mdc.test | 5 +++-- tests/openpgp/conventional.test | 5 +++-- tests/openpgp/defs.inc | 29 ++++++++++++++++++++++++++++- tests/openpgp/encrypt-dsa.test | 5 +++-- tests/openpgp/encrypt.test | 3 ++- tests/openpgp/sigs.test | 5 +++-- 6 files changed, 42 insertions(+), 10 deletions(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Tue Apr 10 10:07:16 2012 From: cvs at cvs.gnupg.org (by Ben Kibbey) Date: Tue, 10 Apr 2012 10:07:16 +0200 Subject: [git] GnuPG - branch, master, updated. gnupg-2.1.0beta3-66-gbee0ac2 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Guard". The branch, master has been updated via bee0ac28c9c8027540ae56900b9f85e0bd555f1d (commit) from f1e1387bee286c7434f0462185048872bcdb4484 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit bee0ac28c9c8027540ae56900b9f85e0bd555f1d Author: Ben Kibbey Date: Mon Apr 9 20:52:22 2012 -0400 Fix killing PID -1. When the KILLSCD command had been sent a race condition would occur causing PID -1 getting killed, which on Linux seems to terminate all applications for the current user. diff --git a/scd/apdu.c b/scd/apdu.c index 064f0d6..8467b03 100644 --- a/scd/apdu.c +++ b/scd/apdu.c @@ -1016,7 +1016,8 @@ pcsc_get_status_wrapped (int slot, unsigned int *status) close (slotp->pcsc.rsp_fd); slotp->pcsc.req_fd = -1; slotp->pcsc.rsp_fd = -1; - kill (slotp->pcsc.pid, SIGTERM); + if (slotp->pcsc.pid != -1) + kill (slotp->pcsc.pid, SIGTERM); slotp->pcsc.pid = (pid_t)(-1); slotp->used = 0; return sw; @@ -1180,7 +1181,8 @@ pcsc_send_apdu_wrapped (int slot, unsigned char *apdu, size_t apdulen, close (slotp->pcsc.rsp_fd); slotp->pcsc.req_fd = -1; slotp->pcsc.rsp_fd = -1; - kill (slotp->pcsc.pid, SIGTERM); + if (slotp->pcsc.pid != -1) + kill (slotp->pcsc.pid, SIGTERM); slotp->pcsc.pid = (pid_t)(-1); slotp->used = 0; return sw; @@ -1321,7 +1323,8 @@ control_pcsc_wrapped (int slot, unsigned long ioctl_code, close (slotp->pcsc.rsp_fd); slotp->pcsc.req_fd = -1; slotp->pcsc.rsp_fd = -1; - kill (slotp->pcsc.pid, SIGTERM); + if (slotp->pcsc.pid != -1) + kill (slotp->pcsc.pid, SIGTERM); slotp->pcsc.pid = (pid_t)(-1); slotp->used = 0; return pcsc_error_to_sw (err); @@ -1422,7 +1425,8 @@ close_pcsc_reader_wrapped (int slot) close (slotp->pcsc.rsp_fd); slotp->pcsc.req_fd = -1; slotp->pcsc.rsp_fd = -1; - kill (slotp->pcsc.pid, SIGTERM); + if (slotp->pcsc.pid != -1) + kill (slotp->pcsc.pid, SIGTERM); slotp->pcsc.pid = (pid_t)(-1); slotp->used = 0; return 0; @@ -1640,7 +1644,8 @@ reset_pcsc_reader_wrapped (int slot) close (slotp->pcsc.rsp_fd); slotp->pcsc.req_fd = -1; slotp->pcsc.rsp_fd = -1; - kill (slotp->pcsc.pid, SIGTERM); + if (slotp->pcsc.pid != -1) + kill (slotp->pcsc.pid, SIGTERM); slotp->pcsc.pid = (pid_t)(-1); slotp->used = 0; return sw; @@ -1965,7 +1970,8 @@ open_pcsc_reader_wrapped (const char *portstr) close (slotp->pcsc.rsp_fd); slotp->pcsc.req_fd = -1; slotp->pcsc.rsp_fd = -1; - kill (slotp->pcsc.pid, SIGTERM); + if (slotp->pcsc.pid != -1) + kill (slotp->pcsc.pid, SIGTERM); slotp->pcsc.pid = (pid_t)(-1); slotp->used = 0; /* There is no way to return SW. */ ----------------------------------------------------------------------- Summary of changes: scd/apdu.c | 18 ++++++++++++------ 1 files changed, 12 insertions(+), 6 deletions(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Fri Apr 13 11:07:41 2012 From: cvs at cvs.gnupg.org (by W. Trevor King) Date: Fri, 13 Apr 2012 11:07:41 +0200 Subject: [git] GPGME - branch, master, updated. gpgme-1.3.1-20-g62bbe58 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GnuPG Made Easy". The branch, master has been updated via 62bbe58280737d73badbe518f140e40480205176 (commit) from c318e69d8fa5f9e92d4aac3dd44fae5adcaade72 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 62bbe58280737d73badbe518f140e40480205176 Author: W. Trevor King Date: Thu Apr 12 13:51:49 2012 -0400 status-table.c: include string.h for strcmp. * status-table.c: include string.h to avoid `warning: implicit declaration of function 'strcmp'`. diff --git a/src/status-table.c b/src/status-table.c index 276f70e..8060bdb 100644 --- a/src/status-table.c +++ b/src/status-table.c @@ -24,6 +24,7 @@ #endif #include +#include #include "util.h" ----------------------------------------------------------------------- Summary of changes: src/status-table.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) hooks/post-receive -- GnuPG Made Easy http://git.gnupg.org From cvs at cvs.gnupg.org Mon Apr 16 12:33:45 2012 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Mon, 16 Apr 2012 12:33:45 +0200 Subject: [git] GCRYPT - branch, master, updated. libgcrypt-1.5.0-29-g3bb8585 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU crypto library". The branch, master has been updated via 3bb858551cd5d84e43b800edfa2b07d1529718a9 (commit) from 90e49a11733bfba9c3c505ac487282d35757f682 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 3bb858551cd5d84e43b800edfa2b07d1529718a9 Author: Werner Koch Date: Mon Apr 16 11:24:32 2012 +0200 State new contribution rules. * doc/DCO: New. * doc/HACKING: Document new rules. diff --git a/doc/DCO b/doc/DCO new file mode 100644 index 0000000..ee460f6 --- /dev/null +++ b/doc/DCO @@ -0,0 +1,29 @@ +Libgcrypt Developer's Certificate of Origin. Version 1.0 +========================================================= + +By making a contribution to the Libgcrypt project, I certify that: + +(a) The contribution was created in whole or in part by me and I + have the right to submit it under the free software license + indicated in the file; or + +(b) The contribution is based upon previous work that, to the + best of my knowledge, is covered under an appropriate free + software license and I have the right under that license to + submit that work with modifications, whether created in whole + or in part by me, under the same free software license + (unless I am permitted to submit under a different license), + as indicated in the file; or + +(c) The contribution was provided directly to me by some other + person who certified (a), (b) or (c) and I have not modified + it. + +(d) I understand and agree that this project and the contribution + are public and that a record of the contribution (including + all personal information I submit with it, including my + sign-off) is maintained indefinitely and may be redistributed + consistent with this project or the free software license(s) + involved. + +Signed-off-by: [Your name and mail address] diff --git a/doc/HACKING b/doc/HACKING index 4e0405d..0cb8d56 100644 --- a/doc/HACKING +++ b/doc/HACKING @@ -1,33 +1,86 @@ - Various hacking notes -*- text -*- - ======================= +# HACKING -*- org -*- +#+TITLE: Hacking notes for Libgcrypt +#+STARTUP: showall -No more ChangeLog files ------------------------ +* How to contribute -Do not modify any of the ChangeLog files in Libgcrypt. Starting on -December 1st, 2011 we put change information only in the GIT commit -log, and generate a top-level ChangeLog file from logs at "make dist" -time. As such, there are strict requirements on the form of the -commit log messages. The old ChangeLog files have all be renamed to -ChangeLog-2011 + The following stuff explains some basic procedures you need to + follow if you want to contribute code or documentation. +** No more ChangeLog files -Commit log requirements ------------------------ + Do not modify any of the ChangeLog files in Libgcrypt. Starting on + December 1st, 2011 we put change information only in the GIT commit + log, and generate a top-level ChangeLog file from logs at "make + dist" time. As such, there are strict requirements on the form of + the commit log messages. The old ChangeLog files have all be + renamed to ChangeLog-2011 -Your commit log should always start with a one-line summary, the second -line should be blank, and the remaining lines are usually ChangeLog-style -entries for all affected files. However, it's fine -- even recommended -- -to write a few lines of prose describing the change, when the summary -and ChangeLog entries don't give enough of the big picture. Omit the -leading TABs that you're used to seeing in a "real" ChangeLog file, but -keep the maximum line length at 72 or smaller, so that the generated -ChangeLog lines, each with its leading TAB, will not exceed 80 columns. +** Commit log requirements + Your commit log should always start with a one-line summary, the + second line should be blank, and the remaining lines are usually + ChangeLog-style entries for all affected files. However, it's fine + -- even recommended -- to write a few lines of prose describing the + change, when the summary and ChangeLog entries don't give enough of + the big picture. Omit the leading TABs that you're used to seeing + in a "real" ChangeLog file, but keep the maximum line length at 72 + or smaller, so that the generated ChangeLog lines, each with its + leading TAB, will not exceed 80 columns. +** License policy -Taking optimized MPI code out of GMP: -------------------------------------- + Libgcrypt is currently licensed under the LGPLv2+ with tools and the + manual being under the GPLv2+. We may eventually update to a newer + version of the licenses or a combination of them. It is thus + important, that all contributed code allows for an update of the + license; for example we can't accept code under the LGPLv2(only). + + Libgcrypt used to have a strict policy of requiring copyright + assignments to the FSF. To avoid this major organizational overhead + and to allow inclusion of code, not copyrighted by the FSF, this + policy has been relaxed. It is now also possible to contribute code + by asserting that the contribution is in accordance to the + "Libgcrypt Developer's Certificate of Origin" as found in the file + "DCO". (Except for a slight wording change, this DCO is identical + to the one used by the Linux kernel.) + + If your want to contribute code or documentation to Libgcrypt and + you didn't signed a copyright assignment with the FSF in the past, + you need to take these simple steps: + + - Decide which mail address you want to use. Please have your real + name in the address and not a pseudonym. Anonymous contributions + can only be done if you find a proxy who certifies for you. + + - If your employer or school might claim ownership of code written + by you; you need to talk to them to make sure that you have the + right to contribute under the DCO. + + - Send an OpenPGP signed mail to the gcrypt-devel at gnupg.org mailing + list from your mail address. Include a copy of the DCO as found + in the official master branch. Insert your name and email address + into the DCO in the same way you want to use it later. Example: + + Signed-off-by: Joe R. Hacker + + (If you really need it, you may perform simple transformations of + the mail address: Replacing "@" by " at " or "." by " dot ".) + + - That's it. From now on you only need to add a "Signed-off-by:" + line with your name and mail address to the commit message. It is + recommended to send the patches using a PGP/MIME signed mail. + +** Coding standards + + Please follow the GNU coding standards. If you are in doubt consult + the existing code as an example. Do no re-indent code without a + need. If you really need to do it, use a separate commit for such a + change. + + +* Porting hints +** Taking optimized MPI code out of GMP: I generated the pentium4/* files by glueing the existing assembler prologues to the GMP 4.2.1 assembler files generated with the m4 @@ -42,8 +95,9 @@ Taking optimized MPI code out of GMP: tedious work. -Debugging math stuff: ---------------------- +* Debug hints + +** Debugging math stuff: While debugging the ECC code in libgcrypt, I was in need for some computer algebra system which would allow me to verify the numbers diff --git a/doc/Makefile.am b/doc/Makefile.am index a6bd2ae..30330bb 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -17,7 +17,7 @@ # License along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA -EXTRA_DIST = README.apichanges HACKING \ +EXTRA_DIST = README.apichanges HACKING DCO \ libgcrypt-modules.eps fips-fsm.eps \ libgcrypt-modules.png fips-fsm.png \ libgcrypt-modules.pdf fips-fsm.pdf \ ----------------------------------------------------------------------- Summary of changes: doc/DCO | 29 +++++++++++++++ doc/HACKING | 102 ++++++++++++++++++++++++++++++++++++++++++------------- doc/Makefile.am | 2 +- 3 files changed, 108 insertions(+), 25 deletions(-) create mode 100644 doc/DCO hooks/post-receive -- The GNU crypto library http://git.gnupg.org From cvs at cvs.gnupg.org Tue Apr 17 11:01:08 2012 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Tue, 17 Apr 2012 11:01:08 +0200 Subject: [git] GnuPG - branch, master, updated. gnupg-2.1.0beta3-67-g8eeaff0 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Guard". The branch, master has been updated via 8eeaff0ef8db24d06784af4493417beacc6148b5 (commit) from bee0ac28c9c8027540ae56900b9f85e0bd555f1d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 8eeaff0ef8db24d06784af4493417beacc6148b5 Author: Werner Koch Date: Tue Apr 17 09:55:44 2012 +0200 faq: Replace --list-ownerturst by --export-ownertrust. -- diff --git a/doc/faq.org b/doc/faq.org index a11fabe..5d053c4 100644 --- a/doc/faq.org +++ b/doc/faq.org @@ -1357,7 +1357,7 @@ update this FAQ in the next month. See the section "Changes" for recent updates You can get a list of the assigned trust values (how much you trust the owner to correctly sign another person's key) with: - : $ gpg --list-ownertrust + : $ gpg --export-ownertrust The first field is the fingerprint of the primary key, the second field is the assigned value: ----------------------------------------------------------------------- Summary of changes: doc/faq.org | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Fri Apr 20 10:53:44 2012 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Fri, 20 Apr 2012 10:53:44 +0200 Subject: [git] Assuan - branch, master, updated. libassuan-2.0.3-6-g861d19e Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "IPC library used by GnuPG". The branch, master has been updated via 861d19e028af70c7009640efc98eb485fff546d7 (commit) from 5c00c7cc2901a879927a5756e1bb7ecf49439ebc (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 861d19e028af70c7009640efc98eb485fff546d7 Author: Werner Koch Date: Fri Apr 20 09:45:04 2012 +0200 State new contribution rules. * doc/DCO: New. * doc/HACKING: Doument new rules. Give examples for commit logs. diff --git a/AUTHORS b/AUTHORS index 790a024..1abbfbe 100644 --- a/AUTHORS +++ b/AUTHORS @@ -22,6 +22,10 @@ Ben Kibbey Assigns Past and Future Changes For GnuPG. - Fixes and new features +DCO: + + + Libassuan was orginally part of NewPG, a temporary fork of GnuPG, and later split of into a separate library. diff --git a/doc/DCO b/doc/DCO new file mode 100644 index 0000000..2809566 --- /dev/null +++ b/doc/DCO @@ -0,0 +1,29 @@ +Libassuan Developer's Certificate of Origin. Version 1.0 +========================================================= + +By making a contribution to the Libassuan project, I certify that: + +(a) The contribution was created in whole or in part by me and I + have the right to submit it under the free software license + indicated in the file; or + +(b) The contribution is based upon previous work that, to the + best of my knowledge, is covered under an appropriate free + software license and I have the right under that license to + submit that work with modifications, whether created in whole + or in part by me, under the same free software license + (unless I am permitted to submit under a different license), + as indicated in the file; or + +(c) The contribution was provided directly to me by some other + person who certified (a), (b) or (c) and I have not modified + it. + +(d) I understand and agree that this project and the contribution + are public and that a record of the contribution (including + all personal information I submit with it, including my + sign-off) is maintained indefinitely and may be redistributed + consistent with this project or the free software license(s) + involved. + +Signed-off-by: [Your name and mail address] diff --git a/doc/HACKING b/doc/HACKING index b7d6b10..0e32f58 100644 --- a/doc/HACKING +++ b/doc/HACKING @@ -2,7 +2,12 @@ #+TITLE: Hacking notes for Libassuan #+STARTUP: showall -* No more ChangeLog files +* How to contribute + + The following stuff explains some basic procedures you need to + follow if you want to contribute code or documentation. + +** No more ChangeLog files Do not modify any of the ChangeLog files in Libassuan. Starting on December 1st, 2011 we put change information only in the GIT @@ -12,7 +17,14 @@ be renamed to ChangeLog-2011 -* Commit log requirements +** Coding standards + + Please follow the GNU coding standards. If you are in doubt consult + the existing code as an example. Do no re-indent code without a + need. If you really need to do it, use a separate commit for such a + change. See below for the required commit log format. + +** Commit log requirements Your commit log should always start with a one-line summary, the second line should be blank, and the remaining lines are usually @@ -23,3 +35,76 @@ in a "real" ChangeLog file, but keep the maximum line length at 72 or smaller, so that the generated ChangeLog lines, each with its leading TAB, will not exceed 80 columns. + + Here is an example of a commit message: +#+begin_example +Make new functions also visible on non-W32. + +* src/system-posix.c (__assuan_read, __assuan_write, __assuan_recvmsg) +(__assuan_sendmsg, __assuan_waitpid): Make functions global. +* src/libassuan.vers: Add above functions. +* configure.ac: Set version to 2.1.0-git. +-- +Note that everything after the above tear off marker will not be +copied to the ChangeLog during a "make dist". You may use this to add +extra information about this commit which are mostly relevant for your +co-hackers. Recall that the ChangeLog itself fulfills requirements of +the GPL and is useful for quick history checks of a released version. +Developers will use the git log. +#+end_example + + If you don't want a ChangeLog entry at all, use this: +#+begin_example +Give examples for commit logs. + +-- +Because the tear off line is the first line of the body, not even the +summary line will be copied to the ChangeLog. Using only the tear off +line without any text is often useful for commits like "Typo and +grammar fixes." +#+end_example + + +** License policy + + Libassuan is currently licensed under the LGPLv2+ with tools and the + manual being under the GPLv3+. We may eventually update to a newer + version of the licenses or a combination of them. It is thus + important, that all contributed code allows for an update of the + license; in particular we can't accept code under the GPL or LGPL + without the "or any later version" term. + + Being developed as part of GnuPG-2, Libassuan used to have a strict + policy of requiring copyright assignments to the FSF. To avoid this + major organizational overhead and to allow inclusion of code, not + copyrighted by the FSF, this policy has been relaxed. It is now + also possible to contribute code by asserting that the contribution + is in accordance to the "Libassuan Developer's Certificate of + Origin" as found in the file "DCO". (Except for a slight wording + change, this DCO is identical to the one used by the Linux kernel.) + + If your want to contribute code or documentation to Libassuan and + you didn't signed a copyright assignment with the FSF in the past, + you need to take these simple steps: + + - Decide which mail address you want to use. Please have your real + name in the address and not a pseudonym. Anonymous contributions + can only be done if you find a proxy who certifies for you. + + - If your employer or school might claim ownership of code written + by you; you need to talk to them to make sure that you have the + right to contribute under the DCO. + + - Send an OpenPGP signed mail to the gnupg-devel at gnupg.org mailing + list from your mail address. Include a copy of the DCO as found + in the official master branch. Insert your name and email address + into the DCO in the same way you want to use it later. Example: + + Signed-off-by: Joe R. Hacker + + (If you really need it, you may perform simple transformations of + the mail address: Replacing "@" by " at " or "." by " dot ".) + + - That's it. From now on you only need to add a "Signed-off-by:" + line with your name and mail address to the commit message. It is + recommended to send the patches using a PGP/MIME signed mail. diff --git a/doc/Makefile.am b/doc/Makefile.am index cc41a78..6229ddc 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -18,7 +18,7 @@ ## Process this file with automake to produce Makefile.in -EXTRA_DIST = README.apichanges HACKING +EXTRA_DIST = README.apichanges HACKING DCO info_TEXINFOS = assuan.texi ----------------------------------------------------------------------- Summary of changes: AUTHORS | 4 ++ doc/DCO | 29 ++++++++++++++++++ doc/HACKING | 89 +++++++++++++++++++++++++++++++++++++++++++++++++++++- doc/Makefile.am | 2 +- 4 files changed, 121 insertions(+), 3 deletions(-) create mode 100644 doc/DCO hooks/post-receive -- IPC library used by GnuPG http://git.gnupg.org From cvs at cvs.gnupg.org Fri Apr 20 17:00:24 2012 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Fri, 20 Apr 2012 17:00:24 +0200 Subject: [git] GnuPG - branch, master, updated. gnupg-2.1.0beta3-68-g37df3d5 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Guard". The branch, master has been updated via 37df3d5f593f76ddbf1b9dc6de0173b7bb85c0ad (commit) from 8eeaff0ef8db24d06784af4493417beacc6148b5 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 37df3d5f593f76ddbf1b9dc6de0173b7bb85c0ad Author: Werner Koch Date: Fri Apr 20 15:43:06 2012 +0200 Change license for some files in common to LGPLv3+/GPLv2+. Having the LGPL on the common GnuPG code helps to share code between GnuPG and related projects (like GPGME and Libassuan). This is good for interoperability and to reduces bugs. * common/asshelp.c, common/asshelp.h, common/asshelp2.c, common/b64dec.c * common/b64enc.c, common/convert.c, common/dns-cert.c * common/dns-cert.h common/exechelp-posix.c, common/exechelp-w32.c * common/exechelp-w32ce.c, common/exechelp.h, common/get-passphrase.c * common/get-passphrase.h, common/gettime.c, common/gpgrlhelp.c * common/helpfile.c, common/homedir.c, common/http.c, common/http.h * common/i18n.c, common/init.c, common/init.h, common/iobuf.c * common/iobuf.h, common/localename.c, common/membuf.c, common/membuf.h * common/miscellaneous.c, common/openpgp-oid.c, common/openpgpdefs.h * common/percent.c, common/pka.c, common/pka.h, common/session-env.c * common/session-env.h, common/sexp-parse.h, common/sexputil.c * common/signal.c, common/srv.c, common/srv.h, common/ssh-utils.c * common/ssh-utils.h, common/sysutils.c, common/sysutils.h * common/tlv.c, common/tlv.h, common/ttyio.c, common/ttyio.h * common/userids.c, common/userids.h, common/xasprintf.c: Change license to LGPLv3+/GPLv2+/ diff --git a/AUTHORS b/AUTHORS index 1613279..6637615 100644 --- a/AUTHORS +++ b/AUTHORS @@ -152,10 +152,13 @@ Copyright ========= GnuPG is distributed under the GNU General Public License, version 3 -or later. A few files are under the Lesser General Public License, a -few other files carry the all permissive license note as found at the -bottom of this file. Certain files in keyserver/ allow one specific -exception: +or later. + +Note that some files are under a combination of the GNU Lesser General +Public License, version 3 and the GNU General Public License, version +2. A few other files carry the all permissive license note as found +at the bottom of this file. Certain files in keyserver/ allow one +specific exception: In addition, as a special exception, the Free Software Foundation gives permission to link the code of the keyserver helper tools: diff --git a/common/asshelp.c b/common/asshelp.c index 7ac6ff0..eb5dc65 100644 --- a/common/asshelp.c +++ b/common/asshelp.c @@ -3,12 +3,22 @@ * * This file is part of GnuPG. * - * GnuPG is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * This file is free software; you can redistribute it and/or modify + * it under the terms of either * - * GnuPG is distributed in the hope that it will be useful, + * - the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * or + * + * - the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * or both in parallel, as here. + * + * This file is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. diff --git a/common/asshelp.h b/common/asshelp.h index a6cf140..08c3c8c 100644 --- a/common/asshelp.h +++ b/common/asshelp.h @@ -3,12 +3,22 @@ * * This file is part of GnuPG. * - * GnuPG is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * This file is free software; you can redistribute it and/or modify + * it under the terms of either * - * GnuPG is distributed in the hope that it will be useful, + * - the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * or + * + * - the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * or both in parallel, as here. + * + * This file is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. @@ -38,7 +48,7 @@ send_pinentry_environment (assuan_context_t ctx, const char *opt_lc_messages, session_env_t session_env); -/* This fucntion is used by the call-agent.c modules to fire up a new +/* This function is used by the call-agent.c modules to fire up a new agent. */ gpg_error_t start_new_gpg_agent (assuan_context_t *r_ctx, diff --git a/common/asshelp2.c b/common/asshelp2.c index 2c0c9e8..a87d0d1 100644 --- a/common/asshelp2.c +++ b/common/asshelp2.c @@ -3,12 +3,22 @@ * * This file is part of GnuPG. * - * GnuPG is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * This file is free software; you can redistribute it and/or modify + * it under the terms of either * - * GnuPG is distributed in the hope that it will be useful, + * - the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * or + * + * - the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * or both in parallel, as here. + * + * This file is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. diff --git a/common/b64dec.c b/common/b64dec.c index edd72c6..3e02e4a 100644 --- a/common/b64dec.c +++ b/common/b64dec.c @@ -3,12 +3,22 @@ * * This file is part of GnuPG. * - * GnuPG is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * This file is free software; you can redistribute it and/or modify + * it under the terms of either * - * GnuPG is distributed in the hope that it will be useful, + * - the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * or + * + * - the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * or both in parallel, as here. + * + * This file is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. diff --git a/common/b64enc.c b/common/b64enc.c index eae796c..91ba69d 100644 --- a/common/b64enc.c +++ b/common/b64enc.c @@ -4,12 +4,22 @@ * * This file is part of GnuPG. * - * GnuPG is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * This file is free software; you can redistribute it and/or modify + * it under the terms of either * - * GnuPG is distributed in the hope that it will be useful, + * - the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * or + * + * - the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * or both in parallel, as here. + * + * This file is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. diff --git a/common/convert.c b/common/convert.c index 78a16c9..e86ccec 100644 --- a/common/convert.c +++ b/common/convert.c @@ -3,12 +3,22 @@ * * This file is part of GnuPG. * - * GnuPG is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * This file is free software; you can redistribute it and/or modify + * it under the terms of either * - * GnuPG is distributed in the hope that it will be useful, + * - the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * or + * + * - the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * or both in parallel, as here. + * + * This file is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. diff --git a/common/dns-cert.c b/common/dns-cert.c index 501abad..114e61d 100644 --- a/common/dns-cert.c +++ b/common/dns-cert.c @@ -3,12 +3,22 @@ * * This file is part of GNUPG. * - * GNUPG is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * This file is free software; you can redistribute it and/or modify + * it under the terms of either * - * GNUPG is distributed in the hope that it will be useful, + * - the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * or + * + * - the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * or both in parallel, as here. + * + * This file is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. diff --git a/common/dns-cert.h b/common/dns-cert.h index 351c357..ae38caa 100644 --- a/common/dns-cert.h +++ b/common/dns-cert.h @@ -3,12 +3,22 @@ * * This file is part of GnuPG. * - * GnuPG is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * This file is free software; you can redistribute it and/or modify + * it under the terms of either * - * GnuPG is distributed in the hope that it will be useful, + * - the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * or + * + * - the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * or both in parallel, as here. + * + * This file is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. diff --git a/common/exechelp-posix.c b/common/exechelp-posix.c index 976d0dd..670192b 100644 --- a/common/exechelp-posix.c +++ b/common/exechelp-posix.c @@ -4,12 +4,22 @@ * * This file is part of GnuPG. * - * GnuPG is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * This file is free software; you can redistribute it and/or modify + * it under the terms of either * - * GnuPG is distributed in the hope that it will be useful, + * - the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * or + * + * - the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * or both in parallel, as here. + * + * This file is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. diff --git a/common/exechelp-w32.c b/common/exechelp-w32.c index a25a724..7498586 100644 --- a/common/exechelp-w32.c +++ b/common/exechelp-w32.c @@ -4,12 +4,22 @@ * * This file is part of GnuPG. * - * GnuPG is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * This file is free software; you can redistribute it and/or modify + * it under the terms of either * - * GnuPG is distributed in the hope that it will be useful, + * - the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * or + * + * - the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * or both in parallel, as here. + * + * This file is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. diff --git a/common/exechelp-w32ce.c b/common/exechelp-w32ce.c index 0583c0b..b4ac592 100644 --- a/common/exechelp-w32ce.c +++ b/common/exechelp-w32ce.c @@ -4,12 +4,22 @@ * * This file is part of GnuPG. * - * GnuPG is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * This file is free software; you can redistribute it and/or modify + * it under the terms of either * - * GnuPG is distributed in the hope that it will be useful, + * - the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * or + * + * - the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * or both in parallel, as here. + * + * This file is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. diff --git a/common/exechelp.h b/common/exechelp.h index b975166..4d8e0fd 100644 --- a/common/exechelp.h +++ b/common/exechelp.h @@ -3,12 +3,22 @@ * * This file is part of GnuPG. * - * GnuPG is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * This file is free software; you can redistribute it and/or modify + * it under the terms of either * - * GnuPG is distributed in the hope that it will be useful, + * - the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * or + * + * - the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * or both in parallel, as here. + * + * This file is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. diff --git a/common/get-passphrase.c b/common/get-passphrase.c index 1aaeeac..264ed23 100644 --- a/common/get-passphrase.c +++ b/common/get-passphrase.c @@ -3,12 +3,22 @@ * * This file is part of GnuPG. * - * GnuPG is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * This file is free software; you can redistribute it and/or modify + * it under the terms of either * - * GnuPG is distributed in the hope that it will be useful, + * - the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * or + * + * - the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * or both in parallel, as here. + * + * This file is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. diff --git a/common/get-passphrase.h b/common/get-passphrase.h index 603ac81..a69262f 100644 --- a/common/get-passphrase.h +++ b/common/get-passphrase.h @@ -3,12 +3,22 @@ * * This file is part of GnuPG. * - * GnuPG is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * This file is free software; you can redistribute it and/or modify + * it under the terms of either * - * GnuPG is distributed in the hope that it will be useful, + * - the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * or + * + * - the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * or both in parallel, as here. + * + * This file is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. diff --git a/common/gettime.c b/common/gettime.c index e5462a7..6bdf3c5 100644 --- a/common/gettime.c +++ b/common/gettime.c @@ -3,12 +3,22 @@ * * This file is part of GnuPG. * - * GnuPG is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * This file is free software; you can redistribute it and/or modify + * it under the terms of either * - * GnuPG is distributed in the hope that it will be useful, + * - the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * or + * + * - the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * or both in parallel, as here. + * + * This file is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. diff --git a/common/gpgrlhelp.c b/common/gpgrlhelp.c index b6fca82..cc6e9a1 100644 --- a/common/gpgrlhelp.c +++ b/common/gpgrlhelp.c @@ -3,12 +3,22 @@ * * This file is part of GnuPG. * - * GnuPG is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * This file is free software; you can redistribute it and/or modify + * it under the terms of either * - * GnuPG is distributed in the hope that it will be useful, + * - the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * or + * + * - the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * or both in parallel, as here. + * + * This file is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. diff --git a/common/helpfile.c b/common/helpfile.c index 6666a80..f38d163 100644 --- a/common/helpfile.c +++ b/common/helpfile.c @@ -3,12 +3,22 @@ * * This file is part of GnuPG. * - * GnuPG is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * This file is free software; you can redistribute it and/or modify + * it under the terms of either * - * GnuPG is distributed in the hope that it will be useful, + * - the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * or + * + * - the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * or both in parallel, as here. + * + * This file is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. diff --git a/common/homedir.c b/common/homedir.c index 56cacaf..34aea1c 100644 --- a/common/homedir.c +++ b/common/homedir.c @@ -3,12 +3,22 @@ * * This file is part of GnuPG. * - * GnuPG is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * This file is free software; you can redistribute it and/or modify + * it under the terms of either * - * GnuPG is distributed in the hope that it will be useful, + * - the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * or + * + * - the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * or both in parallel, as here. + * + * This file is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. diff --git a/common/http.c b/common/http.c index be93bb5..3749832 100644 --- a/common/http.c +++ b/common/http.c @@ -4,12 +4,22 @@ * * This file is part of GnuPG. * - * GnuPG is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * This file is free software; you can redistribute it and/or modify + * it under the terms of either * - * GnuPG is distributed in the hope that it will be useful, + * - the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * or + * + * - the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * or both in parallel, as here. + * + * This file is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. diff --git a/common/http.h b/common/http.h index 74c2910..75d64d1 100644 --- a/common/http.h +++ b/common/http.h @@ -4,12 +4,22 @@ * * This file is part of GnuPG. * - * GnuPG is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * This file is free software; you can redistribute it and/or modify + * it under the terms of either * - * GnuPG is distributed in the hope that it will be useful, + * - the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * or + * + * - the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * or both in parallel, as here. + * + * This file is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. diff --git a/common/i18n.c b/common/i18n.c index d818997..202d840 100644 --- a/common/i18n.c +++ b/common/i18n.c @@ -1,14 +1,22 @@ /* i18n.c - gettext initialization * Copyright (C) 2007, 2010 Free Software Foundation, Inc. * - * This file is part of GnuPG. + * This file is free software; you can redistribute it and/or modify + * it under the terms of either * - * GnuPG is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * - the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 3 of the License, or (at + * your option) any later version. * - * GnuPG is distributed in the hope that it will be useful, + * or + * + * - the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * or both in parallel, as here. + * + * This file is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. diff --git a/common/init.c b/common/init.c index 475eaef..e00b9b3 100644 --- a/common/init.c +++ b/common/init.c @@ -3,12 +3,22 @@ * * This file is part of GnuPG. * - * GnuPG is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * This file is free software; you can redistribute it and/or modify + * it under the terms of either * - * GnuPG is distributed in the hope that it will be useful, + * - the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * or + * + * - the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * or both in parallel, as here. + * + * This file is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. diff --git a/common/init.h b/common/init.h index b13c060..633ffac 100644 --- a/common/init.h +++ b/common/init.h @@ -3,12 +3,22 @@ * * This file is part of GnuPG. * - * GnuPG is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * This file is free software; you can redistribute it and/or modify + * it under the terms of either * - * GnuPG is distributed in the hope that it will be useful, + * - the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * or + * + * - the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * or both in parallel, as here. + * + * This file is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. diff --git a/common/iobuf.c b/common/iobuf.c index 5f20d6e..97f3202 100644 --- a/common/iobuf.c +++ b/common/iobuf.c @@ -4,12 +4,22 @@ * * This file is part of GnuPG. * - * GnuPG is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * This file is free software; you can redistribute it and/or modify + * it under the terms of either * - * GnuPG is distributed in the hope that it will be useful, + * - the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * or + * + * - the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * or both in parallel, as here. + * + * This file is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. diff --git a/common/iobuf.h b/common/iobuf.h index 3a189c4..048524e 100644 --- a/common/iobuf.h +++ b/common/iobuf.h @@ -2,14 +2,24 @@ * Copyright (C) 1998, 1999, 2000, 2001, 2003, * 2010 Free Software Foundation, Inc. * - * This file is part of GNUPG. + * This file is part of GnuPG. * - * GNUPG is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * This file is free software; you can redistribute it and/or modify + * it under the terms of either * - * GNUPG is distributed in the hope that it will be useful, + * - the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * or + * + * - the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * or both in parallel, as here. + * + * This file is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. diff --git a/common/localename.c b/common/localename.c index 82fe517..54d22d0 100644 --- a/common/localename.c +++ b/common/localename.c @@ -1,20 +1,30 @@ /* localename.c - Determine the current selected locale. - Copyright (C) 1995-1999, 2000-2003, 2007, - 2008 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License - as published by the Free Software Foundation; either version 2.1, - or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library 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, see . -*/ + * Copyright (C) 1995-1999, 2000-2003, 2007, + * 2008 Free Software Foundation, Inc. + * + * This file is free software; you can redistribute it and/or modify + * it under the terms of either + * + * - the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * or + * + * - the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * or both in parallel, as here. + * + * This file is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program; if not, see . + */ /* Written by Ulrich Drepper , 1995. */ /* Win32 code written by Tor Lillqvist . */ /* Modified for GpgOL use by Werner Koch , 2005. */ @@ -44,7 +54,7 @@ #endif /* Use a dummy value for LC_MESSAGES in case it is not defined. This - works becuase we always test for HAVE_LC_MESSAGES and the core + works because we always test for HAVE_LC_MESSAGES and the core fucntion takes the category as a string as well. */ #ifndef HAVE_LC_MESSAGES #define LC_MESSAGES 0 diff --git a/common/membuf.c b/common/membuf.c index d1ddbb9..c3480df 100644 --- a/common/membuf.c +++ b/common/membuf.c @@ -3,12 +3,22 @@ * * This file is part of GnuPG. * - * GnuPG is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * This file is free software; you can redistribute it and/or modify + * it under the terms of either * - * GnuPG is distributed in the hope that it will be useful, + * - the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * or + * + * - the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * or both in parallel, as here. + * + * This file is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. diff --git a/common/membuf.h b/common/membuf.h index f99b4dc..a76c1be 100644 --- a/common/membuf.h +++ b/common/membuf.h @@ -3,12 +3,22 @@ * * This file is part of GnuPG. * - * GnuPG is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * This file is free software; you can redistribute it and/or modify + * it under the terms of either * - * GnuPG is distributed in the hope that it will be useful, + * - the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * or + * + * - the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * or both in parallel, as here. + * + * This file is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. diff --git a/common/miscellaneous.c b/common/miscellaneous.c index 1bab151..31c4e38 100644 --- a/common/miscellaneous.c +++ b/common/miscellaneous.c @@ -3,12 +3,22 @@ * * This file is part of GnuPG. * - * GnuPG is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * This file is free software; you can redistribute it and/or modify + * it under the terms of either * - * GnuPG is distributed in the hope that it will be useful, + * - the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * or + * + * - the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * or both in parallel, as here. + * + * This file is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. diff --git a/common/openpgp-oid.c b/common/openpgp-oid.c index 2a6feaf..19fadd3 100644 --- a/common/openpgp-oid.c +++ b/common/openpgp-oid.c @@ -3,12 +3,22 @@ * * This file is part of GnuPG. * - * GnuPG is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * This file is free software; you can redistribute it and/or modify + * it under the terms of either * - * GnuPG is distributed in the hope that it will be useful, + * - the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * or + * + * - the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * or both in parallel, as here. + * + * This file is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. diff --git a/common/openpgpdefs.h b/common/openpgpdefs.h index 586f6fd..c2fa617 100644 --- a/common/openpgpdefs.h +++ b/common/openpgpdefs.h @@ -2,14 +2,22 @@ * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, * 2006 Free Software Foundation, Inc. * - * This file is part of GnuPG. + * This file is free software; you can redistribute it and/or modify + * it under the terms of either * - * GnuPG is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * - the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 3 of the License, or (at + * your option) any later version. * - * GnuPG is distributed in the hope that it will be useful, + * or + * + * - the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * or both in parallel, as here. + * + * This file is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. diff --git a/common/percent.c b/common/percent.c index 172d7b7..0cab99a 100644 --- a/common/percent.c +++ b/common/percent.c @@ -3,12 +3,22 @@ * * This file is part of GnuPG. * - * GnuPG is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * This file is free software; you can redistribute it and/or modify + * it under the terms of either * - * GnuPG is distributed in the hope that it will be useful, + * - the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * or + * + * - the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * or both in parallel, as here. + * + * This file is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. diff --git a/common/pka.c b/common/pka.c index 89761f5..2b4b9ce 100644 --- a/common/pka.c +++ b/common/pka.c @@ -3,12 +3,22 @@ * * This file is part of GnuPG. * - * GnuPG is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * This file is free software; you can redistribute it and/or modify + * it under the terms of either * - * GnuPG is distributed in the hope that it will be useful, + * - the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * or + * + * - the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * or both in parallel, as here. + * + * This file is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. diff --git a/common/pka.h b/common/pka.h index 98c29ec..68b4c2e 100644 --- a/common/pka.h +++ b/common/pka.h @@ -3,12 +3,22 @@ * * This file is part of GnuPG. * - * GnuPG is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * This file is free software; you can redistribute it and/or modify + * it under the terms of either * - * GnuPG is distributed in the hope that it will be useful, + * - the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * or + * + * - the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * or both in parallel, as here. + * + * This file is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. diff --git a/common/session-env.c b/common/session-env.c index 7f4ca5e..ff90447 100644 --- a/common/session-env.c +++ b/common/session-env.c @@ -3,12 +3,22 @@ * * This file is part of GnuPG. * - * GnuPG is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * This file is free software; you can redistribute it and/or modify + * it under the terms of either * - * GnuPG is distributed in the hope that it will be useful, + * - the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * or + * + * - the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * or both in parallel, as here. + * + * This file is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. diff --git a/common/session-env.h b/common/session-env.h index 79245ba..1173ed5 100644 --- a/common/session-env.h +++ b/common/session-env.h @@ -3,12 +3,22 @@ * * This file is part of GnuPG. * - * GnuPG is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * This file is free software; you can redistribute it and/or modify + * it under the terms of either * - * GnuPG is distributed in the hope that it will be useful, + * - the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * or + * + * - the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * or both in parallel, as here. + * + * This file is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. diff --git a/common/sexp-parse.h b/common/sexp-parse.h index 008c2d2..f68c552 100644 --- a/common/sexp-parse.h +++ b/common/sexp-parse.h @@ -1,14 +1,22 @@ -/* sexp-parse.h - S-Exp helper functions +/* sexp-parse.h - S-expression helper functions * Copyright (C) 2002, 2003, 2007 Free Software Foundation, Inc. * - * This file is part of GnuPG. + * This file is free software; you can redistribute it and/or modify + * it under the terms of either * - * GnuPG is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * - the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 3 of the License, or (at + * your option) any later version. * - * GnuPG is distributed in the hope that it will be useful, + * or + * + * - the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * or both in parallel, as here. + * + * This file is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. @@ -22,6 +30,7 @@ #include + /* Return the length of the next S-Exp part and update the pointer to the first data byte. 0 is returned on error */ static inline size_t diff --git a/common/sexputil.c b/common/sexputil.c index 87f984f..1c70337 100644 --- a/common/sexputil.c +++ b/common/sexputil.c @@ -3,12 +3,22 @@ * * This file is part of GnuPG. * - * GnuPG is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * This file is free software; you can redistribute it and/or modify + * it under the terms of either * - * GnuPG is distributed in the hope that it will be useful, + * - the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * or + * + * - the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * or both in parallel, as here. + * + * This file is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. diff --git a/common/signal.c b/common/signal.c index 28b2acc..b202f0f 100644 --- a/common/signal.c +++ b/common/signal.c @@ -4,12 +4,22 @@ * * This file is part of GnuPG. * - * GnuPG is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * This file is free software; you can redistribute it and/or modify + * it under the terms of either * - * GnuPG is distributed in the hope that it will be useful, + * - the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * or + * + * - the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * or both in parallel, as here. + * + * This file is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. diff --git a/common/srv.c b/common/srv.c index 1b8248b..c493f97 100644 --- a/common/srv.c +++ b/common/srv.c @@ -1,14 +1,24 @@ /* srv.c - DNS SRV code * Copyright (C) 2003, 2009 Free Software Foundation, Inc. * - * This file is part of GNUPG. + * This file is part of GnuPG. * - * GNUPG is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * This file is free software; you can redistribute it and/or modify + * it under the terms of either * - * GNUPG is distributed in the hope that it will be useful, + * - the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * or + * + * - the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * or both in parallel, as here. + * + * This file is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. diff --git a/common/srv.h b/common/srv.h index fa35863..b7d487c 100644 --- a/common/srv.h +++ b/common/srv.h @@ -3,12 +3,22 @@ * * This file is part of GNUPG. * - * GNUPG is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * This file is free software; you can redistribute it and/or modify + * it under the terms of either * - * GNUPG is distributed in the hope that it will be useful, + * - the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * or + * + * - the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * or both in parallel, as here. + * + * This file is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. diff --git a/common/ssh-utils.c b/common/ssh-utils.c index 663d615..dc0ca26 100644 --- a/common/ssh-utils.c +++ b/common/ssh-utils.c @@ -3,12 +3,22 @@ * * This file is part of GnuPG. * - * GnuPG is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * This file is free software; you can redistribute it and/or modify + * it under the terms of either * - * GnuPG is distributed in the hope that it will be useful, + * - the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * or + * + * - the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * or both in parallel, as here. + * + * This file is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. diff --git a/common/ssh-utils.h b/common/ssh-utils.h index 10e2ac2..dcf0787 100644 --- a/common/ssh-utils.h +++ b/common/ssh-utils.h @@ -3,12 +3,22 @@ * * This file is part of GnuPG. * - * GnuPG is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * This file is free software; you can redistribute it and/or modify + * it under the terms of either * - * GnuPG is distributed in the hope that it will be useful, + * - the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * or + * + * - the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * or both in parallel, as here. + * + * This file is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. diff --git a/common/sysutils.c b/common/sysutils.c index 2c16978..f57dcc1 100644 --- a/common/sysutils.c +++ b/common/sysutils.c @@ -4,12 +4,22 @@ * * This file is part of GnuPG. * - * GnuPG is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * This file is free software; you can redistribute it and/or modify + * it under the terms of either * - * GnuPG is distributed in the hope that it will be useful, + * - the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * or + * + * - the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * or both in parallel, as here. + * + * This file is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. diff --git a/common/sysutils.h b/common/sysutils.h index 3559b34..5faa7b3 100644 --- a/common/sysutils.h +++ b/common/sysutils.h @@ -3,12 +3,22 @@ * * This file is part of GnuPG. * - * GnuPG is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * This file is free software; you can redistribute it and/or modify + * it under the terms of either * - * GnuPG is distributed in the hope that it will be useful, + * - the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * or + * + * - the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * or both in parallel, as here. + * + * This file is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. diff --git a/common/tlv.c b/common/tlv.c index 39eae89..51a0907 100644 --- a/common/tlv.c +++ b/common/tlv.c @@ -3,12 +3,22 @@ * * This file is part of GnuPG. * - * GnuPG is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * This file is free software; you can redistribute it and/or modify + * it under the terms of either * - * GnuPG is distributed in the hope that it will be useful, + * - the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * or + * + * - the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * or both in parallel, as here. + * + * This file is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. diff --git a/common/tlv.h b/common/tlv.h index f346394..05ddaa4 100644 --- a/common/tlv.h +++ b/common/tlv.h @@ -3,12 +3,22 @@ * * This file is part of GnuPG. * - * GnuPG is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * This file is free software; you can redistribute it and/or modify + * it under the terms of either * - * GnuPG is distributed in the hope that it will be useful, + * - the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * or + * + * - the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * or both in parallel, as here. + * + * This file is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. diff --git a/common/ttyio.c b/common/ttyio.c index fb0fd5e..9ca96d9 100644 --- a/common/ttyio.c +++ b/common/ttyio.c @@ -4,12 +4,22 @@ * * This file is part of GnuPG. * - * GnuPG is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * This file is free software; you can redistribute it and/or modify + * it under the terms of either * - * GnuPG is distributed in the hope that it will be useful, + * - the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * or + * + * - the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * or both in parallel, as here. + * + * This file is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. diff --git a/common/ttyio.h b/common/ttyio.h index e1dc0f0..5c810b8 100644 --- a/common/ttyio.h +++ b/common/ttyio.h @@ -4,12 +4,22 @@ * * This file is part of GNUPG. * - * GNUPG is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * This file is free software; you can redistribute it and/or modify + * it under the terms of either * - * GNUPG is distributed in the hope that it will be useful, + * - the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * or + * + * - the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * or both in parallel, as here. + * + * This file is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. diff --git a/common/userids.c b/common/userids.c index 88593bf..61e88cc 100644 --- a/common/userids.c +++ b/common/userids.c @@ -4,12 +4,22 @@ * * This file is part of GnuPG. * - * GnuPG is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * This file is free software; you can redistribute it and/or modify + * it under the terms of either * - * GnuPG is distributed in the hope that it will be useful, + * - the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * or + * + * - the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * or both in parallel, as here. + * + * This file is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. @@ -18,10 +28,6 @@ * along with this program; if not, see . */ -/* This file implements a few utility functions useful when working - with canonical encrypted S-expresions (i.e. not the S-exprssion - objects from libgcrypt). */ - #include #include #include diff --git a/common/userids.h b/common/userids.h index 9b3a2c3..dcb6f4a 100644 --- a/common/userids.h +++ b/common/userids.h @@ -3,12 +3,22 @@ * * This file is part of GnuPG. * - * GnuPG is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * This file is free software; you can redistribute it and/or modify + * it under the terms of either * - * GnuPG is distributed in the hope that it will be useful, + * - the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * or + * + * - the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * or both in parallel, as here. + * + * This file is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. diff --git a/common/xasprintf.c b/common/xasprintf.c index a403c7b..b1fb9c6 100644 --- a/common/xasprintf.c +++ b/common/xasprintf.c @@ -3,12 +3,22 @@ * * This file is part of GnuPG. * - * GnuPG is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * This file is free software; you can redistribute it and/or modify + * it under the terms of either * - * GnuPG is distributed in the hope that it will be useful, + * - the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * or + * + * - the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * or both in parallel, as here. + * + * This file is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. diff --git a/common/xreadline.c b/common/xreadline.c index 5a9a527..f3c43df 100644 --- a/common/xreadline.c +++ b/common/xreadline.c @@ -3,12 +3,22 @@ * * This file is part of GnuPG. * - * GnuPG is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * This file is free software; you can redistribute it and/or modify + * it under the terms of either * - * GnuPG is distributed in the hope that it will be useful, + * - the GNU Lesser General Public License as published by the Free + * Software Foundation; either version 3 of the License, or (at + * your option) any later version. + * + * or + * + * - the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at + * your option) any later version. + * + * or both in parallel, as here. + * + * This file is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. ----------------------------------------------------------------------- Summary of changes: AUTHORS | 11 +++++++---- common/asshelp.c | 20 +++++++++++++++----- common/asshelp.h | 22 ++++++++++++++++------ common/asshelp2.c | 20 +++++++++++++++----- common/b64dec.c | 20 +++++++++++++++----- common/b64enc.c | 20 +++++++++++++++----- common/convert.c | 20 +++++++++++++++----- common/dns-cert.c | 20 +++++++++++++++----- common/dns-cert.h | 20 +++++++++++++++----- common/exechelp-posix.c | 20 +++++++++++++++----- common/exechelp-w32.c | 20 +++++++++++++++----- common/exechelp-w32ce.c | 20 +++++++++++++++----- common/exechelp.h | 20 +++++++++++++++----- common/get-passphrase.c | 20 +++++++++++++++----- common/get-passphrase.h | 20 +++++++++++++++----- common/gettime.c | 20 +++++++++++++++----- common/gpgrlhelp.c | 20 +++++++++++++++----- common/helpfile.c | 20 +++++++++++++++----- common/homedir.c | 20 +++++++++++++++----- common/http.c | 20 +++++++++++++++----- common/http.h | 20 +++++++++++++++----- common/i18n.c | 20 ++++++++++++++------ common/init.c | 20 +++++++++++++++----- common/init.h | 20 +++++++++++++++----- common/iobuf.c | 20 +++++++++++++++----- common/iobuf.h | 22 ++++++++++++++++------ common/localename.c | 44 +++++++++++++++++++++++++++----------------- common/membuf.c | 20 +++++++++++++++----- common/membuf.h | 20 +++++++++++++++----- common/miscellaneous.c | 20 +++++++++++++++----- common/openpgp-oid.c | 20 +++++++++++++++----- common/openpgpdefs.h | 20 ++++++++++++++------ common/percent.c | 20 +++++++++++++++----- common/pka.c | 20 +++++++++++++++----- common/pka.h | 20 +++++++++++++++----- common/session-env.c | 20 +++++++++++++++----- common/session-env.h | 20 +++++++++++++++----- common/sexp-parse.h | 23 ++++++++++++++++------- common/sexputil.c | 20 +++++++++++++++----- common/signal.c | 20 +++++++++++++++----- common/srv.c | 22 ++++++++++++++++------ common/srv.h | 20 +++++++++++++++----- common/ssh-utils.c | 20 +++++++++++++++----- common/ssh-utils.h | 20 +++++++++++++++----- common/sysutils.c | 20 +++++++++++++++----- common/sysutils.h | 20 +++++++++++++++----- common/tlv.c | 20 +++++++++++++++----- common/tlv.h | 20 +++++++++++++++----- common/ttyio.c | 20 +++++++++++++++----- common/ttyio.h | 20 +++++++++++++++----- common/userids.c | 24 +++++++++++++++--------- common/userids.h | 20 +++++++++++++++----- common/xasprintf.c | 20 +++++++++++++++----- common/xreadline.c | 20 +++++++++++++++----- 54 files changed, 816 insertions(+), 292 deletions(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Fri Apr 20 17:11:03 2012 From: cvs at cvs.gnupg.org (by W. Trevor King) Date: Fri, 20 Apr 2012 17:11:03 +0200 Subject: [git] GPGME - branch, master, updated. gpgme-1.3.1-21-g4cb408d Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GnuPG Made Easy". The branch, master has been updated via 4cb408d33efe80e7d102049dea244d22907d8395 (commit) from 62bbe58280737d73badbe518f140e40480205176 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 4cb408d33efe80e7d102049dea244d22907d8395 Author: W. Trevor King Date: Thu Apr 12 13:51:48 2012 -0400 .gitignore: flesh out rules and add subdirectory-.gitignores. diff --git a/.gitignore b/.gitignore index 983abda..4c37222 100644 --- a/.gitignore +++ b/.gitignore @@ -2,9 +2,12 @@ /autom4te.cache /config.h.in /configure +/config.h +/config.log +/config.status +/libtool Makefile.in -/doc/gpgme.info -/doc/gpgme.info-1 -/doc/gpgme.info-2 -/doc/stamp-vti -/doc/version.texi +Makefile +stamp-h1 +*.o +*.lo diff --git a/doc/.gitignore b/doc/.gitignore new file mode 100644 index 0000000..a44d7b4 --- /dev/null +++ b/doc/.gitignore @@ -0,0 +1,5 @@ +gpgme.info +gpgme.info-1 +gpgme.info-2 +stamp-vti +version.texi diff --git a/lang/cl/.gitignore b/lang/cl/.gitignore new file mode 100644 index 0000000..abccf9c --- /dev/null +++ b/lang/cl/.gitignore @@ -0,0 +1 @@ +gpgme.asd diff --git a/src/.gitignore b/src/.gitignore new file mode 100644 index 0000000..bdf4862 --- /dev/null +++ b/src/.gitignore @@ -0,0 +1,7 @@ +.deps +.libs +gpgme-config +gpgme-tool +gpgme.h +versioninfo.rc +*.la diff --git a/tests/.gitignore b/tests/.gitignore new file mode 100644 index 0000000..e6e6a4a --- /dev/null +++ b/tests/.gitignore @@ -0,0 +1,10 @@ +.deps +.libs +run-export +run-import +run-keylist +run-sign +run-verify +t-data +t-engine-info +t-version diff --git a/tests/gpg/.gitignore b/tests/gpg/.gitignore new file mode 100644 index 0000000..e60bfe5 --- /dev/null +++ b/tests/gpg/.gitignore @@ -0,0 +1,30 @@ +.deps +.libs +gpg-agent.conf +gpg.conf +pubring.gpg +pubring.gpg~ +secring.gpg +t-decrypt +t-decrypt-verify +t-edit +t-encrypt +t-encrypt-large +t-encrypt-sign +t-encrypt-sym +t-eventloop +t-export +t-file-name +t-genkey +t-gpgconf +t-import +t-keylist +t-keylist-sig +t-sig-notation +t-sign +t-signers +t-thread1 +t-trustlist +t-verify +t-wait +trustdb.gpg diff --git a/tests/gpgsm/.gitignore b/tests/gpgsm/.gitignore new file mode 100644 index 0000000..4f1f113 --- /dev/null +++ b/tests/gpgsm/.gitignore @@ -0,0 +1,17 @@ +.deps +.libs +cms-decrypt +cms-keylist +gpgsm.conf +private-keys-v1.d +pubring.kbx +pubring.kbx~ +t-decrypt +t-encrypt +t-export +t-genkey +t-import +t-keylist +t-sign +t-verify +trustlist.txt diff --git a/tests/opassuan/.gitignore b/tests/opassuan/.gitignore new file mode 100644 index 0000000..741a197 --- /dev/null +++ b/tests/opassuan/.gitignore @@ -0,0 +1,3 @@ +.deps +.libs +t-command ----------------------------------------------------------------------- Summary of changes: .gitignore | 13 ++++++++----- doc/.gitignore | 5 +++++ lang/cl/.gitignore | 1 + src/.gitignore | 7 +++++++ tests/.gitignore | 10 ++++++++++ tests/gpg/.gitignore | 30 ++++++++++++++++++++++++++++++ tests/gpgsm/.gitignore | 17 +++++++++++++++++ tests/opassuan/.gitignore | 3 +++ 8 files changed, 81 insertions(+), 5 deletions(-) create mode 100644 doc/.gitignore create mode 100644 lang/cl/.gitignore create mode 100644 src/.gitignore create mode 100644 tests/.gitignore create mode 100644 tests/gpg/.gitignore create mode 100644 tests/gpgsm/.gitignore create mode 100644 tests/opassuan/.gitignore hooks/post-receive -- GnuPG Made Easy http://git.gnupg.org From cvs at cvs.gnupg.org Wed Apr 25 17:41:26 2012 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Wed, 25 Apr 2012 17:41:26 +0200 Subject: [git] GCRYPT - branch, master, updated. libgcrypt-1.5.0-30-gdcef6b7 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU crypto library". The branch, master has been updated via dcef6b7836428f1fc10af02e431cf6ab112dc13d (commit) from 3bb858551cd5d84e43b800edfa2b07d1529718a9 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit dcef6b7836428f1fc10af02e431cf6ab112dc13d Author: Werner Koch Date: Wed Apr 25 16:35:10 2012 +0200 Add authors with a DCO to AUTHORS. -- diff --git a/AUTHORS b/AUTHORS index 94c1213..c0231d6 100644 --- a/AUTHORS +++ b/AUTHORS @@ -37,7 +37,7 @@ Disclaims changes. nh at df.lth.se Weak key patches. -GNUPG R?mi Guyomarch 1999-05-25 +GNUPG R??mi Guyomarch 1999-05-25 Assigns past and future changes. (g10/compress.c, g10/encr-data.c, g10/free-packet.c, g10/mdfilter.c, g10/plaintext.c, util/iobuf.c) rguyom at mail.dotcom.fr @@ -96,12 +96,19 @@ Assigns Past and Future Changes openpgp at brainhub.org (cipher/ecc.c and related files) -LIBGCRYPT Ulrich M?ller 2012-02-15 +LIBGCRYPT Ulrich M??ller 2012-02-15 Assigns Past and Future Changes ulm at gentoo.org (Changes to cipher/idea.c and related files) +Authors with a DCO +================== + +DCO:2012-04-16:Tom???? Mr??z +DCO:2012-04-20:Rafa??l Carr?? + + More credits ============ The ATH implementation (src/ath*) has been taken from GPGME and ----------------------------------------------------------------------- Summary of changes: AUTHORS | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-) hooks/post-receive -- The GNU crypto library http://git.gnupg.org From cvs at cvs.gnupg.org Wed Apr 25 18:16:00 2012 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Wed, 25 Apr 2012 18:16:00 +0200 Subject: [git] GCRYPT - branch, LIBGCRYPT-1-5-BRANCH, updated. libgcrypt-1.5.0-9-g7a37ea4 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU crypto library". The branch, LIBGCRYPT-1-5-BRANCH has been updated via 7a37ea4a49916439474b5a0e445333fa72889f55 (commit) from 5a4a9a1c7b817e49163537286e50572afe408685 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 7a37ea4a49916439474b5a0e445333fa72889f55 Author: Werner Koch Date: Fri Dec 16 22:02:18 2011 +0100 Add alignment tests for the cipher tests. * tests/basic.c (check_one_cipher): Factor most code out to check_one_cipher_core. Call that core function several times using different alignment settings. (check_one_cipher_core): New. Add extra args to allow alignment testing. -- As reported in bug#1384 Serpent fails on a sparc64. One problem with the test code is that due to the bus error the error message won't be printed. diff --git a/tests/basic.c b/tests/basic.c index cdc3462..b29668b 100644 --- a/tests/basic.c +++ b/tests/basic.c @@ -25,6 +25,7 @@ #include #include #include +#include #include "../src/gcrypt.h" @@ -1355,57 +1356,84 @@ check_bulk_cipher_modes (void) } - -static void -check_one_cipher (int algo, int mode, int flags) +/* The core of the cipher check. In addition to the parameters passed + to check_one_cipher it also receives the KEY and the plain data. + PASS is printed with error messages. The function returns 0 on + success. */ +static int +check_one_cipher_core (int algo, int mode, int flags, + const char *key, size_t nkey, + const unsigned char *plain, size_t nplain, + int bufshift, int pass) { gcry_cipher_hd_t hd; - char key[32]; - unsigned char plain[16], in[16], out[16]; + unsigned char in_buffer[17], out_buffer[17]; + unsigned char *in, *out; int keylen; gcry_error_t err = 0; - memcpy (key, "0123456789abcdef.,;/[]{}-=ABCDEF", 32); - memcpy (plain, "foobar42FOOBAR17", 16); + assert (nkey == 32); + assert (nplain == 16); + + if (!bufshift) + { + in = in_buffer; + out = out_buffer; + } + else if (bufshift == 1) + { + in = in_buffer+1; + out = out_buffer; + } + else if (bufshift == 2) + { + in = in_buffer+1; + out = out_buffer+1; + } + else + { + in = in_buffer; + out = out_buffer+1; + } keylen = gcry_cipher_get_algo_keylen (algo); if (!keylen) { - fail ("algo %d, mode %d, gcry_cipher_get_algo_keylen failed\n", - algo, mode); - return; + fail ("pass %d, algo %d, mode %d, gcry_cipher_get_algo_keylen failed\n", + pass, algo, mode); + return -1; } if (keylen < 40 / 8 || keylen > 32) { - fail ("algo %d, mode %d, keylength problem (%d)\n", algo, mode, keylen); - return; + fail ("pass %d, algo %d, mode %d, keylength problem (%d)\n", pass, algo, mode, keylen); + return -1; } err = gcry_cipher_open (&hd, algo, mode, flags); if (err) { - fail ("algo %d, mode %d, gcry_cipher_open failed: %s\n", - algo, mode, gpg_strerror (err)); - return; + fail ("pass %d, algo %d, mode %d, gcry_cipher_open failed: %s\n", + pass, algo, mode, gpg_strerror (err)); + return -1; } err = gcry_cipher_setkey (hd, key, keylen); if (err) { - fail ("algo %d, mode %d, gcry_cipher_setkey failed: %s\n", - algo, mode, gpg_strerror (err)); + fail ("pass %d, algo %d, mode %d, gcry_cipher_setkey failed: %s\n", + pass, algo, mode, gpg_strerror (err)); gcry_cipher_close (hd); - return; + return -1; } err = gcry_cipher_encrypt (hd, out, 16, plain, 16); if (err) { - fail ("algo %d, mode %d, gcry_cipher_encrypt failed: %s\n", - algo, mode, gpg_strerror (err)); + fail ("pass %d, algo %d, mode %d, gcry_cipher_encrypt failed: %s\n", + pass, algo, mode, gpg_strerror (err)); gcry_cipher_close (hd); - return; + return -1; } gcry_cipher_reset (hd); @@ -1413,14 +1441,15 @@ check_one_cipher (int algo, int mode, int flags) err = gcry_cipher_decrypt (hd, in, 16, out, 16); if (err) { - fail ("algo %d, mode %d, gcry_cipher_decrypt failed: %s\n", - algo, mode, gpg_strerror (err)); + fail ("pass %d, algo %d, mode %d, gcry_cipher_decrypt failed: %s\n", + pass, algo, mode, gpg_strerror (err)); gcry_cipher_close (hd); - return; + return -1; } if (memcmp (plain, in, 16)) - fail ("algo %d, mode %d, encrypt-decrypt mismatch\n", algo, mode); + fail ("pass %d, algo %d, mode %d, encrypt-decrypt mismatch\n", + pass, algo, mode); /* Again, using in-place encryption. */ gcry_cipher_reset (hd); @@ -1429,10 +1458,11 @@ check_one_cipher (int algo, int mode, int flags) err = gcry_cipher_encrypt (hd, out, 16, NULL, 0); if (err) { - fail ("algo %d, mode %d, in-place, gcry_cipher_encrypt failed: %s\n", - algo, mode, gpg_strerror (err)); + fail ("pass %d, algo %d, mode %d, in-place, gcry_cipher_encrypt failed:" + " %s\n", + pass, algo, mode, gpg_strerror (err)); gcry_cipher_close (hd); - return; + return -1; } gcry_cipher_reset (hd); @@ -1440,21 +1470,65 @@ check_one_cipher (int algo, int mode, int flags) err = gcry_cipher_decrypt (hd, out, 16, NULL, 0); if (err) { - fail ("algo %d, mode %d, in-place, gcry_cipher_decrypt failed: %s\n", - algo, mode, gpg_strerror (err)); + fail ("pass %d, algo %d, mode %d, in-place, gcry_cipher_decrypt failed:" + " %s\n", + pass, algo, mode, gpg_strerror (err)); gcry_cipher_close (hd); - return; + return -1; } if (memcmp (plain, out, 16)) - fail ("algo %d, mode %d, in-place, encrypt-decrypt mismatch\n",algo, mode); + fail ("pass %d, algo %d, mode %d, in-place, encrypt-decrypt mismatch\n", + pass, algo, mode); gcry_cipher_close (hd); + return 0; +} + + + +static void +check_one_cipher (int algo, int mode, int flags) +{ + char key[33]; + unsigned char plain[17]; + int bufshift; + + for (bufshift=0; bufshift < 4; bufshift++) + { + /* Pass 0: Standard test. */ + memcpy (key, "0123456789abcdef.,;/[]{}-=ABCDEF", 32); + memcpy (plain, "foobar42FOOBAR17", 16); + if (check_one_cipher_core (algo, mode, flags, key, 32, plain, 16, + bufshift, 0+10*bufshift)) + return; + + /* Pass 1: Key not aligned. */ + memmove (key+1, key, 32); + if (check_one_cipher_core (algo, mode, flags, key+1, 32, plain, 16, + bufshift, 1+10*bufshift)) + return; + + /* Pass 2: Key not aligned and data not aligned. */ + memmove (plain+1, plain, 16); + if (check_one_cipher_core (algo, mode, flags, key+1, 32, plain+1, 16, + bufshift, 2+10*bufshift)) + return; + + /* Pass 3: Key aligned and data not aligned. */ + memmove (key, key+1, 32); + if (check_one_cipher_core (algo, mode, flags, key, 32, plain+1, 16, + bufshift, 3+10*bufshift)) + return; + } + + return; } + static void check_ciphers (void) { ----------------------------------------------------------------------- Summary of changes: tests/basic.c | 138 +++++++++++++++++++++++++++++++++++++++++++------------- 1 files changed, 106 insertions(+), 32 deletions(-) hooks/post-receive -- The GNU crypto library http://git.gnupg.org From cvs at cvs.gnupg.org Thu Apr 26 11:30:40 2012 From: cvs at cvs.gnupg.org (by NIIBE Yutaka) Date: Thu, 26 Apr 2012 11:30:40 +0200 Subject: [git] GnuPG - branch, master, updated. gnupg-2.1.0beta3-71-g8d75228 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Guard". The branch, master has been updated via 8d7522837c6dba3065d24594bcdbe7b99a702cde (commit) via 20c9ac4df34e25f7085bb4e4ab5ea7223932f5c4 (commit) via 6e3882785a629b361c57c8b9d5cad51fb234ac23 (commit) from 37df3d5f593f76ddbf1b9dc6de0173b7bb85c0ad (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 8d7522837c6dba3065d24594bcdbe7b99a702cde Author: NIIBE Yutaka Date: Thu Apr 26 10:23:39 2012 +0200 make DNS and URI fields work in gpgsm --gen-key. * sm/certreqgen-ui.c (gpgsm_gencertreq_tty): Actually set mb_uri and mb_dns.avoid buffer strncpy-induced buffer overrun diff --git a/sm/certreqgen-ui.c b/sm/certreqgen-ui.c index 236d53b..41492f5 100644 --- a/sm/certreqgen-ui.c +++ b/sm/certreqgen-ui.c @@ -339,12 +339,12 @@ gpgsm_gencertreq_tty (ctrl_t ctrl, estream_t output_stream) /* DNS names. */ tty_printf (_("Enter DNS names")); tty_printf (_(" (optional; end with an empty line):\n")); - ask_mb_lines (&mb_email, "Name-DNS: "); + ask_mb_lines (&mb_dns, "Name-DNS: "); /* URIs. */ tty_printf (_("Enter URIs")); tty_printf (_(" (optional; end with an empty line):\n")); - ask_mb_lines (&mb_email, "Name-URI: "); + ask_mb_lines (&mb_uri, "Name-URI: "); /* Want a self-signed certificate? */ commit 20c9ac4df34e25f7085bb4e4ab5ea7223932f5c4 Author: Jim Meyering Date: Wed Apr 25 17:42:53 2012 +0200 avoid buffer strncpy-induced buffer overrun * dirmngr/crlcache.c (open_dir): Ensure that both this_update and next_update member strings are NUL-terminated. diff --git a/dirmngr/crlcache.c b/dirmngr/crlcache.c index edf3837..768d446 100644 --- a/dirmngr/crlcache.c +++ b/dirmngr/crlcache.c @@ -587,8 +587,14 @@ open_dir (crl_cache_t *r_cache) case 2: entry->issuer_hash = p; break; case 3: entry->issuer = unpercent_string (p); break; case 4: entry->url = unpercent_string (p); break; - case 5: strncpy (entry->this_update, p, 15); break; - case 6: strncpy (entry->next_update, p, 15); break; + case 5: + strncpy (entry->this_update, p, 15); + entry->this_update[15] = 0; + break; + case 6: + strncpy (entry->next_update, p, 15); + entry->next_update[15] = 0; + break; case 7: entry->dbfile_hash = p; break; case 8: if (*p) entry->crl_number = p; break; case 9: commit 6e3882785a629b361c57c8b9d5cad51fb234ac23 Author: Jim Meyering Date: Wed Apr 25 17:40:48 2012 +0200 remove doubled words in a comment diff --git a/common/gettime.h b/common/gettime.h index 4199369..bc914ad 100644 --- a/common/gettime.h +++ b/common/gettime.h @@ -1,5 +1,5 @@ /* gettime.h - Wrapper for time functions - * Copyright (C) 2010 Free Software Foundation, Inc. + * Copyright (C) 2010, 2012 Free Software Foundation, Inc. * * This file is part of GnuPG. * @@ -24,8 +24,8 @@ #include /* We need gpg_error_t. */ -/* A type to hold the ISO time. Note that this this is the same as - the the KSBA type ksba_isotime_t. */ +/* A type to hold the ISO time. Note that this is the same as + the KSBA type ksba_isotime_t. */ typedef char gnupg_isotime_t[16]; time_t gnupg_get_time (void); ----------------------------------------------------------------------- Summary of changes: common/gettime.h | 6 +++--- dirmngr/crlcache.c | 10 ++++++++-- sm/certreqgen-ui.c | 4 ++-- 3 files changed, 13 insertions(+), 7 deletions(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Sun Apr 29 13:01:14 2012 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Sun, 29 Apr 2012 13:01:14 +0200 Subject: [git] GnuPG - branch, STABLE-BRANCH-1-4, updated. gnupg-1.4.12-2-g7a852fb Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Guard". The branch, STABLE-BRANCH-1-4 has been updated via 7a852fba6c3fce4ec6db8ab5287e646249251070 (commit) from 509fe4ce5d50089776b072c33c199798d3defe8c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 7a852fba6c3fce4ec6db8ab5287e646249251070 Author: Werner Koch Date: Sun Apr 29 11:54:28 2012 +0200 With --quiet do not print reading passphrase from fd message. Fix for bug#1403. * g10/passphrase.c (read_passphrase_from_fd): Act on --quiet. diff --git a/g10/passphrase.c b/g10/passphrase.c index 3bd159e..9003ea4 100644 --- a/g10/passphrase.c +++ b/g10/passphrase.c @@ -127,8 +127,8 @@ read_passphrase_from_fd( int fd ) { int i, len; char *pw; - - if ( opt.use_agent ) + + if ( opt.use_agent ) { /* Not used but we have to do a dummy read, so that it won't end up at the begin of the message if the quite usual trick to prepend the passphtrase to the message is used. */ @@ -137,14 +137,14 @@ read_passphrase_from_fd( int fd ) while (!(read (fd, buf, 1) != 1 || *buf == '\n' )) ; *buf = 0; - return; + return; } - if (!opt.batch ) + if (!opt.batch && !opt.quiet) tty_printf("Reading passphrase from file descriptor %d ...", fd ); - for (pw = NULL, i = len = 100; ; i++ ) + for (pw = NULL, i = len = 100; ; i++ ) { - if (i >= len-1 ) + if (i >= len-1 ) { char *pw2 = pw; len += 100; @@ -176,8 +176,8 @@ static int agent_send_option (assuan_context_t ctx, const char *name, const char *value) { char *line; - int rc; - + int rc; + if (!value || !*value) return 0; /* Avoid sending empty option values. */ @@ -189,7 +189,7 @@ agent_send_option (assuan_context_t ctx, const char *name, const char *value) } /* Send all required options to the gpg-agent. */ -static int +static int agent_send_all_options (assuan_context_t ctx) { char *dft_display = NULL; @@ -299,7 +299,7 @@ agent_open (int try, const char *orig_codeset) else { infostr = getenv ( "GPG_AGENT_INFO" ); - if (!infostr || !*infostr) + if (!infostr || !*infostr) { if (!try) { @@ -314,7 +314,7 @@ agent_open (int try, const char *orig_codeset) } infostr = xstrdup ( infostr ); } - + if ( !(p = strchr (infostr, PATHSEP_C)) || p == infostr) { if (!try) @@ -349,7 +349,7 @@ agent_open (int try, const char *orig_codeset) xfree (infostr); return NULL; } - + rc = assuan_socket_connect (&ctx, infostr, pid); if (rc) { @@ -359,7 +359,7 @@ agent_open (int try, const char *orig_codeset) if (orig_codeset) bind_textdomain_codeset (PACKAGE, orig_codeset); #endif /*ENABLE_NLS*/ - log_info ( _("can't connect to `%s': %s\n"), + log_info ( _("can't connect to `%s': %s\n"), infostr, assuan_strerror (rc)); opt.use_agent = 0; } @@ -436,7 +436,7 @@ struct agent_okay_cb_s { status line without leading white spaces. */ static assuan_error_t agent_okay_cb (void *opaque, const char *line) -{ +{ struct agent_okay_cb_s *parm = opaque; int i; @@ -446,10 +446,10 @@ agent_okay_cb (void *opaque, const char *line) memory function code to allow wiping arbitrary stuff on memory failure. */ parm->pw = xmalloc_secure (strlen (line)/2+2); - + for (i=0; hexdigitp (line) && hexdigitp (line+1); line += 2) parm->pw[i++] = xtoi_2 (line); - parm->pw[i] = 0; + parm->pw[i] = 0; return 0; } #endif /*ENABLE_AGENT_SUPPORT*/ @@ -494,10 +494,10 @@ agent_get_passphrase ( u32 *keyid, int mode, const char *cacheid, if( keyid && get_pubkey( pk, keyid ) ) { if (pk) - free_public_key( pk ); + free_public_key( pk ); pk = NULL; /* oops: no key for some reason */ } - + #ifdef ENABLE_NLS /* The Assuan agent protocol requires us to transmit utf-8 strings */ orig_codeset = bind_textdomain_codeset (PACKAGE, NULL); @@ -509,36 +509,36 @@ agent_get_passphrase ( u32 *keyid, int mode, const char *cacheid, { /* We only switch when we are able to restore the codeset later. */ orig_codeset = xstrdup (orig_codeset); if (!bind_textdomain_codeset (PACKAGE, "utf-8")) - orig_codeset = NULL; + orig_codeset = NULL; } #endif - if ( !(ctx = agent_open (0, orig_codeset)) ) + if ( !(ctx = agent_open (0, orig_codeset)) ) goto failure; if (custom_description) atext = native_to_utf8 (custom_description); else if ( !mode && pk && keyid ) - { + { char *uid; size_t uidlen; const char *algo_name = pubkey_algo_to_string ( pk->pubkey_algo ); const char *timestr; char *maink; - + if ( !algo_name ) algo_name = "?"; #define KEYIDSTRING _(" (main key ID %s)") maink = xmalloc ( strlen (KEYIDSTRING) + keystrlen() + 20 ); - if( keyid[2] && keyid[3] && keyid[0] != keyid[2] + if( keyid[2] && keyid[3] && keyid[0] != keyid[2] && keyid[1] != keyid[3] ) sprintf( maink, KEYIDSTRING, keystr(&keyid[2]) ); else *maink = 0; - - uid = get_user_id ( keyid, &uidlen ); + + uid = get_user_id ( keyid, &uidlen ); timestr = strtimestamp (pk->timestamp); #undef KEYIDSTRING @@ -548,7 +548,7 @@ agent_get_passphrase ( u32 *keyid, int mode, const char *cacheid, "\"%.*s\"\n" \ "%u-bit %s key, ID %s, created %s%s\n" ) - atext = xmalloc ( 100 + strlen (PROMPTSTRING) + atext = xmalloc ( 100 + strlen (PROMPTSTRING) + uidlen + 15 + strlen(algo_name) + keystrlen() + strlen (timestr) + strlen (maink) ); sprintf (atext, PROMPTSTRING, @@ -560,21 +560,21 @@ agent_get_passphrase ( u32 *keyid, int mode, const char *cacheid, #undef PROMPTSTRING - { + { size_t dummy; fingerprint_from_pk( pk, fpr, &dummy ); have_fpr = 1; } - + } - else if (mode == 2 ) + else if (mode == 2 ) atext = xstrdup ( _("Repeat passphrase\n") ); else atext = xstrdup ( _("Enter passphrase\n") ); - - { + + { char *line, *p; - int i, rc; + int i, rc; struct agent_okay_cb_s okay_cb_parm; if (!tryagain_text) @@ -584,7 +584,7 @@ agent_get_passphrase ( u32 *keyid, int mode, const char *cacheid, /* We allocate 23 times the needed space for thye texts so that there is enough space for escaping. */ - line = xmalloc (15 + 46 + line = xmalloc (15 + 46 + 3*strlen (atext) + 3*strlen (custom_prompt? custom_prompt:"") + (cacheid? (3*strlen (cacheid)): 0) @@ -650,14 +650,14 @@ agent_get_passphrase ( u32 *keyid, int mode, const char *cacheid, if (canceled) *canceled = 1; } - else + else { log_error (_("problem with the agent - disabling agent use\n")); opt.use_agent = 0; } } - - + + failure: #ifdef ENABLE_NLS if (orig_codeset) @@ -689,14 +689,14 @@ passphrase_clear_cache ( u32 *keyid, const char *cacheid, int algo ) assuan_context_t ctx = NULL; PKT_public_key *pk; byte fpr[MAX_FINGERPRINT_LEN]; - + #if MAX_FINGERPRINT_LEN < 20 #error agent needs a 20 byte fingerprint #endif - + if (!opt.use_agent) return; - + if (!cacheid) { pk = xcalloc (1, sizeof *pk); @@ -705,7 +705,7 @@ passphrase_clear_cache ( u32 *keyid, const char *cacheid, int algo ) { goto failure; /* oops: no key for some reason */ } - + { size_t dummy; fingerprint_from_pk( pk, fpr, &dummy ); @@ -713,13 +713,13 @@ passphrase_clear_cache ( u32 *keyid, const char *cacheid, int algo ) } else pk = NULL; - - if ( !(ctx = agent_open (0, NULL)) ) + + if ( !(ctx = agent_open (0, NULL)) ) goto failure; - { + { char *line, *p; - int i, rc; + int i, rc; if (cacheid) { @@ -746,7 +746,7 @@ passphrase_clear_cache ( u32 *keyid, const char *cacheid, int algo ) opt.use_agent = 0; } } - + failure: agent_close (ctx); if (pk) @@ -766,7 +766,7 @@ ask_passphrase (const char *description, const char *cacheid, int *canceled) { char *pw = NULL; - + if (canceled) *canceled = 0; @@ -781,9 +781,9 @@ ask_passphrase (const char *description, else tty_printf ("\n%s\n",description); } - + agent_died: - if ( opt.use_agent ) + if ( opt.use_agent ) { pw = agent_get_passphrase (NULL, 0, cacheid, tryagain_text, description, prompt, @@ -795,7 +795,7 @@ ask_passphrase (const char *description, pw = NULL; } } - else if (fd_passwd) + else if (fd_passwd) { pw = xmalloc_secure (strlen(fd_passwd)+1); strcpy (pw, fd_passwd); @@ -824,7 +824,7 @@ ask_passphrase (const char *description, * KEYID and PUBKEY_ALGO to prompt the user. MODE 0: Allow cached passphrase - 1: Ignore cached passphrase + 1: Ignore cached passphrase 2: Ditto, but change the text to "repeat entry" */ DEK * @@ -840,7 +840,7 @@ passphrase_to_dek( u32 *keyid, int pubkey_algo, *canceled = 0; if( !s2k ) { - /* This is used for the old rfc1991 mode + /* This is used for the old rfc1991 mode * Note: This must match the code in encode.c with opt.rfc1991 set */ s2k = &help_s2k; s2k->mode = 0; @@ -851,7 +851,7 @@ passphrase_to_dek( u32 *keyid, int pubkey_algo, information are request, we print them now. */ if( !next_pw && is_status_enabled() ) { char buf[50]; - + if( keyid ) { u32 used_kid[2]; char *us; @@ -873,7 +873,7 @@ passphrase_to_dek( u32 *keyid, int pubkey_algo, (ulong)keyid[0], (ulong)keyid[1], (ulong)used_kid[0], (ulong)used_kid[1], pubkey_algo ); - + write_status_text( STATUS_NEED_PASSPHRASE, buf ); } else { ----------------------------------------------------------------------- Summary of changes: g10/passphrase.c | 106 +++++++++++++++++++++++++++--------------------------- 1 files changed, 53 insertions(+), 53 deletions(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Mon Apr 30 15:45:39 2012 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Mon, 30 Apr 2012 15:45:39 +0200 Subject: [git] GnuPG - branch, master, updated. gnupg-2.1.0beta3-72-g0f02fba Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Guard". The branch, master has been updated via 0f02fba19df16c82ca1ad44a8cb09f952d755598 (commit) from 8d7522837c6dba3065d24594bcdbe7b99a702cde (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 0f02fba19df16c82ca1ad44a8cb09f952d755598 Author: Werner Koch Date: Mon Apr 30 14:37:36 2012 +0200 agent: Fix deadlock in trustlist due to the switch to npth. * agent/trustlist.c (clear_trusttable): New. (agent_reload_trustlist): Use new function. (read_trustfiles): Require to be called with lock held. (agent_istrusted): Factor all code out to ... (istrusted_internal): new. Add ALREADY_LOCKED arg. Make sure the table islocked. Do not print TRUSTLISTFLAG stati if called internally. (agent_marktrusted): Replace calls to agent_reload_trustlist by explicit code. -- In contrast to pth, npth does not use recursive mutexes by default. However, the code in trustlist.c assumed recursive locks and thus we had to rework it. diff --git a/agent/trustlist.c b/agent/trustlist.c index 8604d84..f92ad30 100644 --- a/agent/trustlist.c +++ b/agent/trustlist.c @@ -1,5 +1,6 @@ /* trustlist.c - Maintain the list of trusted keys - * Copyright (C) 2002, 2004, 2006, 2007, 2009 Free Software Foundation, Inc. + * Copyright (C) 2002, 2004, 2006, 2007, 2009, + * 2012 Free Software Foundation, Inc. * * This file is part of GnuPG. * @@ -56,7 +57,6 @@ static size_t trusttablesize; static npth_mutex_t trusttable_lock; - static const char headerblurb[] = "# This is the list of trusted keys. Comment lines, like this one, as\n" "# well as empty lines are ignored. Lines have a length limit but this\n" @@ -87,7 +87,7 @@ initialize_module_trustlist (void) { err = npth_mutex_init (&trusttable_lock, NULL); if (err) - log_fatal ("error initializing mutex: %s\n", strerror (err)); + log_fatal ("failed to init mutex in %s: %s\n", __FILE__,strerror (err)); initialized = 1; } } @@ -105,6 +105,7 @@ lock_trusttable (void) log_fatal ("failed to acquire mutex in %s: %s\n", __FILE__, strerror (err)); } + static void unlock_trusttable (void) { @@ -116,6 +117,16 @@ unlock_trusttable (void) } +/* Clear the trusttable. The caller needs to make sure that the + trusttable is locked. */ +static inline void +clear_trusttable (void) +{ + xfree (trusttable); + trusttable = NULL; + trusttablesize = 0; +} + static gpg_error_t read_one_trustfile (const char *fname, int allow_include, @@ -315,7 +326,8 @@ read_one_trustfile (const char *fname, int allow_include, } -/* Read the trust files and update the global table on success. */ +/* Read the trust files and update the global table on success. The + trusttable is assumed to be locked. */ static gpg_error_t read_trustfiles (void) { @@ -356,11 +368,7 @@ read_trustfiles (void) if (gpg_err_code (err) == GPG_ERR_ENOENT) { /* Take a missing trustlist as an empty one. */ - lock_trusttable (); - xfree (trusttable); - trusttable = NULL; - trusttablesize = 0; - unlock_trusttable (); + clear_trusttable (); err = 0; } return err; @@ -375,22 +383,23 @@ read_trustfiles (void) return err; } - lock_trusttable (); + /* Replace the trusttable. */ xfree (trusttable); trusttable = ti; trusttablesize = tableidx; - unlock_trusttable (); return 0; } - /* Check whether the given fpr is in our trustdb. We expect FPR to be - an all uppercase hexstring of 40 characters. */ -gpg_error_t -agent_istrusted (ctrl_t ctrl, const char *fpr, int *r_disabled) + an all uppercase hexstring of 40 characters. If ALREADY_LOCKED is + true the function assumes that the trusttable is already locked. */ +static gpg_error_t +istrusted_internal (ctrl_t ctrl, const char *fpr, int *r_disabled, + int already_locked) { gpg_error_t err; + int locked = already_locked; trustitem_t *ti; size_t len; unsigned char fprbin[20]; @@ -399,7 +408,16 @@ agent_istrusted (ctrl_t ctrl, const char *fpr, int *r_disabled) *r_disabled = 0; if ( hexcolon2bin (fpr, fprbin, 20) < 0 ) - return gpg_error (GPG_ERR_INV_VALUE); + { + err = gpg_error (GPG_ERR_INV_VALUE); + goto leave; + } + + if (!already_locked) + { + lock_trusttable (); + locked = 1; + } if (!trusttable) { @@ -407,7 +425,7 @@ agent_istrusted (ctrl_t ctrl, const char *fpr, int *r_disabled) if (err) { log_error (_("error reading list of trusted root certificates\n")); - return err; + goto leave; } } @@ -419,26 +437,43 @@ agent_istrusted (ctrl_t ctrl, const char *fpr, int *r_disabled) if (ti->flags.disabled && r_disabled) *r_disabled = 1; - if (ti->flags.relax) + /* Print status messages only if we have not been called + in a locked state. */ + if (already_locked) + ; + else if (ti->flags.relax) { - err = agent_write_status (ctrl, - "TRUSTLISTFLAG", "relax", - NULL); - if (err) - return err; + unlock_trusttable (); + locked = 0; + err = agent_write_status (ctrl, "TRUSTLISTFLAG", "relax", NULL); } else if (ti->flags.cm) { - err = agent_write_status (ctrl, - "TRUSTLISTFLAG", "cm", - NULL); - if (err) - return err; + unlock_trusttable (); + locked = 0; + err = agent_write_status (ctrl, "TRUSTLISTFLAG", "cm", NULL); } - return ti->flags.disabled? gpg_error (GPG_ERR_NOT_TRUSTED) : 0; + + if (!err) + err = ti->flags.disabled? gpg_error (GPG_ERR_NOT_TRUSTED) : 0; + goto leave; } } - return gpg_error (GPG_ERR_NOT_TRUSTED); + err = gpg_error (GPG_ERR_NOT_TRUSTED); + + leave: + if (locked && !already_locked) + unlock_trusttable (); + return err; +} + + +/* Check whether the given fpr is in our trustdb. We expect FPR to be + an all uppercase hexstring of 40 characters. */ +gpg_error_t +agent_istrusted (ctrl_t ctrl, const char *fpr, int *r_disabled) +{ + return istrusted_internal (ctrl, fpr, r_disabled, 0); } @@ -451,11 +486,13 @@ agent_listtrusted (void *assuan_context) gpg_error_t err; size_t len; + lock_trusttable (); if (!trusttable) { err = read_trustfiles (); if (err) { + unlock_trusttable (); log_error (_("error reading list of trusted root certificates\n")); return err; } @@ -463,9 +500,6 @@ agent_listtrusted (void *assuan_context) if (trusttable) { - /* We need to lock the table because the scheduler may interrupt - assuan_send_data and an other thread may then re-read the table. */ - lock_trusttable (); for (ti=trusttable, len = trusttablesize; len; ti++, len--) { if (ti->flags.disabled) @@ -478,9 +512,9 @@ agent_listtrusted (void *assuan_context) assuan_send_data (assuan_context, key, 43); assuan_send_data (assuan_context, NULL, 0); /* flush */ } - unlock_trusttable (); } + unlock_trusttable (); return 0; } @@ -553,10 +587,10 @@ reformat_name (const char *name, const char *replstring) /* Insert the given fpr into our trustdb. We expect FPR to be an all uppercase hexstring of 40 characters. FLAG is either 'P' or 'C'. - This function does first check whether that key has already been put - into the trustdb and returns success in this case. Before a FPR - actually gets inserted, the user is asked by means of the Pinentry - whether this is actual want he wants to do. */ + This function does first check whether that key has already been + put into the trustdb and returns success in this case. Before a + FPR actually gets inserted, the user is asked by means of the + Pinentry whether this is actual what he wants to do. */ gpg_error_t agent_marktrusted (ctrl_t ctrl, const char *name, const char *fpr, int flag) { @@ -690,8 +724,8 @@ agent_marktrusted (ctrl_t ctrl, const char *name, const char *fpr, int flag) /* Now check again to avoid duplicates. We take the lock to make sure that nobody else plays with our file and force a reread. */ lock_trusttable (); - agent_reload_trustlist (); - if (!agent_istrusted (ctrl, fpr, &is_disabled) || is_disabled) + clear_trusttable (); + if (!istrusted_internal (ctrl, fpr, &is_disabled, 1) || is_disabled) { unlock_trusttable (); xfree (fprformatted); @@ -747,11 +781,13 @@ agent_marktrusted (ctrl_t ctrl, const char *name, const char *fpr, int flag) if (es_fclose (fp)) err = gpg_error_from_syserror (); - agent_reload_trustlist (); + clear_trusttable (); xfree (fname); unlock_trusttable (); xfree (fprformatted); xfree (nameformatted); + if (!err) + bump_key_eventcounter (); return err; } @@ -764,9 +800,7 @@ agent_reload_trustlist (void) /* All we need to do is to delete the trusttable. At the next access it will get re-read. */ lock_trusttable (); - xfree (trusttable); - trusttable = NULL; - trusttablesize = 0; + clear_trusttable (); unlock_trusttable (); bump_key_eventcounter (); } ----------------------------------------------------------------------- Summary of changes: agent/trustlist.c | 122 ++++++++++++++++++++++++++++++++++------------------- 1 files changed, 78 insertions(+), 44 deletions(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Mon Apr 30 18:53:02 2012 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Mon, 30 Apr 2012 18:53:02 +0200 Subject: [git] GPGME - branch, master, updated. gpgme-1.3.1-23-g1a21574 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GnuPG Made Easy". The branch, master has been updated via 1a21574b48ee91eedbf95251ee600648b377d1e7 (commit) via 22de98b7a67c3017ae67ffdf4d9eb122f86258b1 (commit) from 4cb408d33efe80e7d102049dea244d22907d8395 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 1a21574b48ee91eedbf95251ee600648b377d1e7 Author: Werner Koch Date: Mon Apr 30 17:46:15 2012 +0200 Fix timestamp parsing for y2038 hack. * src/conversion.c (_gpgme_parse_timestamp): Set ENDP before year 2038 check. diff --git a/src/conversion.c b/src/conversion.c index d585b5a..356200c 100644 --- a/src/conversion.c +++ b/src/conversion.c @@ -374,6 +374,9 @@ _gpgme_parse_timestamp (const char *timestamp, char **endp) if (year < 1900) return (time_t)(-1); + if (endp) + *endp = (char*)(timestamp + 15); + /* Fixme: We would better use a configure test to see whether mktime can handle dates beyond 2038. */ if (sizeof (time_t) <= 4 && year >= 2038) @@ -387,8 +390,6 @@ _gpgme_parse_timestamp (const char *timestamp, char **endp) buf.tm_min = atoi_2 (timestamp+11); buf.tm_sec = atoi_2 (timestamp+13); - if (endp) - *endp = (char*)(timestamp + 15); #ifdef HAVE_W32_SYSTEM return _gpgme_timegm (&buf); #else commit 22de98b7a67c3017ae67ffdf4d9eb122f86258b1 Author: Werner Koch Date: Mon Apr 30 17:42:53 2012 +0200 Remove trailing white space -- diff --git a/src/conversion.c b/src/conversion.c index e6282fa..d585b5a 100644 --- a/src/conversion.c +++ b/src/conversion.c @@ -1,19 +1,19 @@ /* conversion.c - String conversion helper functions. Copyright (C) 2000 Werner Koch (dd9jn) Copyright (C) 2001, 2002, 2003, 2004, 2007 g10 Code GmbH - + This file is part of GPGME. GPGME is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. - + GPGME is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 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 @@ -150,9 +150,9 @@ _gpgme_decode_c_string (const char *src, char **destp, size_t len) /* A binary zero is not representable in a C string. */ *(dest++) = '\\'; - *(dest++) = '0'; + *(dest++) = '0'; } - else + else *((unsigned char *) dest++) = val; src += 4; } @@ -165,7 +165,7 @@ _gpgme_decode_c_string (const char *src, char **destp, size_t len) *(dest++) = *(src++); *(dest++) = *(src++); } - } + } } *(dest++) = 0; @@ -216,7 +216,7 @@ _gpgme_decode_percent_string (const char *src, char **destp, size_t len, else { int val = _gpgme_hextobyte (&src[1]); - + if (val == -1) { /* Should not happen. */ @@ -233,9 +233,9 @@ _gpgme_decode_percent_string (const char *src, char **destp, size_t len, /* A binary zero is not representable in a C string. */ *(dest++) = '\\'; - *(dest++) = '0'; + *(dest++) = '0'; } - else + else *((unsigned char *) dest++) = val; src += 3; } @@ -269,7 +269,7 @@ _gpgme_encode_percent_string (const char *src, char **destp, size_t len) the special plus format. */ while (*str) { - if (*str == '+' || *str == '\"' || *str == '%' + if (*str == '+' || *str == '\"' || *str == '%' || *(const unsigned char *)str <= 0x20) destlen += 3; else @@ -301,7 +301,7 @@ _gpgme_encode_percent_string (const char *src, char **destp, size_t len) /* Convert the string. */ while (*src) { - if (*src == '+' || *src == '\"' || *src == '%' + if (*src == '+' || *src == '\"' || *src == '%' || *(const unsigned char *)src <= 0x20) { snprintf (dest, 4, "%%%02X", *(unsigned char *)src); @@ -325,7 +325,7 @@ _gpgme_timegm (struct tm *tm) SYSTEMTIME st; FILETIME ft; unsigned long long cnsecs; - + st.wYear = tm->tm_year + 1900; st.wMonth = tm->tm_mon + 1; st.wDay = tm->tm_mday; @@ -341,7 +341,7 @@ _gpgme_timegm (struct tm *tm) gpg_err_set_errno (EINVAL); return (time_t)(-1); } - + cnsecs = (((unsigned long long)ft.dwHighDateTime << 32) | ft.dwLowDateTime); cnsecs -= 116444736000000000ULL; /* The filetime epoch is 1601-01-01. */ @@ -381,7 +381,7 @@ _gpgme_parse_timestamp (const char *timestamp, char **endp) memset (&buf, 0, sizeof buf); buf.tm_year = year - 1900; - buf.tm_mon = atoi_2 (timestamp+4) - 1; + buf.tm_mon = atoi_2 (timestamp+4) - 1; buf.tm_mday = atoi_2 (timestamp+6); buf.tm_hour = atoi_2 (timestamp+9); buf.tm_min = atoi_2 (timestamp+11); @@ -397,7 +397,7 @@ _gpgme_parse_timestamp (const char *timestamp, char **endp) #else { time_t tim; - + putenv ("TZ=UTC"); tim = mktime (&buf); #ifdef __GNUC__ diff --git a/src/verify.c b/src/verify.c index a8f6712..d63fc54 100644 --- a/src/verify.c +++ b/src/verify.c @@ -3,17 +3,17 @@ Copyright (C) 2001, 2002, 2003, 2004, 2005 g10 Code GmbH This file is part of GPGME. - + GPGME is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. - + GPGME is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 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 @@ -119,7 +119,7 @@ gpgme_op_verify_result (gpgme_ctx_t ctx) if (sig->notations) { TRACE_LOG1 ("sig[%i] = has notations (not shown)", i); - } + } sig = sig->next; i++; } @@ -135,7 +135,7 @@ static void calc_sig_summary (gpgme_signature_t sig) { unsigned long sum = 0; - + /* Calculate the red/green flag. */ if (sig->validity == GPGME_VALIDITY_FULL || sig->validity == GPGME_VALIDITY_ULTIMATE) @@ -179,7 +179,7 @@ calc_sig_summary (gpgme_signature_t sig) sum |= GPGME_SIGSUM_SYS_ERROR; break; } - + /* Now look at the certain reason codes. */ switch (gpg_err_code (sig->validity_reason)) { @@ -187,7 +187,7 @@ calc_sig_summary (gpgme_signature_t sig) if (sig->validity == GPGME_VALIDITY_UNKNOWN) sum |= GPGME_SIGSUM_CRL_TOO_OLD; break; - + case GPG_ERR_CERT_REVOKED: sum |= GPGME_SIGSUM_KEY_REVOKED; break; @@ -199,15 +199,15 @@ calc_sig_summary (gpgme_signature_t sig) /* Check other flags. */ if (sig->wrong_key_usage) sum |= GPGME_SIGSUM_BAD_POLICY; - + /* Set the valid flag when the signature is unquestionable valid. (The test is identical to if(sum == GPGME_SIGSUM_GREEN)). */ if ((sum & GPGME_SIGSUM_GREEN) && !(sum & ~GPGME_SIGSUM_GREEN)) sum |= GPGME_SIGSUM_VALID; - + sig->summary = sum; } - + static gpgme_error_t prepare_new_sig (op_data_t opd) @@ -300,7 +300,7 @@ parse_new_sig (op_data_t opd, gpgme_status_code_t code, char *args) end = tail; while (*end == ' ') end++; - + /* Parse the hash algo. */ if (!*end) goto parse_err_sig_fail; @@ -326,7 +326,7 @@ parse_new_sig (op_data_t opd, gpgme_status_code_t code, char *args) end = tail; while (*end == ' ') end++; - + /* Parse the return code. */ if (end[0] && (!end[1] || end[1] == ' ')) { @@ -335,11 +335,11 @@ parse_new_sig (op_data_t opd, gpgme_status_code_t code, char *args) case '4': sig->status = gpg_error (GPG_ERR_UNSUPPORTED_ALGORITHM); break; - + case '9': sig->status = gpg_error (GPG_ERR_NO_PUBKEY); break; - + default: sig->status = gpg_error (GPG_ERR_GENERAL); } @@ -348,12 +348,12 @@ parse_new_sig (op_data_t opd, gpgme_status_code_t code, char *args) goto parse_err_sig_fail; goto parse_err_sig_ok; - + parse_err_sig_fail: sig->status = gpg_error (GPG_ERR_GENERAL); parse_err_sig_ok: break; - + default: return gpg_error (GPG_ERR_GENERAL); } @@ -398,7 +398,7 @@ parse_valid_sig (gpgme_signature_t sig, char *args) if (sig->timestamp == -1 || end == tail || (*tail && *tail != ' ')) return gpg_error (GPG_ERR_INV_ENGINE); end = tail; - + sig->exp_timestamp = _gpgme_parse_timestamp (end, &tail); if (sig->exp_timestamp == -1 || end == tail || (*tail && *tail != ' ')) return gpg_error (GPG_ERR_INV_ENGINE); @@ -521,7 +521,7 @@ parse_notation (gpgme_signature_t sig, gpgme_status_code_t code, char *args) /* There is notation data without a previous notation name. The crypto backend misbehaves. */ return gpg_error (GPG_ERR_INV_ENGINE); - + if (!notation->value) { dest = notation->value = malloc (len); @@ -537,7 +537,7 @@ parse_notation (gpgme_signature_t sig, gpgme_status_code_t code, char *args) notation->value = dest; dest += cur_len; } - + err = _gpgme_decode_percent_string (args, &dest, len, 0); if (err) return err; @@ -618,7 +618,7 @@ parse_error (gpgme_signature_t sig, char *args, int set_status) if (where) *where = '\0'; - where = args; + where = args; } else return gpg_error (GPG_ERR_INV_ENGINE); @@ -792,7 +792,7 @@ verify_status_handler (void *priv, gpgme_status_code_t code, char *args) gpgme_error_t _gpgme_op_verify_init_result (gpgme_ctx_t ctx) -{ +{ void *hook; op_data_t opd; @@ -924,27 +924,27 @@ gpgme_get_sig_status (gpgme_ctx_t ctx, int idx, case GPG_ERR_NO_ERROR: *r_stat = GPGME_SIG_STAT_GOOD; break; - + case GPG_ERR_BAD_SIGNATURE: *r_stat = GPGME_SIG_STAT_BAD; break; - + case GPG_ERR_NO_PUBKEY: *r_stat = GPGME_SIG_STAT_NOKEY; break; - + case GPG_ERR_NO_DATA: *r_stat = GPGME_SIG_STAT_NOSIG; break; - + case GPG_ERR_SIG_EXPIRED: *r_stat = GPGME_SIG_STAT_GOOD_EXP; break; - + case GPG_ERR_KEY_EXPIRED: *r_stat = GPGME_SIG_STAT_GOOD_EXPKEY; break; - + default: *r_stat = GPGME_SIG_STAT_ERROR; break; @@ -960,7 +960,7 @@ gpgme_get_sig_status (gpgme_ctx_t ctx, int idx, number of the signature after a successful verify operation. WHAT is an attribute where GPGME_ATTR_EXPIRE is probably the most useful one. WHATIDX is to be passed as 0 for most attributes . */ -unsigned long +unsigned long gpgme_get_sig_ulong_attr (gpgme_ctx_t ctx, int idx, _gpgme_attr_t what, int whatidx) { @@ -994,22 +994,22 @@ gpgme_get_sig_ulong_attr (gpgme_ctx_t ctx, int idx, { case GPG_ERR_NO_ERROR: return GPGME_SIG_STAT_GOOD; - + case GPG_ERR_BAD_SIGNATURE: return GPGME_SIG_STAT_BAD; - + case GPG_ERR_NO_PUBKEY: return GPGME_SIG_STAT_NOKEY; - + case GPG_ERR_NO_DATA: return GPGME_SIG_STAT_NOSIG; - + case GPG_ERR_SIG_EXPIRED: return GPGME_SIG_STAT_GOOD_EXP; - + case GPG_ERR_KEY_EXPIRED: return GPGME_SIG_STAT_GOOD_EXPKEY; - + default: return GPGME_SIG_STAT_ERROR; } ----------------------------------------------------------------------- Summary of changes: src/conversion.c | 35 ++++++++++++++------------- src/verify.c | 68 +++++++++++++++++++++++++++--------------------------- 2 files changed, 52 insertions(+), 51 deletions(-) hooks/post-receive -- GnuPG Made Easy http://git.gnupg.org