From cvs at cvs.gnupg.org Sat Oct 1 04:33:37 2005 From: cvs at cvs.gnupg.org (svn author marcus) Date: Sat Oct 1 04:05:22 2005 Subject: [svn] gpgme - r1105 - in trunk: . doc gpgme tests tests/gpg Message-ID: Author: marcus Date: 2005-10-01 04:33:35 +0200 (Sat, 01 Oct 2005) New Revision: 1105 Added: trunk/gpgme/sig-notation.c trunk/tests/gpg/gpg.conf trunk/tests/gpg/t-sig-notation.c Modified: trunk/NEWS trunk/TODO trunk/doc/ChangeLog trunk/doc/gpgme.texi trunk/gpgme/ChangeLog trunk/gpgme/Makefile.am trunk/gpgme/context.h trunk/gpgme/data.h trunk/gpgme/gpgme.c trunk/gpgme/gpgme.def trunk/gpgme/gpgme.h trunk/gpgme/libgpgme.vers trunk/gpgme/ops.h trunk/gpgme/rungpg.c trunk/gpgme/verify.c trunk/tests/ChangeLog trunk/tests/gpg/Makefile.am trunk/tests/gpg/t-verify.c Log: doc/ 2005-10-01 Marcus Brinkmann * gpgme.texi (Signature Notation Data): New section. (Verify): Added more about the notation data structure. gpgme/ 2005-10-01 Marcus Brinkmann * gpgme.def: Add gpgme_data_set_file_name, gpgme_data_get_file_name, gpgme_sig_notation_clear, gpgme_sig_notation_add and gpgme_sig_notation_get. * libgpgme.vers: Add gpgme_sig_notation_clear, gpgme_sig_notation_add and gpgme_sig_notation_get. * Makefile.am (libgpgme_real_la_SOURCES): Add sig-notation.c. * context.h (struct gpgme_context): New field sig_notations. * gpgme.h (struct _gpgme_sig_notation): New member value_len and critical. (GPGME_SIG_NOTATION_CRITICAL): New symbol. (gpgme_sig_notation_flags_t): New type. (gpgme_sig_notation_add, gpgme_sig_notation_clear, gpgme_sig_notation_get): New prototypes. * ops.h (_gpgme_sig_notation_create, _gpgme_sig_notation_free): New prototypes. * sig-notation.c (_gpgme_sig_notation_free): New file. * verify.c (parse_notation): Use support functions. (release_op_data): Likewise. * rungpg.c (append_args_from_sig_notations): New function. (gpg_encrypt_sign, gpg_sign): Call it. tests/ 2005-10-01 Marcus Brinkmann * gpg/Makefile.am (TESTS): Add t-sig-notation. * gpg/t-sig-notation.c (check_result): New file. * gpg/t-verify.c (check_result): Also check the length of the notation data. * gpg/gpg.conf: New file. Modified: trunk/NEWS =================================================================== --- trunk/NEWS 2005-09-30 14:17:47 UTC (rev 1104) +++ trunk/NEWS 2005-10-01 02:33:35 UTC (rev 1105) @@ -33,10 +33,13 @@ to local government regulations. * You can associate a filename with a data object using the new - gpgme_data_set_filename() function. This filename will be stored + function gpgme_data_set_filename(). This filename will be stored in the output when encrypting or signing the data and will be returned when decrypting or verifying the output data. + * You can now set notation data at signature creation with the new + function gpgme_sig_notation_add(). + * Interface changes relative to the 1.0.3 release: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ gpgme_set_engine_info NEW @@ -51,6 +54,12 @@ gpgme_key_t EXTENDED: New field is_qualified. gpgme_subkey_t EXTENDED: New field is_qualified. gpgme_data_set_filename NEW +gpgme_sig_notation_flags_t NEW +GPGME_SIG_NOTATION_HUMAN_READABLE NEW +GPGME_SIG_NOTATAION_CRITICAL NEW +gpgme_sig_notation_clear NEW +gpgme_sig_notation_add NEW +gpgme_sig_notation_get NEW ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Modified: trunk/TODO =================================================================== --- trunk/TODO 2005-09-30 14:17:47 UTC (rev 1104) +++ trunk/TODO 2005-10-01 02:33:35 UTC (rev 1105) @@ -37,6 +37,8 @@ There is a configure time warning, though. * New features: +** Extended notation support. When gpg supports arbitrary binary + notation data, provide a user interface for that. ** notification system We need a simple notification system, probably a simple callback with a string and some optional arguments. This is for example Modified: trunk/doc/ChangeLog =================================================================== --- trunk/doc/ChangeLog 2005-09-30 14:17:47 UTC (rev 1104) +++ trunk/doc/ChangeLog 2005-10-01 02:33:35 UTC (rev 1105) @@ -1,3 +1,8 @@ +2005-10-01 Marcus Brinkmann + + * gpgme.texi (Signature Notation Data): New section. + (Verify): Added more about the notation data structure. + 2005-09-30 Marcus Brinkmann * gpgme.texi (Data Buffer I/O Operations, Data Buffer Meta-Data): Modified: trunk/doc/gpgme.texi =================================================================== --- trunk/doc/gpgme.texi 2005-09-30 14:17:47 UTC (rev 1104) +++ trunk/doc/gpgme.texi 2005-10-01 02:33:35 UTC (rev 1105) @@ -209,6 +209,7 @@ * Selecting Signers:: How to choose the keys to sign with. * Creating a Signature:: How to create a signature. +* Signature Notation Data:: How to add notation data to a signature. Encrypt @@ -3753,6 +3754,8 @@ @cindex signature, verification @cindex cryptographic operation, verification @cindex cryptographic operation, signature check +@cindex signature notation data +@cindex notation data @deftypefun gpgme_error_t gpgme_op_verify (@w{gpgme_ctx_t @var{ctx}}, @w{gpgme_data_t @var{sig}}, @w{gpgme_data_t @var{signed_text}}, @w{gpgme_data_t @var{plain}}) The function @code{gpgme_op_verify} verifies that the signature in the @@ -3801,10 +3804,46 @@ The name of the notation field. If this is @code{NULL}, then the member @code{value} will contain a policy URL. +@item int name_len +The length of the @code{name} field. For strings the length is +counted without the trailing binary zero. + @item char *value The value of the notation field. If @code{name} is @code{NULL}, then this is a policy URL. + +@item int value_len +The length of the @code{value} field. For strings the length is +counted without the trailing binary zero. + +@item gpgme_sig_notation_flags_t flags +The accumulated flags field. This field contains the flags associated +with the notation data in an accumulated form which can be used as an +argument to the function @code{gpgme_sig_notation_add}. The value +@code{flags} is a bitwise-or combination of one or multiple of the +following bit values: + +@table @code +@item GPGME_SIG_NOTATION_HUMAN_READABLE +The @code{GPGME_SIG_NOTATION_HUMAN_READABLE} symbol specifies that the +notation data is in human readable form + +@item GPGME_SIG_NOTATION_CRITICAL +The @code{GPGME_SIG_NOTATION_CRITICAL} symbol specifies that the +notation data is critical. + @end table + +@item unsigned int human_readable : 1 +This is true if the @code{GPGME_SIG_NOTATION_HUMAN_READABLE} flag is +set and false otherwise. This flag is only valid for notation data, +not for policy URLs. + +@item unsigned int critical : 1 +This is true if the @code{GPGME_SIG_NOTATION_CRITICAL} flag is set and +false otherwise. This flag is valid for notation data and policy URLs. + +@end table @end deftp @deftp {Data type} {gpgme_signature_t} @@ -4258,6 +4297,7 @@ @menu * Selecting Signers:: How to choose the keys to sign with. * Creating a Signature:: How to create a signature. +* Signature Notation Data:: How to add notation data to a signature. @end menu @@ -4406,6 +4446,58 @@ @end deftypefun +@node Signature Notation Data +@subsubsection Signature Notation Data +@cindex notation data +@cindex signature notation data +@cindex policy URL + +Using the following functions, you can attach arbitrary notation data +to a signature. This information is then available to the user when +the signature is verified. + +@deftypefun void gpgme_sig_notation_clear (@w{gpgme_ctx_t @var{ctx}}) +The function @code{gpgme_sig_notation_clear} removes the notation data +from the context @var{ctx}. Subsequent signing operations from this +context will not include any notation data. + +Every context starts with an empty notation data list. +@end deftypefun + +@deftypefun gpgme_error_t gpgme_sig_notation_add (@w{gpgme_ctx_t @var{ctx}}, @w{const char *@var{name}}, @w{const char *@var{value}}, @w{gpgme_sig_notation_flags_t @var{flags}}) +The function @code{gpgme_sig_notation_add} adds the notation data with +the name @var{name} and the value @var{value} to the context +@var{ctx}. + +Subsequent signing operations will include this notation data, as well +as any other notation data that was added since the creation of the +context or the last @code{gpgme_sig_notation_clear} operation. + +The arguments @var{name} and @var{value} must be @code{NUL}-terminated +strings in human-readable form. The flag +@code{GPGME_SIG_NOTATION_HUMAN_READABLE} is implied +(non-human-readable notation data is currently not supported). The +strings must be in UTF-8 encoding. + +If @var{name} is @code{NULL}, then @var{value} should be a policy URL. + +The function @code{gpgme_sig_notation_add} returns the error code +@code{GPG_ERR_NO_ERROR} if the notation data could be added +successfully, @code{GPG_ERR_INV_VALUE} if @var{ctx} is not a valid +pointer, or if @var{name}, @var{value} and @var{flags} are an invalid +combination. The function also passes through any errors that are +reported by the crypto engine support routines. +@end deftypefun + +@deftypefun gpgme_sig_notation_t gpgme_sig_notation_get (@w{const gpgme_ctx_t @var{ctx}}) +The function @code{gpgme_sig_notation_get} returns the linked list of +notation data structures that are contained in the context @var{ctx}. + +If @var{ctx} is not a valid pointer, or there is no notation data +added for this context, @code{NULL} is returned. +@end deftypefun + + @node Encrypt @subsection Encrypt @cindex encryption Modified: trunk/gpgme/ChangeLog =================================================================== --- trunk/gpgme/ChangeLog 2005-09-30 14:17:47 UTC (rev 1104) +++ trunk/gpgme/ChangeLog 2005-10-01 02:33:35 UTC (rev 1105) @@ -1,3 +1,26 @@ +2005-10-01 Marcus Brinkmann + + * gpgme.def: Add gpgme_data_set_file_name, + gpgme_data_get_file_name, gpgme_sig_notation_clear, + gpgme_sig_notation_add and gpgme_sig_notation_get. + * libgpgme.vers: Add gpgme_sig_notation_clear, + gpgme_sig_notation_add and gpgme_sig_notation_get. + * Makefile.am (libgpgme_real_la_SOURCES): Add sig-notation.c. + * context.h (struct gpgme_context): New field sig_notations. + * gpgme.h (struct _gpgme_sig_notation): New member value_len and + critical. + (GPGME_SIG_NOTATION_CRITICAL): New symbol. + (gpgme_sig_notation_flags_t): New type. + (gpgme_sig_notation_add, gpgme_sig_notation_clear, + gpgme_sig_notation_get): New prototypes. + * ops.h (_gpgme_sig_notation_create, _gpgme_sig_notation_free): + New prototypes. + * sig-notation.c (_gpgme_sig_notation_free): New file. + * verify.c (parse_notation): Use support functions. + (release_op_data): Likewise. + * rungpg.c (append_args_from_sig_notations): New function. + (gpg_encrypt_sign, gpg_sign): Call it. + 2005-09-30 Marcus Brinkmann * data.h (struct gpgme_data): New member file_name. Modified: trunk/gpgme/Makefile.am =================================================================== --- trunk/gpgme/Makefile.am 2005-09-30 14:17:47 UTC (rev 1104) +++ trunk/gpgme/Makefile.am 2005-10-01 02:33:35 UTC (rev 1105) @@ -72,7 +72,7 @@ gpgme.h util.h conversion.c get-env.c context.h ops.h \ data.h data.c data-fd.c data-stream.c data-mem.c data-user.c \ data-compat.c \ - signers.c \ + signers.c sig-notation.c \ wait.c wait-global.c wait-private.c wait-user.c wait.h \ op-support.c \ encrypt.c encrypt-sign.c decrypt.c decrypt-verify.c verify.c \ Modified: trunk/gpgme/context.h =================================================================== --- trunk/gpgme/context.h 2005-09-30 14:17:47 UTC (rev 1104) +++ trunk/gpgme/context.h 2005-10-01 02:33:35 UTC (rev 1105) @@ -1,6 +1,6 @@ /* context.h - Definitions for a GPGME context. Copyright (C) 2000 Werner Koch (dd9jn) - Copyright (C) 2001, 2002, 2003, 2004 g10 Code GmbH + Copyright (C) 2001, 2002, 2003, 2004, 2005 g10 Code GmbH This file is part of GPGME. @@ -91,6 +91,9 @@ unsigned int signers_size; gpgme_key_t *signers; + /* The signature notations for this context. */ + gpgme_sig_notation_t sig_notations; + /* The locale for the pinentry. */ char *lc_ctype; char *lc_messages; Modified: trunk/gpgme/data.h =================================================================== --- trunk/gpgme/data.h 2005-09-30 14:17:47 UTC (rev 1104) +++ trunk/gpgme/data.h 2005-10-01 02:33:35 UTC (rev 1105) @@ -1,5 +1,5 @@ /* data.h - Internal data object abstraction interface. - Copyright (C) 2002, 2004 g10 Code GmbH + Copyright (C) 2002, 2004, 2005 g10 Code GmbH This file is part of GPGME. Modified: trunk/gpgme/gpgme.c =================================================================== --- trunk/gpgme/gpgme.c 2005-09-30 14:17:47 UTC (rev 1104) +++ trunk/gpgme/gpgme.c 2005-10-01 02:33:35 UTC (rev 1105) @@ -430,6 +430,71 @@ } +/* Clear all notation data from the context. */ +void +gpgme_sig_notation_clear (gpgme_ctx_t ctx) +{ + gpgme_sig_notation_t notation; + + if (!ctx) + return; + + notation = ctx->sig_notations; + while (notation) + { + gpgme_sig_notation_t next_notation = notation->next; + _gpgme_sig_notation_free (notation); + notation = next_notation; + } +} + + +/* Add the human-readable notation data with name NAME and value VALUE + to the context CTX, using the flags FLAGS. If NAME is NULL, then + VALUE should be a policy URL. The flag + GPGME_SIG_NOTATION_HUMAN_READABLE is forced to be true for notation + data, and false for policy URLs. */ +gpgme_error_t +gpgme_sig_notation_add (gpgme_ctx_t ctx, const char *name, + const char *value, gpgme_sig_notation_flags_t flags) +{ + gpgme_error_t err; + gpgme_sig_notation_t notation; + gpgme_sig_notation_t *lastp; + + if (!ctx) + gpg_error (GPG_ERR_INV_VALUE); + + if (name) + flags |= GPGME_SIG_NOTATION_HUMAN_READABLE; + else + flags &= ~GPGME_SIG_NOTATION_HUMAN_READABLE; + + err = _gpgme_sig_notation_create (¬ation, name, name ? strlen (name) : 0, + value, value ? strlen (value) : 0, flags); + if (err) + return err; + + lastp = &ctx->sig_notations; + while (*lastp) + lastp = &(*lastp)->next; + + *lastp = notation; + return 0; +} + + +/* Get the sig notations for this context. */ +gpgme_sig_notation_t +gpgme_sig_notation_get (gpgme_ctx_t ctx) +{ + if (!ctx) + return NULL; + + return ctx->sig_notations; +} + + const char * gpgme_pubkey_algo_name (gpgme_pubkey_algo_t algo) { Modified: trunk/gpgme/gpgme.def =================================================================== --- trunk/gpgme/gpgme.def 2005-09-30 14:17:47 UTC (rev 1104) +++ trunk/gpgme/gpgme.def 2005-10-01 02:33:35 UTC (rev 1105) @@ -144,5 +144,12 @@ gpgme_ctx_get_engine_info @113 gpgme_ctx_set_engine_info @114 + gpgme_data_set_file_name @115 + gpgme_data_get_file_name @116 + + gpgme_sig_notation_clear @117 + gpgme_sig_notation_add @118 + gpgme_sig_notation_get @119 + ; END Modified: trunk/gpgme/gpgme.h =================================================================== --- trunk/gpgme/gpgme.h 2005-09-30 14:17:47 UTC (rev 1104) +++ trunk/gpgme/gpgme.h 2005-10-01 02:33:35 UTC (rev 1105) @@ -1,6 +1,6 @@ /* gpgme.h - Public interface to GnuPG Made Easy. Copyright (C) 2000 Werner Koch (dd9jn) - Copyright (C) 2001, 2002, 2003, 2004 g10 Code GmbH + Copyright (C) 2001, 2002, 2003, 2004, 2005 g10 Code GmbH This file is part of GPGME. @@ -313,6 +313,46 @@ typedef unsigned int gpgme_keylist_mode_t; +/* Signature notations. */ + +/* The available signature notation flags. */ +#define GPGME_SIG_NOTATION_HUMAN_READABLE 1 +#define GPGME_SIG_NOTATION_CRITICAL 2 + +typedef unsigned int gpgme_sig_notation_flags_t; + +struct _gpgme_sig_notation +{ + struct _gpgme_sig_notation *next; + + /* If NAME is a null pointer, then VALUE contains a policy URL + rather than a notation. */ + char *name; + + /* The value of the notation data. */ + char *value; + + /* The length of the name of the notation data. */ + int name_len; + + /* The length of the value of the notation data. */ + int value_len; + + /* The accumulated flags. */ + gpgme_sig_notation_flags_t flags; + + /* Notation data is human-readable. */ + unsigned int human_readable : 1; + + /* Notation data is critical. */ + unsigned int critical : 1; + + /* Internal to GPGME, do not use. */ + int _unused : 30; +}; +typedef struct _gpgme_sig_notation *gpgme_sig_notation_t; + + /* The possible stati for the edit operation. */ typedef enum { @@ -819,6 +859,22 @@ _GPGME_DEPRECATED; +/* Clear all notation data from the context. */ +void gpgme_sig_notation_clear (gpgme_ctx_t ctx); + +/* Add the human-readable notation data with name NAME and value VALUE + to the context CTX, using the flags FLAGS. If NAME is NULL, then + VALUE should be a policy URL. The flag + GPGME_SIG_NOTATION_HUMAN_READABLE is forced to be true for notation + data, and false for policy URLs. */ +gpgme_error_t gpgme_sig_notation_add (gpgme_ctx_t ctx, const char *name, + const char *value, + gpgme_sig_notation_flags_t flags); + +/* Get the sig notations for this context. */ +gpgme_sig_notation_t gpgme_sig_notation_get (gpgme_ctx_t ctx); + + /* Run control. */ /* The type of an I/O callback function. */ @@ -1209,17 +1265,7 @@ /* Verify. */ -struct _gpgme_sig_notation -{ - struct _gpgme_sig_notation *next; - /* If NAME is a null pointer, then VALUE contains a policy URL - rather than a notation. */ - char *name; - char *value; -}; -typedef struct _gpgme_sig_notation *gpgme_sig_notation_t; - /* Flags used for the SUMMARY field in a gpgme_signature_t. */ typedef enum { Modified: trunk/gpgme/libgpgme.vers =================================================================== --- trunk/gpgme/libgpgme.vers 2005-09-30 14:17:47 UTC (rev 1104) +++ trunk/gpgme/libgpgme.vers 2005-10-01 02:33:35 UTC (rev 1105) @@ -1,5 +1,5 @@ # libgpgme.vers - List of symbols to export. -# Copyright (C) 2002, 2004 g10 Code GmbH +# Copyright (C) 2002, 2004, 2005 g10 Code GmbH # # This file is part of GPGME. # @@ -30,6 +30,10 @@ gpgme_data_set_file_name; gpgme_data_get_file_name; + + gpgme_sig_notation_clear; + gpgme_sig_notation_add; + gpgme_sig_notation_get; }; Modified: trunk/gpgme/ops.h =================================================================== --- trunk/gpgme/ops.h 2005-09-30 14:17:47 UTC (rev 1104) +++ trunk/gpgme/ops.h 2005-10-01 02:33:35 UTC (rev 1105) @@ -1,6 +1,6 @@ /* ops.h - Internal operation support. Copyright (C) 2000 Werner Koch (dd9jn) - Copyright (C) 2001, 2002, 2003, 2004 g10 Code GmbH + Copyright (C) 2001, 2002, 2003, 2004, 2005 g10 Code GmbH This file is part of GPGME. @@ -138,11 +138,26 @@ void *type_data); -/*-- version.c --*/ +/* From version.c. */ + /* Return true if MY_VERSION is at least REQ_VERSION, and false otherwise. */ int _gpgme_compare_versions (const char *my_version, const char *req_version); char *_gpgme_get_program_version (const char *const path); + +/* From sig-notation.c. */ + +/* Create a new, empty signature notation data object. */ +gpgme_error_t _gpgme_sig_notation_create (gpgme_sig_notation_t *notationp, + const char *name, int name_len, + const char *value, int value_len, + gpgme_sig_notation_flags_t flags); + +/* Free the signature notation object and all associated resources. + The object must already be removed from any linked list as the next + pointer is ignored. */ +void _gpgme_sig_notation_free (gpgme_sig_notation_t notation); + #endif /* OPS_H */ Modified: trunk/gpgme/rungpg.c =================================================================== --- trunk/gpgme/rungpg.c 2005-09-30 14:17:47 UTC (rev 1104) +++ trunk/gpgme/rungpg.c 2005-10-01 02:33:35 UTC (rev 1105) @@ -1256,6 +1256,91 @@ static gpgme_error_t +append_args_from_sig_notations (engine_gpg_t gpg, gpgme_ctx_t ctx /* FIXME */) +{ + gpgme_error_t err = 0; + gpgme_sig_notation_t notation; + + notation = gpgme_sig_notation_get (ctx); + + while (!err && notation) + { + if (notation->name + && !(notation->flags & GPGME_SIG_NOTATION_HUMAN_READABLE)) + err = gpg_error (GPG_ERR_INV_VALUE); + else if (notation->name) + { + char *arg; + + /* Maximum space needed is one byte for the "critical" flag, + the name, one byte for '=', the value, and a terminating + '\0'. */ + + arg = malloc (1 + notation->name_len + 1 + notation->value_len + 1); + if (!arg) + err = gpg_error_from_errno (errno); + + if (!err) + { + char *argp = arg; + + if (notation->critical) + *(argp++) = '!'; + + memcpy (argp, notation->name, notation->name_len); + argp += notation->name_len; + + *(argp++) = '='; + + /* We know that notation->name is '\0' terminated. */ + strcpy (argp, notation->value); + } + + if (!err) + err = add_arg (gpg, "--sig-notation"); + if (!err) + err = add_arg (gpg, arg); + + if (arg) + free (arg); + } + else + { + /* This is a policy URL. */ + + char *value; + + if (notation->critical) + { + value = malloc (1 + notation->value_len + 1); + if (!value) + err = gpg_error_from_errno (errno); + else + { + value[0] = '!'; + /* We know that notation->value is '\0' terminated. */ + strcpy (&value[1], notation->value); + } + } + else + value = notation->value; + + if (!err) + err = add_arg (gpg, "--sig-policy-url"); + if (!err) + err = add_arg (gpg, value); + + if (value != notation->value) + free (value); + } + + notation = notation->next; + } + return err; +} + + +static gpgme_error_t gpg_edit (void *engine, int type, gpgme_key_t key, gpgme_data_t out, gpgme_ctx_t ctx /* FIXME */) { @@ -1383,6 +1468,8 @@ if (!err) err = append_args_from_signers (gpg, ctx); + if (!err) + err = append_args_from_sig_notations (gpg, ctx); /* Tell the gpg object about the data. */ if (!err) @@ -1608,6 +1695,8 @@ if (!err) err = append_args_from_signers (gpg, ctx); + if (!err) + err = append_args_from_sig_notations (gpg, ctx); if (gpgme_data_get_file_name (in)) { Added: trunk/gpgme/sig-notation.c =================================================================== --- trunk/gpgme/sig-notation.c 2005-09-30 14:17:47 UTC (rev 1104) +++ trunk/gpgme/sig-notation.c 2005-10-01 02:33:35 UTC (rev 1105) @@ -0,0 +1,123 @@ +/* sig-notation.c - Signature notation data support. + Copyright (C) 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 + 02111-1307, USA. */ + +#if HAVE_CONFIG_H +#include +#endif +#include +#include +#include +#include + +#include "gpgme.h" +#include "util.h" +#include "context.h" +#include "ops.h" + + +/* Free the signature notation object and all associated resources. + The object must already be removed from any linked list as the next + pointer is ignored. */ +void +_gpgme_sig_notation_free (gpgme_sig_notation_t notation) +{ + if (notation->name) + free (notation->name); + + if (notation->value) + free (notation->value); + + free (notation); +} + + +/* Set the flags of NOTATION to FLAGS. */ +static void +sig_notation_set_flags (gpgme_sig_notation_t notation, + gpgme_sig_notation_flags_t flags) +{ + /* We copy the flags into individual bits to make them easier + accessible individually for the user. */ + notation->human_readable = flags & GPGME_SIG_NOTATION_HUMAN_READABLE ? 1 : 0; + notation->critical = flags & GPGME_SIG_NOTATION_CRITICAL ? 1 : 0; + + notation->flags = flags; +} + + +/* Create a new, empty signature notation data object. */ +gpgme_error_t +_gpgme_sig_notation_create (gpgme_sig_notation_t *notationp, + const char *name, int name_len, + const char *value, int value_len, + gpgme_sig_notation_flags_t flags) +{ + gpgme_error_t err = 0; + gpgme_sig_notation_t notation; + + /* Currently, we require all notations to be human-readable. */ + if (name && !(flags & GPGME_SIG_NOTATION_HUMAN_READABLE)) + return gpg_error (GPG_ERR_INV_VALUE); + + notation = calloc (1, sizeof (*notation)); + if (!notation) + return gpg_error_from_errno (errno); + + if (name_len) + { + /* We add a trailing '\0' for stringification in the good + case. */ + notation->name = malloc (name_len + 1); + if (!notation->name) + { + err = gpg_error_from_errno (errno); + goto err; + } + + memcpy (notation->name, name, name_len); + notation->name[name_len] = '\0'; + notation->name_len = name_len; + } + + if (value_len) + { + /* We add a trailing '\0' for stringification in the good + case. */ + notation->value = malloc (value_len + 1); + if (!notation->value) + { + err = gpg_error_from_errno (errno); + goto err; + } + + memcpy (notation->value, value, value_len); + notation->value[value_len] = '\0'; + notation->value_len = value_len; + } + + sig_notation_set_flags (notation, flags); + + *notationp = notation; + return 0; + + err: + _gpgme_sig_notation_free (notation); + return err; +} Modified: trunk/gpgme/verify.c =================================================================== --- trunk/gpgme/verify.c 2005-09-30 14:17:47 UTC (rev 1104) +++ trunk/gpgme/verify.c 2005-10-01 02:33:35 UTC (rev 1105) @@ -1,6 +1,6 @@ /* verify.c - Signature verification. Copyright (C) 2000 Werner Koch (dd9jn) - Copyright (C) 2001, 2002, 2003, 2004 g10 Code GmbH + Copyright (C) 2001, 2002, 2003, 2004, 2005 g10 Code GmbH This file is part of GPGME. @@ -58,10 +58,7 @@ { gpgme_sig_notation_t next_nota = notation->next; - if (notation->name) - free (notation->name); - if (notation->value) - free (notation->value); + _gpgme_sig_notation_free (notation); notation = next_nota; } @@ -431,51 +428,39 @@ previous one. The crypto backend misbehaves. */ return gpg_error (GPG_ERR_INV_ENGINE); - notation = malloc (sizeof (*sig)); - if (!notation) - return gpg_error_from_errno (errno); - notation->next = NULL; + err = _gpgme_sig_notation_create (¬ation, NULL, 0, NULL, 0, 0); + if (err) + return err; if (code == GPGME_STATUS_NOTATION_NAME) { - int len = strlen (args) + 1; - - notation->name = malloc (len); - if (!notation->name) - { - int saved_errno = errno; - free (notation); - return gpg_error_from_errno (saved_errno); - } - err = _gpgme_decode_percent_string (args, ¬ation->name, len); + err = _gpgme_decode_percent_string (args, ¬ation->name, 0); if (err) { - free (notation->name); - free (notation); + _gpgme_sig_notation_free (notation); return err; } - notation->value = NULL; + notation->name_len = strlen (notation->name); + + /* FIXME: For now we fake the human-readable flag. The + critical flag can not be reported as it is not + provided. */ + notation->flags = GPGME_SIG_NOTATION_HUMAN_READABLE; + notation->human_readable = 1; } else { - int len = strlen (args) + 1; + /* This is a policy URL. */ - notation->name = NULL; - notation->value = malloc (len); - if (!notation->value) - { - int saved_errno = errno; - free (notation); - return gpg_error_from_errno (saved_errno); - } - err = _gpgme_decode_percent_string (args, ¬ation->value, len); + err = _gpgme_decode_percent_string (args, ¬ation->value, 0); if (err) { - free (notation->value); - free (notation); + _gpgme_sig_notation_free (notation); return err; } + + notation->value_len = strlen (notation->value); } *lastp = notation; } @@ -515,6 +500,8 @@ err = _gpgme_decode_percent_string (args, &dest, len); if (err) return err; + + notation->value_len += strlen (dest); } else return gpg_error (GPG_ERR_INV_ENGINE); Modified: trunk/tests/ChangeLog =================================================================== --- trunk/tests/ChangeLog 2005-09-30 14:17:47 UTC (rev 1104) +++ trunk/tests/ChangeLog 2005-10-01 02:33:35 UTC (rev 1105) @@ -1,3 +1,11 @@ +2005-10-01 Marcus Brinkmann + + * gpg/Makefile.am (TESTS): Add t-sig-notation. + * gpg/t-sig-notation.c (check_result): New file. + * gpg/t-verify.c (check_result): Also check the length of the + notation data. + * gpg/gpg.conf: New file. + 2005-09-30 Marcus Brinkmann * gpg/Makefile.am (TESTS): Add t-filename. Modified: trunk/tests/gpg/Makefile.am =================================================================== --- trunk/tests/gpg/Makefile.am 2005-09-30 14:17:47 UTC (rev 1104) +++ trunk/tests/gpg/Makefile.am 2005-10-01 02:33:35 UTC (rev 1105) @@ -26,7 +26,7 @@ # The keylist tests must come after the import and the edit test. noinst_HEADERS = t-support.h TESTS = t-encrypt t-encrypt-sym t-encrypt-sign t-sign t-signers \ - t-decrypt t-verify t-decrypt-verify \ + t-decrypt t-verify t-decrypt-verify t-sig-notation \ t-export t-import t-trustlist t-eventloop t-edit \ t-keylist t-keylist-sig t-thread1 t-wait t-encrypt-large \ t-file-name Added: trunk/tests/gpg/gpg.conf =================================================================== --- trunk/tests/gpg/gpg.conf 2005-09-30 14:17:47 UTC (rev 1104) +++ trunk/tests/gpg/gpg.conf 2005-10-01 02:33:35 UTC (rev 1105) @@ -0,0 +1,27 @@ +# Options for GnuPG +# Copyright 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. +# +# This file is free software; as a special exception the author gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. +# +# This file is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# +# Unless you specify which option file to use (with the command line +# option "--options filename"), GnuPG uses the file ~/.gnupg/gpg.conf +# by default. +# +# An options file can contain any long options which are available in +# GnuPG. If the first non white space character of a line is a '#', +# this line is ignored. Empty lines are also ignored. +# +# See the man page for a list of options. + +# By default GnuPG creates version 3 signatures for data files. This +# is not strictly OpenPGP compliant but PGP 6 and most versions of PGP +# 7 require them. To disable this behavior, you may use this option +# or --openpgp. + +no-force-v3-sigs Added: trunk/tests/gpg/t-sig-notation.c =================================================================== --- trunk/tests/gpg/t-sig-notation.c 2005-09-30 14:17:47 UTC (rev 1104) +++ trunk/tests/gpg/t-sig-notation.c 2005-10-01 02:33:35 UTC (rev 1105) @@ -0,0 +1,166 @@ +/* t-sig-notation.c - Regression test. + Copyright (C) 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 + 02111-1307, USA. */ + +/* We need to include config.h so that we know whether we are building + with large file system (LFS) support. */ +#ifdef HAVE_CONFIG_H +#include +#endif + +#include +#include +#include + +#include + +#include "t-support.h" + + +static struct { + const char *name; + const char *value; + gpgme_sig_notation_flags_t flags; + int seen; +} expected_notations[] = { + { "laughing@me", + "Just Squeeze Me", + GPGME_SIG_NOTATION_HUMAN_READABLE }, + { "leave@home", + "Right Now", + GPGME_SIG_NOTATION_HUMAN_READABLE | GPGME_SIG_NOTATION_CRITICAL }, + { NULL, + "http://www.gnu.org/policy/", + 0 } +}; + +static void +check_result (gpgme_verify_result_t result) +{ + int i; + gpgme_sig_notation_t r; + + gpgme_signature_t sig; + + sig = result->signatures; + if (!sig || sig->next) + { + fprintf (stderr, "%s:%i: Unexpected number of signatures\n", + __FILE__, __LINE__); + exit (1); + } + + for (i=0; i < DIM(expected_notations); i++ ) + expected_notations[i].seen = 0; + + for (r = result->signatures->notations; r; r = r->next) + { + int any = 0; + for (i=0; i < DIM(expected_notations); i++) + { + if ( ((r->name && expected_notations[i].name + && !strcmp (r->name, expected_notations[i].name) + && r->name_len + == strlen (expected_notations[i].name)) + || (!r->name && !expected_notations[i].name + && r->name_len == 0)) + && r->value + && !strcmp (r->value, expected_notations[i].value) + && r->value_len == strlen (expected_notations[i].value) + && r->flags + == (expected_notations[i].flags & ~GPGME_SIG_NOTATION_CRITICAL) + && r->human_readable + == !!(r->flags & GPGME_SIG_NOTATION_HUMAN_READABLE) + && r->critical == 0) + { + expected_notations[i].seen++; + any++; + } + } + if (!any) + { + fprintf (stderr, "%s:%i: Unexpected notation data\n", + __FILE__, __LINE__); + exit (1); + } + } + for (i=0; i < DIM(expected_notations); i++ ) + { + if (expected_notations[i].seen != 1) + { + fprintf (stderr, "%s:%i: Missing or duplicate notation data\n", + __FILE__, __LINE__); + exit (1); + } + } +} + + +int +main (int argc, char *argv[]) +{ + gpgme_ctx_t ctx; + gpgme_error_t err; + gpgme_data_t in, out; + gpgme_verify_result_t result; + char *agent_info; + int i; + + init_gpgme (GPGME_PROTOCOL_OpenPGP); + + err = gpgme_new (&ctx); + fail_if_err (err); + + agent_info = getenv ("GPG_AGENT_INFO"); + if (!(agent_info && strchr (agent_info, ':'))) + gpgme_set_passphrase_cb (ctx, passphrase_cb, NULL); + + err = gpgme_data_new_from_mem (&in, "Hallo Leute\n", 12, 0); + fail_if_err (err); + err = gpgme_data_new (&out); + fail_if_err (err); + + for (i = 0; i < sizeof (expected_notations) / sizeof (expected_notations[0]); + i++) + { + err = gpgme_sig_notation_add (ctx, expected_notations[i].name, + expected_notations[i].value, + expected_notations[i].flags); + fail_if_err (err); + } + + err = gpgme_op_sign (ctx, in, out, GPGME_SIG_MODE_NORMAL); + fail_if_err (err); + + gpgme_data_release (in); + err = gpgme_data_new (&in); + fail_if_err (err); + + gpgme_data_seek (out, 0, SEEK_SET); + + err = gpgme_op_verify (ctx, out, NULL, in); + fail_if_err (err); + result = gpgme_op_verify_result (ctx); + check_result (result); + + gpgme_data_release (in); + gpgme_data_release (out); + gpgme_release (ctx); + return 0; +} Modified: trunk/tests/gpg/t-verify.c =================================================================== --- trunk/tests/gpg/t-verify.c 2005-09-30 14:17:47 UTC (rev 1104) +++ trunk/tests/gpg/t-verify.c 2005-10-01 02:33:35 UTC (rev 1105) @@ -136,10 +136,14 @@ for (i=0; i < DIM(expected_notations); i++) { if ( ((r->name && expected_notations[i].name - && !strcmp (r->name, expected_notations[i].name)) - || (!r->name && !expected_notations[i].name)) + && !strcmp (r->name, expected_notations[i].name) + && r->name_len + == strlen (expected_notations[i].name)) + || (!r->name && !expected_notations[i].name + && r->name_len == 0)) && r->value - && !strcmp (r->value, expected_notations[i].value)) + && !strcmp (r->value, expected_notations[i].value) + && r->value_len == strlen (expected_notations[i].value)) { expected_notations[i].seen++; any++; From cvs at cvs.gnupg.org Sat Oct 1 14:34:34 2005 From: cvs at cvs.gnupg.org (svn author mo) Date: Sat Oct 1 14:06:14 2005 Subject: [svn] gcry - r1107 - trunk/src Message-ID: Author: mo Date: 2005-10-01 14:34:34 +0200 (Sat, 01 Oct 2005) New Revision: 1107 Modified: trunk/src/ChangeLog trunk/src/ath.c Log: 2005-10-01 Moritz Schulte * ath.c: Assign copyright to FSF. * ath.h: Likewise. Modified: trunk/src/ChangeLog =================================================================== --- trunk/src/ChangeLog 2005-09-15 17:51:14 UTC (rev 1106) +++ trunk/src/ChangeLog 2005-10-01 12:34:34 UTC (rev 1107) @@ -1,3 +1,8 @@ +2005-10-01 Moritz Schulte + + * ath.c: Assign copyright to FSF. + * ath.h: Likewise. + 2005-06-25 Moritz Schulte * Makefile.am (pkgconfigdir, pkgconfig_DATA): Removed variables. Modified: trunk/src/ath.c =================================================================== --- trunk/src/ath.c 2005-09-15 17:51:14 UTC (rev 1106) +++ trunk/src/ath.c 2005-10-01 12:34:34 UTC (rev 1107) @@ -1,5 +1,5 @@ /* ath.c - Thread-safeness library. - Copyright (C) 2002, 2003, 2004 g10 Code GmbH + Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. This file is part of Libgcrypt. From cvs at cvs.gnupg.org Sat Oct 1 14:35:18 2005 From: cvs at cvs.gnupg.org (svn author mo) Date: Sat Oct 1 14:06:58 2005 Subject: [svn] gcry - r1108 - trunk/src Message-ID: Author: mo Date: 2005-10-01 14:35:17 +0200 (Sat, 01 Oct 2005) New Revision: 1108 Modified: trunk/src/ath.h Log: Modified: trunk/src/ath.h =================================================================== --- trunk/src/ath.h 2005-10-01 12:34:34 UTC (rev 1107) +++ trunk/src/ath.h 2005-10-01 12:35:17 UTC (rev 1108) @@ -1,5 +1,5 @@ /* ath.h - Thread-safeness library. - Copyright (C) 2002, 2003, 2004 g10 Code GmbH + Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. This file is part of Libgcrypt. From cvs at cvs.gnupg.org Sat Oct 1 21:22:21 2005 From: cvs at cvs.gnupg.org (svn author marcus) Date: Sat Oct 1 20:54:01 2005 Subject: [svn] gpgme - r1106 - in trunk/tests: . gpg Message-ID: Author: marcus Date: 2005-10-01 21:22:16 +0200 (Sat, 01 Oct 2005) New Revision: 1106 Modified: trunk/tests/ChangeLog trunk/tests/gpg/Makefile.am Log: 2005-10-01 Marcus Brinkmann * gpg/Makefile.am (EXTRA_DIST): Add gpg.conf. Modified: trunk/tests/ChangeLog =================================================================== --- trunk/tests/ChangeLog 2005-10-01 02:33:35 UTC (rev 1105) +++ trunk/tests/ChangeLog 2005-10-01 19:22:16 UTC (rev 1106) @@ -1,5 +1,7 @@ 2005-10-01 Marcus Brinkmann + * gpg/Makefile.am (EXTRA_DIST): Add gpg.conf. + * gpg/Makefile.am (TESTS): Add t-sig-notation. * gpg/t-sig-notation.c (check_result): New file. * gpg/t-verify.c (check_result): Also check the length of the Modified: trunk/tests/gpg/Makefile.am =================================================================== --- trunk/tests/gpg/Makefile.am 2005-10-01 02:33:35 UTC (rev 1105) +++ trunk/tests/gpg/Makefile.am 2005-10-01 19:22:16 UTC (rev 1106) @@ -35,7 +35,7 @@ DISTCLEANFILES = pubring.gpg~ random_seed EXTRA_DIST = mkdemodirs pubdemo.asc secdemo.asc cipher-1.asc cipher-2.asc \ - geheim.txt pubkey-1.asc seckey-1.asc + geheim.txt pubkey-1.asc seckey-1.asc gpg.conf INCLUDES = -I$(top_srcdir)/gpgme From cvs at cvs.gnupg.org Sat Oct 1 21:49:49 2005 From: cvs at cvs.gnupg.org (svn author marcus) Date: Sat Oct 1 21:21:25 2005 Subject: [svn] assuan - r189 - trunk/src Message-ID: Author: marcus Date: 2005-10-01 21:49:48 +0200 (Sat, 01 Oct 2005) New Revision: 189 Modified: trunk/src/ChangeLog trunk/src/assuan-client.c trunk/src/assuan-inquire.c trunk/src/assuan-util.c Log: 2005-10-01 Marcus Brinkmann * assuan-client.c (assuan_transact): Change LINE, S and D from unsigned char * to char * to silence gcc warning. * assuan-util.c (_assuan_log_sanitized_string): Add explicit cast to silence gcc warning. * assuan-inquire.c (assuan_inquire): Likewise. Modified: trunk/src/ChangeLog =================================================================== --- trunk/src/ChangeLog 2005-09-08 16:02:36 UTC (rev 188) +++ trunk/src/ChangeLog 2005-10-01 19:49:48 UTC (rev 189) @@ -1,3 +1,11 @@ +2005-10-01 Marcus Brinkmann + + * assuan-client.c (assuan_transact): Change LINE, S and D from + unsigned char * to char * to silence gcc warning. + * assuan-util.c (_assuan_log_sanitized_string): Add explicit cast + to silence gcc warning. + * assuan-inquire.c (assuan_inquire): Likewise. + 2005-09-08 Marcus Brinkmann * assuan-pipe-connect.c (assuan_pipe_connect2): Add missing Modified: trunk/src/assuan-client.c =================================================================== --- trunk/src/assuan-client.c 2005-09-08 16:02:36 UTC (rev 188) +++ trunk/src/assuan-client.c 2005-10-01 19:49:48 UTC (rev 189) @@ -1,5 +1,5 @@ /* assuan-client.c - client functions - * Copyright (C) 2001, 2002 Free Software Foundation, Inc. + * Copyright (C) 2001, 2002, 2005 Free Software Foundation, Inc. * * This file is part of Assuan. * @@ -137,7 +137,7 @@ void *status_cb_arg) { int rc, okay, off; - unsigned char *line; + char *line; int linelen; rc = assuan_write_line (ctx, command); @@ -167,7 +167,7 @@ rc = ASSUAN_No_Data_Callback; else { - unsigned char *s, *d; + char *s, *d; for (s=d=line; linelen; linelen--) { Modified: trunk/src/assuan-inquire.c =================================================================== --- trunk/src/assuan-inquire.c 2005-09-08 16:02:36 UTC (rev 188) +++ trunk/src/assuan-inquire.c 2005-10-01 19:49:48 UTC (rev 189) @@ -1,5 +1,5 @@ /* assuan-inquire.c - handle inquire stuff - * Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. + * Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. * * This file is part of Assuan. * @@ -173,7 +173,7 @@ rc = _assuan_read_line (ctx); if (rc) goto leave; - line = ctx->inbound.line; + line = (unsigned char *) ctx->inbound.line; linelen = ctx->inbound.linelen; } while (*line == '#' || !linelen); Modified: trunk/src/assuan-util.c =================================================================== --- trunk/src/assuan-util.c 2005-09-08 16:02:36 UTC (rev 188) +++ trunk/src/assuan-util.c 2005-10-01 19:49:48 UTC (rev 189) @@ -202,7 +202,7 @@ void _assuan_log_sanitized_string (const char *string) { - const unsigned char *s = string; + const unsigned char *s = (const unsigned char *) string; FILE *fp = assuan_get_assuan_log_stream (); if (! *s) From cvs at cvs.gnupg.org Sat Oct 1 21:51:27 2005 From: cvs at cvs.gnupg.org (svn author marcus) Date: Sat Oct 1 21:23:04 2005 Subject: [svn] gpgme - r1107 - trunk/assuan Message-ID: Author: marcus Date: 2005-10-01 21:51:27 +0200 (Sat, 01 Oct 2005) New Revision: 1107 Modified: trunk/assuan/ChangeLog trunk/assuan/assuan-client.c trunk/assuan/assuan-inquire.c trunk/assuan/assuan-util.c Log: 2005-10-01 Marcus Brinkmann * assuan-client.c (assuan_transact): Change LINE, S and D from unsigned char * to char * to silence gcc warning. * assuan-util.c (_assuan_log_sanitized_string): Add explicit cast to silence gcc warning. * assuan-inquire.c (assuan_inquire): Likewise. Modified: trunk/assuan/ChangeLog =================================================================== --- trunk/assuan/ChangeLog 2005-10-01 19:22:16 UTC (rev 1106) +++ trunk/assuan/ChangeLog 2005-10-01 19:51:27 UTC (rev 1107) @@ -1,3 +1,11 @@ +2005-10-01 Marcus Brinkmann + + * assuan-client.c (assuan_transact): Change LINE, S and D from + unsigned char * to char * to silence gcc warning. + * assuan-util.c (_assuan_log_sanitized_string): Add explicit cast + to silence gcc warning. + * assuan-inquire.c (assuan_inquire): Likewise. + 2005-08-19 Werner Koch * funopen.c, assuan-socket.c: Copied from libassuan CVS. Modified: trunk/assuan/assuan-client.c =================================================================== --- trunk/assuan/assuan-client.c 2005-10-01 19:22:16 UTC (rev 1106) +++ trunk/assuan/assuan-client.c 2005-10-01 19:51:27 UTC (rev 1107) @@ -1,5 +1,5 @@ /* assuan-client.c - client functions - * Copyright (C) 2001, 2002 Free Software Foundation, Inc. + * Copyright (C) 2001, 2002, 2005 Free Software Foundation, Inc. * * This file is part of Assuan. * @@ -137,7 +137,7 @@ void *status_cb_arg) { int rc, okay, off; - unsigned char *line; + char *line; int linelen; rc = assuan_write_line (ctx, command); @@ -167,7 +167,7 @@ rc = ASSUAN_No_Data_Callback; else { - unsigned char *s, *d; + char *s, *d; for (s=d=line; linelen; linelen--) { Modified: trunk/assuan/assuan-inquire.c =================================================================== --- trunk/assuan/assuan-inquire.c 2005-10-01 19:22:16 UTC (rev 1106) +++ trunk/assuan/assuan-inquire.c 2005-10-01 19:51:27 UTC (rev 1107) @@ -1,5 +1,5 @@ /* assuan-inquire.c - handle inquire stuff - * Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. + * Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. * * This file is part of Assuan. * @@ -173,7 +173,7 @@ rc = _assuan_read_line (ctx); if (rc) goto leave; - line = ctx->inbound.line; + line = (unsigned char *) ctx->inbound.line; linelen = ctx->inbound.linelen; } while (*line == '#' || !linelen); Modified: trunk/assuan/assuan-util.c =================================================================== --- trunk/assuan/assuan-util.c 2005-10-01 19:22:16 UTC (rev 1106) +++ trunk/assuan/assuan-util.c 2005-10-01 19:51:27 UTC (rev 1107) @@ -202,7 +202,7 @@ void _assuan_log_sanitized_string (const char *string) { - const unsigned char *s = string; + const unsigned char *s = (const unsigned char *) string; FILE *fp = assuan_get_assuan_log_stream (); if (! *s) From cvs at cvs.gnupg.org Sat Oct 1 22:15:46 2005 From: cvs at cvs.gnupg.org (svn author marcus) Date: Sat Oct 1 21:47:35 2005 Subject: [svn] assuan - r190 - trunk/src Message-ID: Author: marcus Date: 2005-10-01 22:15:45 +0200 (Sat, 01 Oct 2005) New Revision: 190 Modified: trunk/src/ChangeLog trunk/src/assuan-pipe-connect.c trunk/src/assuan.h Log: 2005-10-01 Marcus Brinkmann * assuan.h (assuan_pipe_connect, assuan_pipe_connect2): Make type of ARGV parameter const in prototype. * assuan-pipe-connect.c (assuan_pipe_connect, assuan_pipe_connect2): Likewise in declaration. (assuan_pipe_connect2): Add braindead cast to make execv happy. Modified: trunk/src/ChangeLog =================================================================== --- trunk/src/ChangeLog 2005-10-01 19:49:48 UTC (rev 189) +++ trunk/src/ChangeLog 2005-10-01 20:15:45 UTC (rev 190) @@ -1,5 +1,11 @@ 2005-10-01 Marcus Brinkmann + * assuan.h (assuan_pipe_connect, assuan_pipe_connect2): Make type + of ARGV parameter const in prototype. + * assuan-pipe-connect.c (assuan_pipe_connect, + assuan_pipe_connect2): Likewise in declaration. + (assuan_pipe_connect2): Add braindead cast to make execv happy. + * assuan-client.c (assuan_transact): Change LINE, S and D from unsigned char * to char * to silence gcc warning. * assuan-util.c (_assuan_log_sanitized_string): Add explicit cast Modified: trunk/src/assuan-pipe-connect.c =================================================================== --- trunk/src/assuan-pipe-connect.c 2005-10-01 19:49:48 UTC (rev 189) +++ trunk/src/assuan-pipe-connect.c 2005-10-01 20:15:45 UTC (rev 190) @@ -1,5 +1,5 @@ /* assuan-pipe-connect.c - Establish a pipe connection (client) - * Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. + * Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. * * This file is part of Assuan. * @@ -245,7 +245,7 @@ function should only act if the second value is 0. */ assuan_error_t assuan_pipe_connect2 (assuan_context_t *ctx, - const char *name, char *const argv[], + const char *name, const char *const argv[], int *fd_child_list, void (*atfork) (void *opaque, int reserved), void *atforkvalue) @@ -554,7 +554,7 @@ initialized. */ setenv ("_assuan_pipe_connect_pid", mypidstr, 1); - execv (name, argv); + execv (name, (char *const *) argv); /* oops - use the pipe to tell the parent about it */ snprintf (errbuf, sizeof(errbuf)-1, "ERR %d can't exec `%s': %.50s\n", @@ -612,8 +612,8 @@ vector in ARGV. FD_CHILD_LIST is a -1 terminated list of file descriptors not to close in the child. */ assuan_error_t -assuan_pipe_connect (assuan_context_t *ctx, const char *name, char *const argv[], - int *fd_child_list) +assuan_pipe_connect (assuan_context_t *ctx, const char *name, + const char *const argv[], int *fd_child_list) { return assuan_pipe_connect2 (ctx, name, argv, fd_child_list, NULL, NULL); } Modified: trunk/src/assuan.h =================================================================== --- trunk/src/assuan.h 2005-10-01 19:49:48 UTC (rev 189) +++ trunk/src/assuan.h 2005-10-01 20:15:45 UTC (rev 190) @@ -332,9 +332,11 @@ /*-- assuan-pipe-connect.c --*/ assuan_error_t assuan_pipe_connect (assuan_context_t *ctx, const char *name, - char *const argv[], int *fd_child_list); + const char *const argv[], + int *fd_child_list); assuan_error_t assuan_pipe_connect2 (assuan_context_t *ctx, const char *name, - char *const argv[], int *fd_child_list, + const char *const argv[], + int *fd_child_list, void (*atfork) (void*, int), void *atforkvalue); /*-- assuan-socket-connect.c --*/ From cvs at cvs.gnupg.org Sat Oct 1 22:17:04 2005 From: cvs at cvs.gnupg.org (svn author marcus) Date: Sat Oct 1 21:48:41 2005 Subject: [svn] gpgme - r1108 - trunk/assuan Message-ID: Author: marcus Date: 2005-10-01 22:17:03 +0200 (Sat, 01 Oct 2005) New Revision: 1108 Modified: trunk/assuan/ChangeLog trunk/assuan/assuan-pipe-connect.c trunk/assuan/assuan.h Log: 2005-10-01 Marcus Brinkmann * assuan.h (assuan_pipe_connect, assuan_pipe_connect2): Make type of ARGV parameter const in prototype. * assuan-pipe-connect.c (assuan_pipe_connect, assuan_pipe_connect2): Likewise in declaration. (assuan_pipe_connect2): Add braindead cast to make execv happy. Modified: trunk/assuan/ChangeLog =================================================================== --- trunk/assuan/ChangeLog 2005-10-01 19:51:27 UTC (rev 1107) +++ trunk/assuan/ChangeLog 2005-10-01 20:17:03 UTC (rev 1108) @@ -1,5 +1,11 @@ 2005-10-01 Marcus Brinkmann + * assuan.h (assuan_pipe_connect, assuan_pipe_connect2): Make type + of ARGV parameter const in prototype. + * assuan-pipe-connect.c (assuan_pipe_connect, + assuan_pipe_connect2): Likewise in declaration. + (assuan_pipe_connect2): Add braindead cast to make execv happy. + * assuan-client.c (assuan_transact): Change LINE, S and D from unsigned char * to char * to silence gcc warning. * assuan-util.c (_assuan_log_sanitized_string): Add explicit cast Modified: trunk/assuan/assuan-pipe-connect.c =================================================================== --- trunk/assuan/assuan-pipe-connect.c 2005-10-01 19:51:27 UTC (rev 1107) +++ trunk/assuan/assuan-pipe-connect.c 2005-10-01 20:17:03 UTC (rev 1108) @@ -1,5 +1,5 @@ /* assuan-pipe-connect.c - Establish a pipe connection (client) - * Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. + * Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. * * This file is part of Assuan. * @@ -245,7 +245,7 @@ function should only act if the second value is 0. */ assuan_error_t assuan_pipe_connect2 (assuan_context_t *ctx, - const char *name, char *const argv[], + const char *name, const char *const argv[], int *fd_child_list, void (*atfork) (void *opaque, int reserved), void *atforkvalue) @@ -554,7 +554,7 @@ initialized. */ setenv ("_assuan_pipe_connect_pid", mypidstr, 1); - execv (name, argv); + execv (name, (char *const *) argv); /* oops - use the pipe to tell the parent about it */ snprintf (errbuf, sizeof(errbuf)-1, "ERR %d can't exec `%s': %.50s\n", @@ -612,8 +612,8 @@ vector in ARGV. FD_CHILD_LIST is a -1 terminated list of file descriptors not to close in the child. */ assuan_error_t -assuan_pipe_connect (assuan_context_t *ctx, const char *name, char *const argv[], - int *fd_child_list) +assuan_pipe_connect (assuan_context_t *ctx, const char *name, + const char *const argv[], int *fd_child_list) { return assuan_pipe_connect2 (ctx, name, argv, fd_child_list, NULL, NULL); } Modified: trunk/assuan/assuan.h =================================================================== --- trunk/assuan/assuan.h 2005-10-01 19:51:27 UTC (rev 1107) +++ trunk/assuan/assuan.h 2005-10-01 20:17:03 UTC (rev 1108) @@ -365,9 +365,11 @@ /*-- assuan-pipe-connect.c --*/ assuan_error_t assuan_pipe_connect (assuan_context_t *ctx, const char *name, - char *const argv[], int *fd_child_list); + const char *const argv[], + int *fd_child_list); assuan_error_t assuan_pipe_connect2 (assuan_context_t *ctx, const char *name, - char *const argv[], int *fd_child_list, + const char *const argv[], + int *fd_child_list, void (*atfork) (void*, int), void *atforkvalue); /*-- assuan-socket-connect.c --*/ From cvs at cvs.gnupg.org Sat Oct 1 22:28:58 2005 From: cvs at cvs.gnupg.org (svn author mo) Date: Sat Oct 1 22:00:35 2005 Subject: [svn] gcry - r1109 - branches Message-ID: Author: mo Date: 2005-10-01 22:28:57 +0200 (Sat, 01 Oct 2005) New Revision: 1109 Added: branches/LIBGCRYPT-2.0-MO/ Log: New branch, containing Moritz' bleeding edge code, which might become Libgcrypt-2.0 one day. Copied: branches/LIBGCRYPT-2.0-MO (from rev 1108, trunk) From cvs at cvs.gnupg.org Sat Oct 1 22:31:17 2005 From: cvs at cvs.gnupg.org (svn author mo) Date: Sat Oct 1 22:02:54 2005 Subject: [svn] gcry - r1110 - branches/LIBGCRYPT-2.0-MO Message-ID: Author: mo Date: 2005-10-01 22:31:17 +0200 (Sat, 01 Oct 2005) New Revision: 1110 Removed: branches/LIBGCRYPT-2.0-MO/cipher/ Log: From cvs at cvs.gnupg.org Sat Oct 1 22:31:43 2005 From: cvs at cvs.gnupg.org (svn author mo) Date: Sat Oct 1 22:03:20 2005 Subject: [svn] gcry - r1111 - branches/LIBGCRYPT-2.0-MO Message-ID: Author: mo Date: 2005-10-01 22:31:43 +0200 (Sat, 01 Oct 2005) New Revision: 1111 Removed: branches/LIBGCRYPT-2.0-MO/mpi/ branches/LIBGCRYPT-2.0-MO/w32-dll/ Log: From cvs at cvs.gnupg.org Sat Oct 1 22:33:05 2005 From: cvs at cvs.gnupg.org (svn author mo) Date: Sat Oct 1 22:04:43 2005 Subject: [svn] gcry - r1112 - branches/LIBGCRYPT-2.0-MO Message-ID: Author: mo Date: 2005-10-01 22:33:05 +0200 (Sat, 01 Oct 2005) New Revision: 1112 Removed: branches/LIBGCRYPT-2.0-MO/Notes-wk branches/LIBGCRYPT-2.0-MO/README.apichanges branches/LIBGCRYPT-2.0-MO/autogen.sh branches/LIBGCRYPT-2.0-MO/compile branches/LIBGCRYPT-2.0-MO/config.guess branches/LIBGCRYPT-2.0-MO/config.sub branches/LIBGCRYPT-2.0-MO/install-sh branches/LIBGCRYPT-2.0-MO/ltmain.sh branches/LIBGCRYPT-2.0-MO/missing branches/LIBGCRYPT-2.0-MO/mkinstalldirs branches/LIBGCRYPT-2.0-MO/stamp-h.in Log: Deleted: branches/LIBGCRYPT-2.0-MO/Notes-wk Deleted: branches/LIBGCRYPT-2.0-MO/README.apichanges Deleted: branches/LIBGCRYPT-2.0-MO/autogen.sh Deleted: branches/LIBGCRYPT-2.0-MO/compile Deleted: branches/LIBGCRYPT-2.0-MO/config.guess Deleted: branches/LIBGCRYPT-2.0-MO/config.sub Deleted: branches/LIBGCRYPT-2.0-MO/install-sh Deleted: branches/LIBGCRYPT-2.0-MO/ltmain.sh Deleted: branches/LIBGCRYPT-2.0-MO/missing Deleted: branches/LIBGCRYPT-2.0-MO/mkinstalldirs Deleted: branches/LIBGCRYPT-2.0-MO/stamp-h.in From cvs at cvs.gnupg.org Sat Oct 1 22:38:02 2005 From: cvs at cvs.gnupg.org (svn author mo) Date: Sat Oct 1 22:09:40 2005 Subject: [svn] gcry - r1113 - branches/LIBGCRYPT-2.0-MO Message-ID: Author: mo Date: 2005-10-01 22:38:02 +0200 (Sat, 01 Oct 2005) New Revision: 1113 Modified: branches/LIBGCRYPT-2.0-MO/ChangeLog branches/LIBGCRYPT-2.0-MO/Makefile.am branches/LIBGCRYPT-2.0-MO/configure.ac Log: 2005-10-01 Moritz Schulte * Makefile.am: Adjust directory specifications to new source-tree layout. 2005-09-21 Moritz Schulte * configure.ac: Check for threading libraries in order to allow the test suite to enable threading. Adjust paths for new source tree layout. Bump version number up to 2.0.0-cvs. Modified: branches/LIBGCRYPT-2.0-MO/ChangeLog =================================================================== --- branches/LIBGCRYPT-2.0-MO/ChangeLog 2005-10-01 20:33:05 UTC (rev 1112) +++ branches/LIBGCRYPT-2.0-MO/ChangeLog 2005-10-01 20:38:02 UTC (rev 1113) @@ -1,3 +1,15 @@ +2005-10-01 Moritz Schulte + + * Makefile.am: Adjust directory specifications to new source-tree + layout. + +2005-09-21 Moritz Schulte + + * configure.ac: Check for threading libraries in order to allow + the test suite to enable threading. + Adjust paths for new source tree layout. + Bump version number up to 2.0.0-cvs. + 2005-09-15 Moritz Schulte * Makefile.am (EXTRA_DIST): Depend on README.SVN, not on README.CVS. @@ -16,10 +28,10 @@ * acinclude.m4 (TYPE_SOCKLEN_T): New type definition test; provided by Albert Chin. - * configure.ac: Don't use $(CMD) as it's not portable; use CMD in - backticks instead. Simpler -lnsl/-lsocket test. Use - TYPE_SOCKLEN_T test. Don't forget to set `random_modules' - correctly. + * configure.ac: Don't use $(CMD) as it's not portable; use `CMD` nstead. + Simpler -lnsl/-lsocket test. + Use TYPE_SOCKLEN_T test. + Don't forget to set `random_modules' correctly. 2005-04-22 Moritz Schulte @@ -550,9 +562,9 @@ * acinclude.m4, configure.in (GNUPG_CHECK_GNUMAKE): New. - * acinclude.m4 (MKDIR_TAKES_ONE_ARG): Check some headers. By Gaël Quéri. + * acinclude.m4 (MKDIR_TAKES_ONE_ARG): Check some headers. By Gaël Quéri. - * configure.in (AM_INIT_AUTOMAKE): Use this now. By Gaël. + * configure.in (AM_INIT_AUTOMAKE): Use this now. By Gaël. * acinclude.m4 (GNUPG_CHECK_EXPORTDYNAMIC): Replacement for GNUPG_CHECK_RDYNAMIC which should handle gcc with non GNU ld nicer. @@ -570,7 +582,7 @@ * configure.in (ALL_LINGUAS): Add sv and ja. * configure.in: Use /usr/local for CFLAGS and LDFLAGS when - target is freebsd. By Rémi. + target is freebsd. By Rémi. * configure.in: Do not set development version when the version has a dash in it. Suggested by Dave Dykstra. @@ -608,7 +620,7 @@ Mon Jan 31 17:46:35 CET 2000 Werner Koch - * Makefile.am: Re-added tools. By Rémi. + * Makefile.am: Re-added tools. By Rémi. Mon Jan 31 16:37:34 CET 2000 Werner Koch @@ -860,7 +872,7 @@ * config.links (m68k-atari-mint): New -Tue Jan 12 09:17:19 CET 1999 Gaël Quéri +Tue Jan 12 09:17:19 CET 1999 Gaël Quéri * all: Fixed typos all over the place Modified: branches/LIBGCRYPT-2.0-MO/Makefile.am =================================================================== --- branches/LIBGCRYPT-2.0-MO/Makefile.am 2005-10-01 20:33:05 UTC (rev 1112) +++ branches/LIBGCRYPT-2.0-MO/Makefile.am 2005-10-01 20:38:02 UTC (rev 1113) @@ -1,28 +1,6 @@ -## Process this file with automake to produce Makefile.in -# Copyright (C) 1992, 1999, 2000, 2002 Free Software Foundation, Inc. -# -# This file is part of Libgcrypt. -# -# Libgcrypt 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. -# -# Libgcrypt 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 02111-1307, USA - -ACLOCAL_AMFLAGS = -I m4 -AUTOMAKE_OPTIONS = dist-bzip2 - -DIST_SUBDIRS = mpi cipher src doc tests w32-dll -SUBDIRS = mpi cipher src doc tests -EXTRA_DIST = BUGS autogen.sh README.apichanges README.SVN +DIST_SUBDIRS = src doc tests +SUBDIRS = src doc tests +EXTRA_DIST = BUGS autogen.sh DESIGN DISTCLEANFILES = @@ -32,7 +10,7 @@ dist-hook: @set -e; \ for file in `cd $(top_srcdir); \ - find mpi -type f -name distfiles`; do \ + find . -type f -name distfiles`; do \ dir=`dirname $$file` ; $(mkinstalldirs) $(distdir)/$$dir ; \ for i in distfiles `cat $(top_srcdir)/$$file` ; do \ ln $(top_srcdir)/$$dir/$$i $(distdir)/$$dir/$$i 2> /dev/null \ @@ -41,8 +19,3 @@ done @set -e; \ echo "$(VERSION)" > $(distdir)/VERSION - - - - - Modified: branches/LIBGCRYPT-2.0-MO/configure.ac =================================================================== --- branches/LIBGCRYPT-2.0-MO/configure.ac 2005-10-01 20:33:05 UTC (rev 1112) +++ branches/LIBGCRYPT-2.0-MO/configure.ac 2005-10-01 20:38:02 UTC (rev 1113) @@ -1,3 +1,4 @@ + # Configure.ac script for Libgcrypt # Copyright (C) 1998, 1999, 2000, 2001, 2002 # 2003, 2004 Free Software Foundation, Inc. @@ -27,7 +28,7 @@ # but remove a "-cvs" prefix right *before* a release and append it # soon later. -AC_INIT(libgcrypt, 1.3.0-cvs, bug-libgcrypt@gnupg.org) +AC_INIT(libgcrypt, 2.0.0-cvs2, bug-libgcrypt@gnupg.org) # LT Version numbers, remember to change them just *before* a release. # (Interfaces removed: CURRENT++, AGE=0, REVISION=0) @@ -46,7 +47,8 @@ PACKAGE=$PACKAGE_NAME VERSION=$PACKAGE_VERSION -AC_CONFIG_SRCDIR([src/gcrypt.h]) +AC_CONFIG_SRCDIR([src/compat/gcrypt.h]) +AC_CONFIG_AUX_DIR([scripts]) AC_CANONICAL_TARGET() AM_INIT_AUTOMAKE($PACKAGE, $VERSION) AM_CONFIG_HEADER(config.h) @@ -70,7 +72,6 @@ #endif ]) - AC_SUBST(LIBGCRYPT_LT_CURRENT) AC_SUBST(LIBGCRYPT_LT_AGE) AC_SUBST(LIBGCRYPT_LT_REVISION) @@ -79,7 +80,6 @@ AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of this package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version of this package]) - ###################### ## Basic checks. ### (we need some results later on (e.g. $GCC) ###################### @@ -100,7 +100,6 @@ AM_PROG_LIBTOOL - ########################## ## General definitions. ## ########################## @@ -389,8 +388,6 @@ [use_capabilities="$withval"],[use_capabilities=no]) AC_MSG_RESULT($use_capabilities) - - AC_DEFINE_UNQUOTED(PRINTABLE_OS_NAME, "$PRINTABLE_OS_NAME", [A human readable text with the name of the OS]) @@ -437,6 +434,20 @@ [AC_SEARCH_LIBS(setsockopt, [socket], , , [-lnsl])]) AC_SEARCH_LIBS(setsockopt, [nsl]) +# We check for threading libraries to allow the test suite to test +# multi-threading. + +AC_CHECK_PTH(1.2.0,,,no,have_pth=yes) +if test "$have_pth" = yes; then + AC_DEFINE(HAVE_PTH, ,[Define if we have Pth.]) + CFLAGS="$CFLAGS $PTH_CFLAGS" +fi + +AC_CHECK_LIB(pthread,pthread_create,have_pthread=yes) +if test "$have_pthread" = yes; then + AC_DEFINE(HAVE_PTHREAD, ,[Define if we have pthread.]) +fi + ################################## #### Checks for header files. #### ################################## @@ -563,8 +574,8 @@ # GNUPG_SYS_SYMBOL_UNDERSCORE() AC_MSG_CHECKING(for mpi assembler functions) -if test -f $srcdir/mpi/config.links ; then - . $srcdir/mpi/config.links +if test -f $srcdir/src/subsystems/mpi/config.links ; then + . $srcdir/src/subsystems/mpi/config.links AC_CONFIG_LINKS("$mpi_ln_list") ac_cv_mpi_mod_list="$mpi_mod_list" ac_cv_mpi_sflags="$mpi_sflags" @@ -572,7 +583,7 @@ AC_MSG_RESULT(done) else AC_MSG_RESULT(failed) - AC_MSG_ERROR([mpi/config.links missing!]) + AC_MSG_ERROR([src/subsystems/mpi/config.links missing!]) fi MPI_MOD_LIST_LO="" MPI_MOD_LIST_O="" @@ -628,7 +639,7 @@ # Make the version number in src/gcrypt.h the same as the one here. # (this is easier than to have a *.in file just for one substitution) # -GNUPG_FIX_HDR_VERSION([src/gcrypt.h], GCRYPT_VERSION) +GNUPG_FIX_HDR_VERSION([src/compat/gcrypt.h], GCRYPT_VERSION) AC_SUBST(LIBGCRYPT_CONFIG_API_VERSION) AC_SUBST(LIBGCRYPT_CONFIG_LIBS) @@ -783,13 +794,29 @@ AC_CONFIG_FILES([ Makefile -mpi/Makefile -cipher/Makefile -doc/Makefile src/Makefile +src/include/Makefile +src/liberty/Makefile +src/common/Makefile +src/ath/Makefile +src/compat/Makefile +src/subsystems/Makefile +src/subsystems/mpi/Makefile +src/subsystems/sexp/Makefile +src/subsystems/prime/Makefile +src/subsystems/secmem/Makefile +src/subsystems/random/Makefile +src/subsystems/hash/Makefile +src/subsystems/sym-cipher/Makefile +src/subsystems/asym-cipher/Makefile +src/modules/Makefile +src/modules/hash/Makefile +src/modules/sym-cipher/Makefile +src/modules/asym-cipher/Makefile +src/scripts/Makefile src/libgcrypt-config +doc/Makefile tests/Makefile -w32-dll/Makefile ]) AC_OUTPUT From cvs at cvs.gnupg.org Sat Oct 1 22:41:42 2005 From: cvs at cvs.gnupg.org (svn author marcus) Date: Sat Oct 1 22:13:19 2005 Subject: [svn] gpgme - r1109 - in trunk/tests: . gpg Message-ID: Author: marcus Date: 2005-10-01 22:41:41 +0200 (Sat, 01 Oct 2005) New Revision: 1109 Removed: trunk/tests/gpg/gpg.conf Modified: trunk/tests/ChangeLog trunk/tests/gpg/Makefile.am Log: 2005-10-01 Marcus Brinkmann * gpg/Makefile.am (EXTRA_DIST): Remove gpg.conf. (DISTCLEANFILES): Add gpg.conf. (all-local): Add gpg.conf. (./gpg.conf): New target. * gpg/gpg.conf: Remove file. Modified: trunk/tests/ChangeLog =================================================================== --- trunk/tests/ChangeLog 2005-10-01 20:17:03 UTC (rev 1108) +++ trunk/tests/ChangeLog 2005-10-01 20:41:41 UTC (rev 1109) @@ -1,5 +1,11 @@ 2005-10-01 Marcus Brinkmann + * gpg/Makefile.am (EXTRA_DIST): Remove gpg.conf. + (DISTCLEANFILES): Add gpg.conf. + (all-local): Add gpg.conf. + (./gpg.conf): New target. + * gpg/gpg.conf: Remove file. + * gpg/Makefile.am (EXTRA_DIST): Add gpg.conf. * gpg/Makefile.am (TESTS): Add t-sig-notation. Modified: trunk/tests/gpg/Makefile.am =================================================================== --- trunk/tests/gpg/Makefile.am 2005-10-01 20:17:03 UTC (rev 1108) +++ trunk/tests/gpg/Makefile.am 2005-10-01 20:41:41 UTC (rev 1109) @@ -32,10 +32,10 @@ t-file-name CLEANFILES = secring.gpg pubring.gpg trustdb.gpg -DISTCLEANFILES = pubring.gpg~ random_seed +DISTCLEANFILES = pubring.gpg~ random_seed gpg.conf EXTRA_DIST = mkdemodirs pubdemo.asc secdemo.asc cipher-1.asc cipher-2.asc \ - geheim.txt pubkey-1.asc seckey-1.asc gpg.conf + geheim.txt pubkey-1.asc seckey-1.asc INCLUDES = -I$(top_srcdir)/gpgme @@ -49,11 +49,16 @@ clean-local: $(srcdir)/mkdemodirs --clean -all-local: ./pubring.gpg +all-local: ./pubring.gpg ./gpg.conf ./pubring.gpg: $(srcdir)/pubdemo.asc ./Alpha/Secret.gpg $(GPG) --homedir . --import $(srcdir)/pubdemo.asc - $(GPG) --homedir . --allow-secret-key-import --import Alpha/Secret.gpg Zulu/Secret.gpg + $(GPG) --homedir . --allow-secret-key-import \ + --import Alpha/Secret.gpg Zulu/Secret.gpg ./Alpha/Secret.gpg: secdemo.asc srcdir=$(srcdir) $(srcdir)/mkdemodirs + +./gpg.conf: +# This is required for t-sig-notations. + echo no-force-v3-sigs > ./gpg.conf Deleted: trunk/tests/gpg/gpg.conf From cvs at cvs.gnupg.org Sat Oct 1 22:42:35 2005 From: cvs at cvs.gnupg.org (svn author marcus) Date: Sat Oct 1 22:14:12 2005 Subject: [svn] gpgme - r1110 - trunk/gpgme Message-ID: Author: marcus Date: 2005-10-01 22:42:34 +0200 (Sat, 01 Oct 2005) New Revision: 1110 Modified: trunk/gpgme/ChangeLog trunk/gpgme/engine-backend.h trunk/gpgme/engine-gpgsm.c trunk/gpgme/engine.c trunk/gpgme/engine.h Log: 2005-10-01 Marcus Brinkmann * engine.h (_gpgme_set_engine_info): Add prototype. * engine-backend.h (struct engine_ops): Change return type of get_file_name() to const char * to silence gcc warning. * engine.c (engine_get_file_name): Change return type to const char * to silence gcc warning. (gpgme_get_engine_info): Use transitional variable to go from const char * to char * to silence gcc warning. (_gpgme_set_engine_info): Likewise. * engine-gpgsm.c (struct engine_gpgsm): Change type of LINE to char * to silence gcc warning. (gpgsm_new): Make ARGV a pointer to const char. (status_handler): Change type of SRC, END, DST, ALINE and NEWLINE to char * to silence gcc warning. Modified: trunk/gpgme/ChangeLog =================================================================== --- trunk/gpgme/ChangeLog 2005-10-01 20:41:41 UTC (rev 1109) +++ trunk/gpgme/ChangeLog 2005-10-01 20:42:34 UTC (rev 1110) @@ -1,5 +1,19 @@ 2005-10-01 Marcus Brinkmann + * engine.h (_gpgme_set_engine_info): Add prototype. + * engine-backend.h (struct engine_ops): Change return type of + get_file_name() to const char * to silence gcc warning. + * engine.c (engine_get_file_name): Change return type to const + char * to silence gcc warning. + (gpgme_get_engine_info): Use transitional variable to go from + const char * to char * to silence gcc warning. + (_gpgme_set_engine_info): Likewise. + * engine-gpgsm.c (struct engine_gpgsm): Change type of LINE to + char * to silence gcc warning. + (gpgsm_new): Make ARGV a pointer to const char. + (status_handler): Change type of SRC, END, DST, ALINE and NEWLINE + to char * to silence gcc warning. + * gpgme.def: Add gpgme_data_set_file_name, gpgme_data_get_file_name, gpgme_sig_notation_clear, gpgme_sig_notation_add and gpgme_sig_notation_get. Modified: trunk/gpgme/engine-backend.h =================================================================== --- trunk/gpgme/engine-backend.h 2005-10-01 20:41:41 UTC (rev 1109) +++ trunk/gpgme/engine-backend.h 2005-10-01 20:42:34 UTC (rev 1110) @@ -33,7 +33,7 @@ /* Static functions. */ /* Return the default file name for the binary of this engine. */ - char *(*get_file_name) (void); + const char *(*get_file_name) (void); /* Returns a malloced string containing the version of the engine with the given binary file name (or the default if FILE_NAME is Modified: trunk/gpgme/engine-gpgsm.c =================================================================== --- trunk/gpgme/engine-gpgsm.c 2005-10-01 20:41:41 UTC (rev 1109) +++ trunk/gpgme/engine-gpgsm.c 2005-10-01 20:42:34 UTC (rev 1110) @@ -85,7 +85,7 @@ void *fnc_value; struct { - unsigned char *line; + char *line; int linesize; int linelen; } attic; @@ -320,7 +320,7 @@ { gpgme_error_t err = 0; engine_gpgsm_t gpgsm; - char *argv[5]; + const char *argv[5]; int argc; int fds[2]; int child_fds[4]; @@ -749,17 +749,16 @@ /* FIXME We can't use this for binary data because we assume this is a string. For the current usage of colon output it is correct. */ - unsigned char *src = line + 2; - unsigned char *end = line + linelen; - unsigned char *dst; - unsigned char **aline = &gpgsm->colon.attic.line; + char *src = line + 2; + char *end = line + linelen; + char *dst; + char **aline = &gpgsm->colon.attic.line; int *alinelen = &gpgsm->colon.attic.linelen; if (gpgsm->colon.attic.linesize < *alinelen + linelen + 1) { - unsigned char *newline = realloc (*aline, - *alinelen + linelen + 1); + char *newline = realloc (*aline, *alinelen + linelen + 1); if (!newline) err = gpg_error_from_errno (errno); else @@ -778,7 +777,7 @@ { /* Handle escaped characters. */ ++src; - *dst = (unsigned char) _gpgme_hextobyte (src); + *dst = _gpgme_hextobyte (src); (*alinelen)++; src += 2; } Modified: trunk/gpgme/engine.c =================================================================== --- trunk/gpgme/engine.c 2005-10-01 20:41:41 UTC (rev 1109) +++ trunk/gpgme/engine.c 2005-10-01 20:42:34 UTC (rev 1110) @@ -60,7 +60,7 @@ /* Get the file name of the engine for PROTOCOL. */ -static char * +static const char * engine_get_file_name (gpgme_protocol_t proto) { if (proto > DIM (engine_ops)) @@ -155,12 +155,13 @@ for (proto = 0; proto < DIM (proto_list); proto++) { - char *file_name = engine_get_file_name (proto_list[proto]); + const char *ofile_name = engine_get_file_name (proto_list[proto]); + char *file_name; - if (!file_name) + if (!ofile_name) continue; - file_name = strdup (file_name); + file_name = strdup (ofile_name); *lastp = malloc (sizeof (*engine_info)); if (!*lastp || !file_name) @@ -304,9 +305,9 @@ new_file_name = strdup (file_name); else { - new_file_name = engine_get_file_name (proto); - assert (new_file_name); - new_file_name = strdup (new_file_name); + const char *ofile_name = engine_get_file_name (proto); + assert (ofile_name); + new_file_name = strdup (ofile_name); } if (!new_file_name) return gpg_error_from_errno (errno); Modified: trunk/gpgme/engine.h =================================================================== --- trunk/gpgme/engine.h 2005-10-01 20:41:41 UTC (rev 1109) +++ trunk/gpgme/engine.h 2005-10-01 20:42:34 UTC (rev 1110) @@ -42,7 +42,14 @@ /* Release the engine info INFO. */ void _gpgme_engine_info_release (gpgme_engine_info_t info); +/* Set the engine info for the info list INFO, protocol PROTO, to the + file name FILE_NAME and the home directory HOME_DIR. */ +gpgme_error_t _gpgme_set_engine_info (gpgme_engine_info_t info, + gpgme_protocol_t praoto, + const char *file_name, + const char *home_dir); + gpgme_error_t _gpgme_engine_new (gpgme_engine_info_t info, engine_t *r_engine, const char *lc_ctype, From cvs at cvs.gnupg.org Sat Oct 1 22:53:27 2005 From: cvs at cvs.gnupg.org (svn author marcus) Date: Sat Oct 1 22:25:04 2005 Subject: [svn] gpgme - r1111 - trunk Message-ID: Author: marcus Date: 2005-10-01 22:53:27 +0200 (Sat, 01 Oct 2005) New Revision: 1111 Modified: trunk/TODO Log: Remove ath item. Modified: trunk/TODO =================================================================== --- trunk/TODO 2005-10-01 20:42:34 UTC (rev 1110) +++ trunk/TODO 2005-10-01 20:53:27 UTC (rev 1111) @@ -13,7 +13,6 @@ * All enums that should be enums need to have a maximum value to ensure a certain minimum width for extensibility. ** Compatibility interfaces that can be removed in future versions: -*** ath compatibility modules. *** gpgme_data_new_from_filepart *** gpgme_data_new_from_file *** gpgme_data_new_with_read_cb From cvs at cvs.gnupg.org Sat Oct 1 23:02:48 2005 From: cvs at cvs.gnupg.org (svn author marcus) Date: Sat Oct 1 22:34:30 2005 Subject: [svn] gpgme - r1112 - trunk Message-ID: Author: marcus Date: 2005-10-01 23:02:48 +0200 (Sat, 01 Oct 2005) New Revision: 1112 Modified: trunk/TODO Log: Update some items. Modified: trunk/TODO =================================================================== --- trunk/TODO 2005-10-01 20:53:27 UTC (rev 1111) +++ trunk/TODO 2005-10-01 21:02:48 UTC (rev 1112) @@ -49,20 +49,22 @@ This might be integrated with import. we still need to work out how to learn a card when gpg and gpgsm have support for smartcards. ** Might need a stat() for data objects and use it for length param to gpg. -** Allow to export secret keys. ** Implement support for photo ids. +** Allow selection of subkeys +** Allow to return time stamps in ISO format + This allows us to handle years later than 2037 properly. With the + time_t interface they are all mapped to 2037-12-31 ** New features requested by our dear users, but rejected or left for later consideration: +*** Allow to export secret keys. + Rejected because this is conceptually flawed. Secret keys on a + smart card can not be exported, for example. *** Selecting the key ring, setting the version or comment in output. Rejected because the naive implementation is engine specific, the configuration is part of the engine's configuration or readily worked around in a different way *** Selecting the symmetric cipher. *** Exchanging keys with key servers. -** Allow selection of subkeys -** Allow to return time stamps in ISO format - This allows us to handle years later than 2037 properly. With the - time_t interface they are all mapped to 2037-12-31 * Documentation ** Document validity and trust issues. @@ -100,19 +102,6 @@ ** Return ENC_TO output in verify result. Again, this is not available for gpgsm. ** Genkey should return something more useful than General_Error. -** Decrypt: - On Fri, Jun 27, 2003 at 06:28:23PM +0200, Heiko Abraham wrote: - > I have a cipher text and I use 'gpgme_op_decrypt_verify(..)' - > for decrypt and get the plaintext. But also I wish a list - > of all reciepient, that can also decrypt this file. - > - > If I store the file and check it with 'gpg --list-packets ${filename}' - > then I will become also a recipient-list. - > It this also possible with gpgme? - - Currently not, but it is easy to add this to GPGME 0.4.1. At least the key - ID and a user ID hint is available from gpg (of course key IDs are not - necessarily unique!). I will put it on the TODO list. ** If possible, use --file-setsize to set the file size for proper progress callback handling. Write data interface for file size. ** Optimize the file descriptor list, so the number of open fds is @@ -153,7 +142,7 @@ Add error checking some time after releasing a new gpgsm. -Copyright 2004 g10 Code GmbH +Copyright 2004, 2005 g10 Code GmbH This file is free software; as a special exception the author gives unlimited permission to copy and/or distribute it, with or without From cvs at cvs.gnupg.org Sat Oct 1 23:17:02 2005 From: cvs at cvs.gnupg.org (svn author mo) Date: Sat Oct 1 22:48:39 2005 Subject: [svn] gcry - r1116 - in branches/LIBGCRYPT-2.0-MO: . src/compat Message-ID: Author: mo Date: 2005-10-01 23:17:02 +0200 (Sat, 01 Oct 2005) New Revision: 1116 Added: branches/LIBGCRYPT-2.0-MO/src/compat/ath.h branches/LIBGCRYPT-2.0-MO/src/compat/sexp.c Modified: branches/LIBGCRYPT-2.0-MO/configure.ac Log: Modified: branches/LIBGCRYPT-2.0-MO/configure.ac =================================================================== --- branches/LIBGCRYPT-2.0-MO/configure.ac 2005-10-01 21:08:26 UTC (rev 1115) +++ branches/LIBGCRYPT-2.0-MO/configure.ac 2005-10-01 21:17:02 UTC (rev 1116) @@ -813,7 +813,6 @@ src/modules/hash/Makefile src/modules/sym-cipher/Makefile src/modules/asym-cipher/Makefile -src/scripts/Makefile src/libgcrypt-config doc/Makefile tests/Makefile Added: branches/LIBGCRYPT-2.0-MO/src/compat/ath.h =================================================================== --- branches/LIBGCRYPT-2.0-MO/src/compat/ath.h 2005-10-01 21:08:26 UTC (rev 1115) +++ branches/LIBGCRYPT-2.0-MO/src/compat/ath.h 2005-10-01 21:17:02 UTC (rev 1116) @@ -0,0 +1,6 @@ +#ifndef _ATH_H +#define _ATH_H + +gcry_error_t ath_install (struct gcry_thread_cbs *ath_ops, int check_only); + +#endif Added: branches/LIBGCRYPT-2.0-MO/src/compat/sexp.c =================================================================== --- branches/LIBGCRYPT-2.0-MO/src/compat/sexp.c 2005-10-01 21:08:26 UTC (rev 1115) +++ branches/LIBGCRYPT-2.0-MO/src/compat/sexp.c 2005-10-01 21:17:02 UTC (rev 1116) @@ -0,0 +1,176 @@ +#include + +#include + +gcry_error_t +gcry_sexp_new (gcry_sexp_t *retsexp, + const void *buffer, size_t length, + int autodetect) +{ + _gcry_init (); + return gcry_core_sexp_new (context, retsexp, buffer, length, autodetect); +} + +gcry_error_t +gcry_sexp_create (gcry_sexp_t *retsexp, + void *buffer, size_t length, + int autodetect, void (*freefnc) (void *)) +{ + _gcry_init (); + return gcry_core_sexp_create (context, retsexp, buffer, length, + autodetect, freefnc); +} + +gcry_error_t +gcry_sexp_sscan (gcry_sexp_t *retsexp, size_t *erroff, + const char *buffer, size_t length) +{ + _gcry_init (); + return gcry_core_sexp_sscan (context, retsexp, erroff, buffer, length); +} + +gcry_error_t +gcry_sexp_build (gcry_sexp_t *retsexp, size_t *erroff, + const char *format, ...) +{ + gcry_error_t err; + va_list ap; + + _gcry_init (); + va_start (ap, format); + err = gcry_core_sexp_build_va (context, retsexp, erroff, format, ap); + va_end (ap); + + return err; +} + +gcry_error_t +gcry_sexp_build_array (gcry_sexp_t *retsexp, size_t *erroff, + const char *format, void **arg_list) +{ + _gcry_init (); + return gcry_core_sexp_build_array (context, retsexp, erroff, format, arg_list); +} + +void +gcry_sexp_release (gcry_sexp_t sexp) +{ + _gcry_init (); + gcry_core_sexp_release (context, sexp); +} + +size_t +gcry_sexp_canon_len (const unsigned char *buffer, size_t length, + size_t *erroff, gcry_error_t *errcode) +{ + _gcry_init (); + return gcry_core_sexp_canon_len (context, buffer, length, erroff, errcode); +} + +size_t +gcry_sexp_sprint (gcry_sexp_t sexp, int mode, char *buffer, + size_t maxlength) +{ + _gcry_init (); + return gcry_core_sexp_sprint (context, sexp, mode, buffer, maxlength); +} + +void +gcry_sexp_dump (const gcry_sexp_t a) +{ + _gcry_init (); + return gcry_core_sexp_dump (context, a); +} + +gcry_sexp_t +gcry_sexp_cons (const gcry_sexp_t a, const gcry_sexp_t b) +{ + BUG (context); + return NULL; +} + +gcry_sexp_t +gcry_sexp_alist (const gcry_sexp_t *array) +{ + BUG (context); + return NULL; +} + +gcry_sexp_t +gcry_sexp_vlist (const gcry_sexp_t a, ...) +{ + BUG (context); + return NULL; +} + +gcry_sexp_t +gcry_sexp_append (const gcry_sexp_t a, const gcry_sexp_t n) +{ + BUG (context); + return NULL; +} + +gcry_sexp_t +gcry_sexp_prepend (const gcry_sexp_t a, const gcry_sexp_t n) +{ + BUG (context); + return NULL; +} + +gcry_sexp_t +gcry_sexp_find_token (gcry_sexp_t list, + const char *tok, size_t toklen) +{ + _gcry_init (); + return gcry_core_sexp_find_token (context,list, tok, toklen); +} + +int +gcry_sexp_length (const gcry_sexp_t list) +{ + _gcry_init (); + return gcry_core_sexp_length (context, list); +} + +gcry_sexp_t +gcry_sexp_nth (const gcry_sexp_t list, int number) +{ + _gcry_init (); + return gcry_core_sexp_nth (context, list, number); +} + +gcry_sexp_t +gcry_sexp_car (const gcry_sexp_t list) +{ + _gcry_init (); + return gcry_core_sexp_car (context, list); +} + +gcry_sexp_t +gcry_sexp_cdr (const gcry_sexp_t list) +{ + _gcry_init (); + return gcry_core_sexp_cdr (context, list); +} + +gcry_sexp_t +gcry_sexp_cadr (const gcry_sexp_t list) +{ + _gcry_init (); + return gcry_core_sexp_cadr (context, list); +} + +const char * +gcry_sexp_nth_data (const gcry_sexp_t list, int number, + size_t *datalen) +{ + _gcry_init (); + return gcry_core_sexp_nth_data (context, list, number, datalen); +} + +gcry_mpi_t +gcry_sexp_nth_mpi (gcry_sexp_t list, int number, int mpifmt) +{ + _gcry_init (); + return gcry_core_sexp_nth_mpi (context, list, number, mpifmt); +} From cvs at cvs.gnupg.org Sat Oct 1 23:23:41 2005 From: cvs at cvs.gnupg.org (svn author mo) Date: Sat Oct 1 22:55:17 2005 Subject: [svn] gcry - r1117 - branches/LIBGCRYPT-2.0-MO/src/subsystems/mpi Message-ID: Author: mo Date: 2005-10-01 23:23:35 +0200 (Sat, 01 Oct 2005) New Revision: 1117 Modified: branches/LIBGCRYPT-2.0-MO/src/subsystems/mpi/Makefile.am Log: Modified: branches/LIBGCRYPT-2.0-MO/src/subsystems/mpi/Makefile.am =================================================================== --- branches/LIBGCRYPT-2.0-MO/src/subsystems/mpi/Makefile.am 2005-10-01 21:17:02 UTC (rev 1116) +++ branches/LIBGCRYPT-2.0-MO/src/subsystems/mpi/Makefile.am 2005-10-01 21:23:35 UTC (rev 1117) @@ -29,7 +29,7 @@ LTCCASCOMPILE = $(LIBTOOL) --mode=compile $(CCAS) $(AM_CCASFLAGS) $(CCASFLAGS) -EXTRA_DIST = Manifest config.links README asm-modules.txt +EXTRA_DIST = config.links README asm-modules.txt DISTCLEANFILES = mpi-asm-defs.h \ mpih-add1.S mpih-mul1.S mpih-mul2.S mpih-mul3.S \ mpih-lshift.S mpih-rshift.S mpih-sub1.S asm-syntax.h sysdep.h From cvs at cvs.gnupg.org Sat Oct 1 23:30:34 2005 From: cvs at cvs.gnupg.org (svn author mo) Date: Sat Oct 1 23:02:13 2005 Subject: [svn] gcry - r1118 - in branches/LIBGCRYPT-2.0-MO: . src src/subsystems src/subsystems/mpi/arch/alpha src/subsystems/mpi/arch/generic src/subsystems/mpi/arch/i386 src/subsystems/mpi/arch/i586 src/subsystems/mpi/arch/m68k src/subsystems/mpi/arch/m68k/mc68020 src/subsystems/mpi/arch/mips3 src/subsystems/mpi/arch/pa7100 src/subsystems/mpi/arch/power src/subsystems/mpi/arch/powerpc32 src/subsystems/mpi/arch/sparc32 src/subsystems/mpi/arch/sparc32v8 src/subsystems/mpi/arch/supersparc Message-ID: Author: mo Date: 2005-10-01 23:30:32 +0200 (Sat, 01 Oct 2005) New Revision: 1118 Added: branches/LIBGCRYPT-2.0-MO/autogen.sh branches/LIBGCRYPT-2.0-MO/src/ChangeLog.old branches/LIBGCRYPT-2.0-MO/src/subsystems/README Modified: branches/LIBGCRYPT-2.0-MO/src/subsystems/mpi/arch/alpha/distfiles branches/LIBGCRYPT-2.0-MO/src/subsystems/mpi/arch/generic/distfiles branches/LIBGCRYPT-2.0-MO/src/subsystems/mpi/arch/i386/distfiles branches/LIBGCRYPT-2.0-MO/src/subsystems/mpi/arch/i586/distfiles branches/LIBGCRYPT-2.0-MO/src/subsystems/mpi/arch/m68k/distfiles branches/LIBGCRYPT-2.0-MO/src/subsystems/mpi/arch/m68k/mc68020/distfiles branches/LIBGCRYPT-2.0-MO/src/subsystems/mpi/arch/mips3/distfiles branches/LIBGCRYPT-2.0-MO/src/subsystems/mpi/arch/pa7100/distfiles branches/LIBGCRYPT-2.0-MO/src/subsystems/mpi/arch/power/distfiles branches/LIBGCRYPT-2.0-MO/src/subsystems/mpi/arch/powerpc32/distfiles branches/LIBGCRYPT-2.0-MO/src/subsystems/mpi/arch/sparc32/distfiles branches/LIBGCRYPT-2.0-MO/src/subsystems/mpi/arch/sparc32v8/distfiles branches/LIBGCRYPT-2.0-MO/src/subsystems/mpi/arch/supersparc/distfiles Log: Added: branches/LIBGCRYPT-2.0-MO/autogen.sh =================================================================== --- branches/LIBGCRYPT-2.0-MO/autogen.sh 2005-10-01 21:23:35 UTC (rev 1117) +++ branches/LIBGCRYPT-2.0-MO/autogen.sh 2005-10-01 21:30:32 UTC (rev 1118) @@ -0,0 +1,100 @@ +#! /bin/sh +# Run this to generate all the initial makefiles, etc. +# +# Copyright (C) 2003 g10 Code GmbH +# +# This file is free software; as a special exception the author gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +configure_ac="configure.ac" + +cvtver () { + awk 'NR==1 {split($NF,A,".");X=1000000*A[1]+1000*A[2]+A[3];print X;exit 0}' +} + +check_version () { + if [ `("$1" --version || echo "0") | cvtver` -ge "$2" ]; then + return 0 + fi + echo "**Error**: "\`$1\'" not installed or too old." >&2 + echo ' Version '$3' or newer is required.' >&2 + [ -n "$4" ] && echo ' Note that this is part of '\`$4\''.' >&2 + DIE="yes" + return 1 +} + + +# Grep the required versions from configure.ac +autoconf_vers=`sed -n '/^AC_PREREQ(/ { +s/^.*(\(.*\))/\1/p +q +}' ${configure_ac}` +autoconf_vers_num=`echo "$autoconf_vers" | cvtver` + +automake_vers=`sed -n '/^min_automake_version=/ { +s/^.*="\(.*\)"/\1/p +q +}' ${configure_ac}` +automake_vers_num=`echo "$automake_vers" | cvtver` + +#gettext_vers=`sed -n '/^AM_GNU_GETTEXT_VERSION(/ { +#s/^.*(\(.*\))/\1/p +#q +#}' ${configure_ac}` +#gettext_vers_num=`echo "$gettext_vers" | cvtver` + + +if [ -z "$autoconf_vers" -o -z "$automake_vers" ] +then + echo "**Error**: version information not found in "\`${configure_ac}\'"." >&2 + exit 1 +fi + +# Allow to override the default tool names +AUTOCONF=${AUTOCONF_PREFIX}${AUTOCONF:-autoconf}${AUTOCONF_SUFFIX} +AUTOHEADER=${AUTOCONF_PREFIX}${AUTOHEADER:-autoheader}${AUTOCONF_SUFFIX} + +AUTOMAKE=${AUTOMAKE_PREFIX}${AUTOMAKE:-automake}${AUTOMAKE_SUFFIX} +ACLOCAL=${AUTOMAKE_PREFIX}${ACLOCAL:-aclocal}${AUTOMAKE_SUFFIX} + +#GETTEXT=${GETTEXT_PREFIX}${GETTEXT:-gettext}${GETTEXT_SUFFIX} +#MSGMERGE=${GETTEXT_PREFIX}${MSGMERGE:-msgmerge}${GETTEXT_SUFFIX} + +DIE=no + + +if check_version $AUTOCONF $autoconf_vers_num $autoconf_vers ; then + check_version $AUTOHEADER $autoconf_vers_num $autoconf_vers autoconf +fi +if check_version $AUTOMAKE $automake_vers_num $automake_vers; then + check_version $ACLOCAL $automake_vers_num $autoconf_vers automake +fi +#if check_version $GETTEXT $gettext_vers_num $gettext_vers; then +# check_version $MSGMERGE $gettext_vers_num $gettext_vers gettext +#fi + +if test "$DIE" = "yes"; then + cat < + + * Makefile.am (EXTRA_DIST): Depend on README.SVN, not on README.CVS. + +2005-06-25 Moritz Schulte + + * configure.ac: Removed src/libgcrypt.pc from AC_CONFIG_FILES. + +2005-06-10 Werner Koch + + * configure.ac: Move detection of basic stuff to the top. For + example we need to know whether gcc is used before testing for it. + Reported by Ralf Fassel. + +2005-04-23 Moritz Schulte + + * acinclude.m4 (TYPE_SOCKLEN_T): New type definition test; + provided by Albert Chin. + * configure.ac: Don't use $(CMD) as it's not portable; use CMD in + backticks instead. Simpler -lnsl/-lsocket test. Use + TYPE_SOCKLEN_T test. Don't forget to set `random_modules' + correctly. + +2005-04-22 Moritz Schulte + + * configure.ac: Added support for pkgconfig; provided by Albert + Chin. + +2005-04-11 Moritz Schulte + + * configure.ac: Integrate Whirlpool. + +2005-01-04 Werner Koch + + Updated to automake 1.9. + + * acinclude.m4: Updated for use with automake 1.9. + + * configure.ac: Require libgpg-error 1.0; not really needed but + that is the first stable version. + + * Makefile.am (ACLOCAL_AMFLAGS): New for -I m4. + (AUTOMAKE_OPTIONS): New to create a bzip archive. + +2005-02-03 Moritz Schulte + + * THANKS: Updated. + +2004-08-09 Moritz Schulte + + * THANKS: Updated. + +2004-07-04 Moritz Schulte + + * THANKS: Updated. + +2004-04-21 Werner Koch + + * configure.ac: Don't print a warning if GNU make was not found. + +2004-05-07 Moritz Schulte + + * THANKS: Updated. + +2004-04-02 Thomas Schwinge + + * autogen.sh: Added ACLOCAL_FLAGS. + +2004-04-15 Werner Koch + + Released 1.2.0. + + * configure.ac: Set LT to C12/A1/R1. + +2004-04-06 Werner Koch + + * config.guess, config.sub, ltmain.sh: Updated to those from + libtools 1.5.4. + +2004-03-29 Werner Koch + + Released 1.1.94. + + * configure.ac: Set LT to C12/A1/R0. + +2004-03-10 Marcus Brinkmann + + * configure.ac (LIBGCRYPT_CONFIG_LIBS_PTHREAD, + LIBGCRYPT_CONFIG_CFLAGS_PTHREAD, LIBGCRYPT_CONFIG_LIBS_PTH, + LIBGCRYPT_CONFIG_CFLAGS_PTH, have_pth, have_pthread, AC_CHECK_PTH, + AC_CHECK_LIB(pthread), HAVE_PTH, HAVE_PTHREAD): Removed. + +2004-03-06 Werner Koch + + Released 1.1.93. + + * configure.ac (LIBGCRYPT_CONFIG_SONAME_NUMBER): Replaced by + LIBGCRYPT_CONPIG_API_VERSION. Set it to 1. Set LT to C11/A0/R1. + +2004-03-05 Werner Koch + + * configure.ac (LIBGCRYPT_CONFIG_SONAME_NUMBER): New. + +2004-02-20 Werner Koch + + Released 1.1.92. + + * configure.ac: Set LT to C11/A0/R0. + +2004-02-11 Werner Koch + + * autogen.sh (check_version): Removed bashism and simplified. + +2004-02-06 Werner Koch + + * configure.ac: Add rfc2268 cipher algorithm. + +2004-01-25 Moritz Schulte + + * THANKS: Updated. + +2003-12-19 Werner Koch + + Released 1.1.91. + + * configure.ac: Bumbed LT version to C10/A3/R1. + +2003-12-08 Werner Koch + + * Makefile.am (dist-hook): Don't distribute stuff from the now + obsolete scripts dir. + (EXTRA_DIST): Remove README_alpha + * README-alpha: Removed. + * configure.ac (AM_CONFIG_AUX_DIR): Removed. + + * COPYING.DOC: Removed. + * Makefile.am (EXTRA_DIST): Added README.CVS and + autogen.sh. Removed COPYING.DOC. + +2003-11-14 Werner Koch + + Released 1.1.90. + + * configure.ac: Bumbed LT version to C10/A3/R0. + + * configure.ac (have_ld_version_script): Set the default in + a separate test. + (PRINTABLE_OS_NAME): Don't handle the Hurd extra, this leads to + conflicts with BSD based GNU systems. The Hurd has now a working + uname. + +2003-11-04 Werner Koch + + * configure.ac (USE_SHA1): Make sure it is always included. + (USE_RMD160): Removed this AM conditional. + +2003-10-31 Werner Koch + + * configure.ac: Bumbed version number to 1.1.90-cvs for futher + development + + Released 1.1.44. + + * acinclude.m4 (AC_CHECK_PTH): Added. + * configure.ac: Use it here instead of the generic lib test. + Bumbed LT vesion to C9/A2/R0. + +2003-10-27 Werner Koch + + * configure.ac: Give a hint on where libgpg-error is available. + Reformatted long lines. Don't include gcrypt-defs.h. + (--enable-gcc-warnings): New option. + +2003-10-24 Moritz Schulte + + * configure.ac: Check for socklen_t. + +2003-10-11 Moritz Schulte + + * acinclude.m4: Update AM_PATH_GPG_ERROR macro. + +2003-09-04 Werner Koch + + Released 1.1.43. + + * configure.ac: Require libgpg-error 0.4 due to the prime interface. + +2003-08-29 Werner Koch + + * acinclude.m4 (GNUPG_SYS_SYMBOL_UNDERSCORE): Re-implemented. + * configure.ac: Use it here. + +2003-08-27 Moritz Schulte + + * configure.ac: Substitute: LIBGCRYPT_CONFIG_LIBS_PTHREAD, + LIBGCRYPT_CONFIG_CFLAGS_PTHREAD, LIBGCRYPT_CONFIG_LIBS_PTH, + LIBGCRYPT_CONFIG_CFLAGS_PTH, LIBGCRYPT_THREAD_MODULES. + +2003-08-07 Moritz Schulte + + * configure.ac: Fail, if libgpg-error could not be found. + +2003-07-31 Werner Koch + + Released 1.1.42. + + * configure.ac: Set LT version to 7/0/0. + +2003-07-30 Werner Koch + + * AUTHORS (Maintainer): Assigned Moritz as Maintainer. + +2003-07-30 Moritz Schulte + + * NEWS: Include much more complete list of `Interface changes + relative to the 1.1.12 release'. + +2003-07-14 Moritz Schulte + + * configure.ac: Bumbed version number up to 1.1.42-cvs. + +2003-07-09 Moritz Schulte + + * configure.ac: Reintroduce --disable-asm, since it is needed by + mpi/config.links. + +2003-07-05 Moritz Schulte + + * README: Few changes, mention libgpg-error. + +2003-06-18 Moritz Schulte + + * configure.ac (available_ciphers): Removed Serpent, hrrm. + +2003-06-17 Moritz Schulte + + * acinclude.m4: Removed macro definitions: GNUPG_CHECK_FAQPROG, + GNUPG_CHECK_ENDIAN, GNUPG_CHECK_CACHE, GNUPG_CHECK_PIC, + GNUPG_CHECK_EXPORTDYNAMIC, GNUPG_CHECK_IPC, GNUPG_PROG_NM, + GNUPG_SYS_SYMBOL_UNDERSCORE, GNUPG_FUNC_MKDIR_TAKES_ONE_ARG, + GPH_PROG_DB2ANY. + Added macro definitions: AM_PATH_GPG_ERROR. + + * configure.ac: Use alternative approach for building based on + conditional sources, which does not make automake eat all your + memory, etc. + Removed unused tests. + Renamed --enable-static-rnd to --enable-random. + Use Autoconf's AC_C_BIGENDIAN macro instead of our own. + Re-organized the whole file. + +2003-06-16 Moritz Schulte + + * configure.ac (AC_CONFIG_FILES): Removed doc/version.sgml. + +2003-06-11 Moritz Schulte + + * configure.ac: Remove --enable-libgpg-error flag. + Ue AC_PATH_GPG_ERROR. + +2003-06-09 Moritz Schulte + + * NEWS: Mention API changes and libgpg-error. + +2003-05-25 Moritz Schulte + + * configure.ac (USE_LIBGPG_ERROR): Implementation of the + --enable-libgpg-error switch. + Define USE_LIBGPG_ERROR in LIBGCRYPT_CONFIG_FLAGS, in case + libgpg-error is used. + +2003-05-22 Moritz Schulte + + * configure.ac (AC_CHECK_HEADERS): Removed unused headers: + termio.h, langinfo.h. + (AC_CHECK_FUNCS): Removed unused functions: strsep, strlwr, + tcgetattr, setrlimit, strftime, nl_langinfo, sigaction, + sigprocmask, fopen64, fstat64. + +2003-04-27 Moritz Schulte + + * README: Documented new configure switches. + Mention the --enable-maintainer-switch. + + * configure.ac: Merged some code from GnuPG's configure.ac for + disabling sha512/tiger in case no 64 data types are available. + +2003-04-17 Moritz Schulte + + * configure.ac: Include support for sha512. + +2003-04-17 Moritz Schulte + + * AUTHORS: Updated. + +2003-04-16 Moritz Schulte + + * configure.ac: Implement command line switches: --enable-ciphers, + --enable-pubkey-ciphers and --enable-digests. + Set Automake conditionals and config.h symbols depending on the + selected ciphers, pubkey-ciphers, digests and random-modules. + + * acinclude.m4 (LIST_MEMBER): New macro. + + * configure.ac: Simplified, removed code for parsing + EXTRA_PROGRAMS from Makefile.am. + +2003-04-08 Moritz Schulte + + * configure.ac: Merged random-module selection code from GnuPG's + configure.ac. + +2003-04-07 Moritz Schulte + + * configure.ac: Removed code for generating contruct.c. + Remove digest modules from the static_modules list, only handle + random module selection. + + +2003-03-24 Moritz Schulte + + * NEWS: Mention new CBC_MAC flag. + + * AUTHORS (Maintainer): Update entry for Simon Josefsson. + +2003-03-04 Moritz Schulte + + * TODO: Remove item about resetting handles, since + gcry_cipher_reset is implemented by now. + + * NEWS: Mentioned gcry_cipher_reset. + +2003-01-21 Werner Koch + + * README (Configure options): New. + * configure.ac (have_ld_version_script): New option + --enable-ld-version-script. + +2003-01-20 Simon Josefsson + + * configure.ac (MODULES_IN_CIPHER): Add crc. + +2003-01-20 Werner Koch + + Released 1.1.12. + + * configure.ac (LIBGCRYPT_LT_REVISION): Bumbed up. + +2002-12-21 Werner Koch + + Released 1.1.11. + + * configure.ac (LIBGCRYPT_LT_CURRENT: Bumbed to 6/5/0 due to a new + interface + +2002-12-19 Werner Koch + + * configure.ac (have_pthread): Check for pthreads in libc. + (have_ld_version_script): New. + +2002-11-10 Werner Koch + + * configure.ac (MODULES_IN_CIPHER): Add md4.c. By Simon Josefsson. + +2002-09-20 Werner Koch + + Released 1.1.10. + + * configure.ac (HAVE_DEV_RANDOM_IOCTL): Don't check for it; it is + not used. + (AS_CHECK_HEADERS): Check for sys/select.h. + * Makefile.am (DIST_SUBDIRS): New to include the w32-dll directory + +2002-09-18 Timo Schulz + + * configure.ac: Added makefile for the W32 DLL. + +2002-09-17 Werner Koch + + * configure.ac: Check for Pth and Pthreads. + +2002-08-23 Werner Koch + + Released 1.1.9. + + * configure.ac (LIBGCRYPT_CONFIG_CFLAGS): Renamed from + LIBGCRYPT_CFLAGS and removed the libpath because it is set by the + config script. + (LIBGCRYPT_LT_REVISION): Set LT version to 5/4/1. + +2002-06-25 Werner Koch + + Released 1.1.8. + + * configure.ac: Set LT version to 5/4/0. + +2002-05-21 Werner Koch + + Released 1.1.7. + + * configure.ac: Set LT version to 4/3/0. + +2002-05-17 Werner Koch + + * configure.ac: Removed all the dynamic loading stuff. + +2002-05-16 Werner Koch + + * configure.ac: Reordered the C_CHECK_FUNCS. + +2002-05-15 Werner Koch + + * configure.ac: Adjusted for new MPI module stuff. + +2002-05-14 Werner Koch + + Changed license to the LGPL. + +2002-05-02 Werner Koch + + * jnlib/: Removed. + * Makefile.am (SUBDIRS): Removed jnlib. + * configure.ac (jnlib/Makefile): Removed. + + * configure.ac: Define _REENTRANT. + +2002-02-18 Werner Koch + + * configure.ac (MPI_EXTRA_ASM_OBJS): Use .lo suffix. + (AC_CANONICAL_TARGET): Added. + +2002-02-07 Werner Koch + + Released 1.1.6. + +2002-01-24 Werner Koch + + * jnlib/: Replaced by a fresh copy from GnuPG (actually the NewPG + development branch). Adjusted Makefile.am and jnlib-config.h + accordingly. + +2001-12-18 Werner Koch + + Released 1.1.5. + + * Makefile.am (dist-hook): Only look in mpi and scripts for + distfiles; this way we don't include those of a stale "make dist" + directory. + + * acinclude.m4 (GNUPG_FIX_HDR_VERSION): Make it work with the new + automake. + * configure.ac: Don't chmod db2any. + +2001-08-06 Werner Koch + + * configure.ac: Removed cross compiling hacks. + +2001-08-03 Werner Koch + + Released 1.1.4. + + * acinclude.m4 (GNUPG_CHECK_TYPEDEF): Define GNU Source. + + Migrated to autoconf 2.52. + * acinclude.m4: Removed GNUPG_LINK_FILES and converted. + * acconfig.h: Removed + * configure.in: Replaced by... + * configure.ac: and modified for use with autoconf 2.52. Replaced + GNUPG_LINK_FILES with AC_CONFIG_LINKS and moved some informational + messages to the end. Removed --enable-m-debug + + * tests/: New. + * Makefile.am: Included tests directory + + * configure.in (DYNLINK_MOD_CFLAGS): Use -shared with dec-osf. + Reported by Chris Adams. Merged some cases. + +2001-05-31 Werner Koch + + Released 1.1.3. + + * configure.in: Use _gcry_ prefix when creating the cipher constructor. + + * acconfig.h (_GCRYPT_IN_LIBGCRYPT): Define it here. + +2001-05-28 Werner Koch + + * acinclude.m4 (GPH_PROG_DOCBOOK): Removed. + (GPH_PROG_DB2ANY): New. Taken from GPH. + * configure.in: Use it here. + +2000-12-19 Werner Koch + + Major change: + Removed all GnuPG stuff and renamed this piece of software + to gcrypt. The directory gcrypt has been renamed to src. + +2000-11-14 Werner Koch + + Version 1.1.2 released. + +2000-11-13 Werner Koch + + * acinclude.m4 (GNUPG_FIX_HDR_VERSION): VPATH build fix. + +2000-10-10 Werner Koch + + * Makefile.am (dist-hook): Create the version file. + * configure.in: Set the libtool version here, removed the need + for the version file. + +Mon Sep 18 16:35:45 CEST 2000 Werner Koch + + * acinclude.m4 (GNUPG_CHECK_MLOCK): Removed that silly mkdir(). + + * configure.in: Changes to allow for Solaris random device. + By Nils Ellmenreich. + (--with-egd-socket): New. + + * configure.in (GNUPG_HOMEDIR): New. + + * configure.in: Check for fstat64 and fopen64 + + * acinclude.m4 (GNUPG_CHECK_FAQPROG): New. + * configure.in: Test for this. + + * configure.in (DYNLINK_MOD_CFLAGS): Fix by David Champion. + +Tue Aug 22 14:31:15 CEST 2000 Werner Koch + + Version 1.1.1 + +Fri Aug 18 14:27:14 CEST 2000 Werner Koch + + * agent/: New. + * Makefile.am, configure.in: Support for the new directory. + +Mon Jul 17 16:35:47 CEST 2000 Werner Koch + + * configure.in (mingw32): Changes to allow for mingw32msvc + +Fri Jul 14 19:38:23 CEST 2000 Werner Koch + + The big merge between this one and the stable branch 1.0. Still need + to merge TNANKS, AUTHORS and such. It probaly does not compile yet. + + * acinclude.m4 (GNUPG_CHECK_MLOCK): Fixed syntax error in C code. + + * configure.in: Add check for termio.h, wait unctiosn and sigaction. + + * acinclude.m4, configure.in (GNUPG_CHECK_GNUMAKE): New. + + * acinclude.m4 (MKDIR_TAKES_ONE_ARG): Check some headers. By Gaël Quéri. + + * configure.in (AM_INIT_AUTOMAKE): Use this now. By Gaël. + + * acinclude.m4 (GNUPG_CHECK_EXPORTDYNAMIC): Replacement for + GNUPG_CHECK_RDYNAMIC which should handle gcc with non GNU ld nicer. + Contributed by Dave Dykstra. + * configure.in (GNYPG_CHECK_RDYNAMIC): Replaced by the new check. + + * configure.in: Add a test for unisgned long long. + + * configure.in (DYNLINK_MOD_CFLAGS): Set different for NetBSD. + + * configure.in: Add check for clock_gettime + + * configure.in (ALL_LINGUAS): Add nl. + * configure.in (ALL_LINGUAS): Add Esperanto. + * configure.in (ALL_LINGUAS): Add sv and ja. + + * configure.in: Use /usr/local for CFLAGS and LDFLAGS when + target is freebsd. By Rémi. + + * configure.in: Do not set development version when the version has + a dash in it. Suggested by Dave Dykstra. + + * configure.in: Removed substitution for doc/gph/Makefile. + Do all the gcc warning only in maintainer mode. + + * configure.in (dlopen): Use CHECK_FUNC for a test of dlopen in libc. + Suggested by Alexandre Oliva. + (-Wall): Moved the settting of gcc warning options near to the end + so that tests don't get confused. Suggested by Paul D. Smith. + + * acinclude.m4 (GNUPG_SYS_NM_PARSE): Added BSDI support. + (GNUPG_CHECK_RDYNAMIC): Ditto. + + * acinclude.m4 (GNUPG_CHECK_MLOCK): Changed the way to test for + librt. Test suggested by Jeff Long. + + * acinclude.m4 (GNUPG_CHECK_MLOCK): Do librt check only when + we can't link a test program. This way GNU systems don't need + to link against linrt. + (GNUPG_CHECK_IPC): Fixed use of TRY_COMPILE macro. From Tim Mooney. + + * acinclude.m4 (GNUPG_SYS_SYMBOL_UNDERSCORE): Add support for + DJGPP. + (GNUPG_CHECK_MLOCK): Check whether mlock sits in librt. + + * acinclude.m4 (GNUPG_CHECK_RDYNAMIC): Add NetBSD. By Thomas Klausner. + + * acconfig.h (HAVE_MLOCK): Added + +Mon Mar 13 19:22:46 CET 2000 Werner Koch + + * configure.in: Now uses the Docbook M4s from GPH. + +Mon Jan 31 17:46:35 CET 2000 Werner Koch + + * Makefile.am: Re-added tools. By Rémi. + +Mon Jan 31 16:37:34 CET 2000 Werner Koch + + * configure.in: Create a symlink for types.h in gcrypt/. + +Thu Jan 27 18:00:44 CET 2000 Werner Koch + + * configure.in (g10defs.h): Replaced by gnupg-defs.h + +Mon Jan 24 13:04:28 CET 2000 Werner Koch + + * jnlib/ : New. + + * configure.in: Do set development version when the version has + a dash in it. Suggested by Dave Dykstra. + +Thu Dec 9 17:22:27 CET 1999 Werner Koch + + * acinclude.m4 (GNUPG_FIX_HDR_VERSION): New. + * configure.in: Check and fix the version number of gcrypt/gcrypt.h + so that it is always the save as VERSION. + +Thu Oct 28 16:17:46 CEST 1999 Werner Koch + + * Started with development series 1.1 on 1999-10-26 + +Tue Oct 26 14:10:21 CEST 1999 Werner Koch + + * README-alpha: New + + * configure.in: Fixed quoting in test for development version. + + * THANKS: Add entries for Michael, Brenno and J Horacio who did + very nice Howto documents - I apoligize for forgetting to mention them + earlier. + +Fri Sep 17 12:56:42 CEST 1999 Werner Koch + + + * configure.in: Add "-lcap" when capabilities are requested. + Add the conditional CROSS_COMPILING. + * Makefile.am: Don't use checks when CROSS_COMPILING. + + +Wed Sep 15 16:22:17 CEST 1999 Werner Koch + + + * configure.in (ALL_LINGUAS): Add pt_PT. + + * configure.in: Some tweaks for cross compiling under MingW32 + * acconfig.h (USE_STATIC_RNDW32): New. + +Tue Sep 7 17:08:10 CEST 1999 Werner Koch + + + * VERSION: Set to 1.0.0. + +Mon Sep 6 19:59:08 CEST 1999 Werner Koch + + + * configure.in: Create makefile in doc/gph + + * acinclude.m4 (GNUPG_FUNC_MKDIR_TAKES_ONE_ARG): New + * configure.in: use the above. + +Thu Sep 2 16:40:55 CEST 1999 Werner Koch + + + * VERSION: Set to 0.9.11. + +Tue Aug 31 17:20:44 CEST 1999 Werner Koch + + * configure.in: Minor changes to the OS/2 and Mingw32 system labels. + Add a printable name for Hurd. + +Mon Aug 30 20:38:33 CEST 1999 Werner Koch + + * configure.in: Some support for DJGPP (Mark Elbrecht) + +Wed Aug 4 10:34:46 CEST 1999 Werner Koch + + * VERSION: Set to 0.9.10. + +Mon Jul 26 09:34:46 CEST 1999 Werner Koch + + * acinclude.m4 (GNUPG_SYS_SYMBOL_UNDERSCORE): remove init of ac_cv_... + + * Makefile.am (DISCLEANFILES): New + +Fri Jul 23 13:53:03 CEST 1999 Werner Koch + + * VERSION: Set to 0.9.9. + + * configure.in: Print a notice when rndunix is used. + +Thu Jul 15 10:15:35 CEST 1999 Werner Koch + + * acinclude.m4 (GNUPG_SYS_SYMBOL_UNDERSCORE): Fixed last modification. + +Wed Jul 7 13:08:40 CEST 1999 Werner Koch + + * Makefile.am: Support for libtool. + * configure.in: Ditto. + +Tue Jun 29 21:44:25 CEST 1999 Werner Koch + + * configure.in (use_local_zlib): The lost dollar is back. + + * acinclude.m4 (GNUPG_SYS_SYMBOL_UNDERSCORE): Add EMX case. + * configure.in: Another variant of the MX vendor string + + * configure.in (--with-capabilities): Some test code (Remi). + +Sat Jun 26 12:15:59 CEST 1999 Werner Koch + + * acinclude.m4 (GNUPG_CHECK_RDYNAMIC): Support for HPUX and IRIX. + * configure.in (HAVE_DL_SHL_LOAD): New for HPUX (Dave Dykstra). + + * VERSION: Now 0.9.8 + +Wed Jun 16 20:16:21 CEST 1999 Werner Koch + + * configure.in: Add test for docbook-to-man + +Tue Jun 15 12:21:08 CEST 1999 Werner Koch + + * acinclude.m4 (GNUPG_SYS_NM_PARSE): Support for {net,free}bsd, + +Thu Jun 10 14:18:23 CEST 1999 Werner Koch + + * configure.in (ZLIB,GDBM): Check both, header and lib. + +Sat Jun 5 15:30:33 CEST 1999 Werner Koch + + * pkclist.c (key_present_in_pk_list): New (Michael). + +Tue May 25 19:50:32 CEST 1999 Werner Koch + + * configure.in (IS_DEVELOPMENT_VERSION): Fixed detection. + +Sun May 23 14:20:22 CEST 1999 Werner Koch + + * acinclude.m4 (GNUPG_SYS_SYMBOL_UNDERSCORE): assume yes when + cross-compiling. + +Mon May 17 21:54:43 CEST 1999 Werner Koch + + * configure.in (socket): Fix for Unisys by Katsuhiro Kondou. + +Sat May 8 19:28:08 CEST 1999 Werner Koch + + * NEWS: Add a marker line which I forgot to do for 0.9.6. + +Thu May 6 14:18:17 CEST 1999 Werner Koch + + * README: Minor updates + + * VERSION: Now 0.9.6 + +Thu Apr 8 09:35:53 CEST 1999 Werner Koch + + * acinclude.m4 (GNUPG_CHECK_RDYNAMIC): Fix for + amiga-openbsd (Peter Reich) + (GNUPG_PROG_NM): Ditto + +Wed Apr 7 20:51:39 CEST 1999 Werner Koch + + * Makefile.am (g10defs.h): Removed. + * configure.in (AC_OUTPUT_COMMANDS): Create g10defs.h + +Sat Mar 20 12:55:33 CET 1999 Werner Koch + + * VERSION: Now 0.9.5 + +Sun Mar 14 19:34:36 CET 1999 Werner Koch + + * acinclude.m4 (AM_SYS_SYMBOL_UNDERSCORE): Removed because it is + now in the latest libtool. + +Thu Mar 11 16:39:46 CET 1999 Werner Koch + + * configure.in: Removed the need for libtool + +Mon Mar 8 20:47:17 CET 1999 Werner Koch + + * configure.in (DLSYM_NEEDS_UNDERSCORE): Replaced. + * acinclude.in (AM_SYS_SYMBOL_UNDERSCORE): New. + + * VERSION: Now 0.9.4 + +Sun Feb 28 19:11:00 CET 1999 Werner Koch + + * configure.in (dld): Test disabled. + +Fri Feb 26 17:55:41 CET 1999 Werner Koch + + * encode.c (encode_simple): temporary fix. + +Wed Feb 24 11:07:27 CET 1999 Werner Koch + + * configure.in: New option --enable-static-rnd. + +Mon Feb 22 20:04:00 CET 1999 Werner Koch + + * BUGS: Now we assign bug numbers. + * OBUGS: New to keep rack o fixed bugs (CVS only) + +Fri Feb 19 18:01:54 CET 1999 Werner Koch + + * VERSION: Released 0.9.3 + +Fri Feb 19 15:49:15 CET 1999 Werner Koch + + * acinclude.m4: Removed gettext macros. + +Tue Feb 16 14:10:02 CET 1999 Werner Koch + + * configure.in (socket): Check for -lsocket and -lnsl. + (osf4): Disable all warnings for DEC's cc. + (-Wall): Add more warning options for gcc + +Sat Feb 13 12:04:43 CET 1999 Werner Koch + + * configure.in: Changed detection of compiler flags. + * intl/ : Removed directory + +Wed Feb 10 17:15:39 CET 1999 Werner Koch + + * acinclude.m4 (GNUPG_CHECK_RDYNAMIC): Fix for freebsd 2.2 + + * configure.in: a lot of changes to allow selection of modules. + Add support for OS/2. + + * acinclude.m4: add some more caching + + * README: Spelling and grammar corrections (John A. Martin) + * INSTALL: Ditto. + +Wed Jan 20 21:40:21 CET 1999 Werner Koch + + * configure.in: --enable-m-guard is now default + +Wed Jan 13 12:49:36 CET 1999 Werner Koch + + * INSTALL: Applied new information how to build rpms by Fabio Coatti + * Makefile.in (gnupg.spec): Changed the names. + +Tue Jan 12 11:17:18 CET 1999 Werner Koch + + * config.links (m68k-atari-mint): New + +Tue Jan 12 09:17:19 CET 1999 Gaël Quéri + + * all: Fixed typos all over the place + +Sat Jan 9 16:02:23 CET 1999 Werner Koch + + * configure.in: Add a way to statically link rndunix + +Sun Jan 3 15:28:44 CET 1999 Werner Koch + + * acinclude.m4 (GNUPG_CHECK_RDYNAMIC): New. + * configure.in (DYNLOAD_CFLAGS): Use result from CHECK_RDYNAMIC + +Wed Dec 23 13:18:14 CET 1998 Werner Koch + + * README: Replaced the command overview with a short intro. + +Sat Dec 12 18:40:32 CET 1998 Werner Koch + + * configure.in: Add check for dlopen in libc (Greg Troxel) + and a new define + * acconfig.h (DLSYM_NEEDS_UNDERSCORE): New. + +Thu Dec 10 20:15:36 CET 1998 Werner Koch + + * acinclude.m (GNUPG_CHECK_PIC): New + * configure.in, acinclude.m4: Renamed all WK_ to GNUPG_ + +Tue Dec 8 15:09:29 CET 1998 Werner Koch + + * VERSION: Set to 0.4.5 + +Wed Nov 25 12:38:29 1998 Werner Koch (wk@isil.d.shuttle.de) + + * configure.in (USE_RNDLINUX): New. + +Fri Nov 20 19:34:57 1998 Werner Koch (wk@isil.d.shuttle.de) + + * VERSION: Released 0.4.4 + + * configure.in (try_asm_modules): For option --disable-asm + +Tue Nov 10 19:32:40 1998 Werner Koch (wk@isil.d.shuttle.de) + + * configure.in (MPI_SFLAGS): New. + +Tue Nov 10 13:44:53 1998 Werner Koch (wk@isil.d.shuttle.de) + + * ABOUT-NLS: New + * configure.in (AC_REVISION): New. + +Sun Nov 8 18:20:35 1998 Werner Koch (wk@isil.d.shuttle.de) + + * VERSION: Set to 0.4.3 + +Sun Oct 25 19:49:37 1998 Werner Koch (wk@isil.d.shuttle.de) + + * Makefile.am (g10defs.h): New macro GNUPG_DATADIR. + +Wed Oct 21 17:24:24 1998 Werner Koch (wk@isil.d.shuttle.de) + + * configure.in: Removed gettext kludge + * acinclude.m4: Add patched AM_WITH_NKS macro + +Tue Oct 20 19:03:36 1998 Werner Koch (wk@isil.d.shuttle.de) + + * configure.in: Kludge to make AM_GNU_GETTEXT work, + changed some macors to more modern versions. Also + changeg the all makefiles to remove duplicate ../intl. + * acinclude.m4: Removed the gettext stuff, as this + already comes with automake now. + +Wed Oct 14 12:11:34 1998 Werner Koch (wk@isil.d.shuttle.de) + + * configure.in (NAME_OF_DEV_RANDOM): New. + (DYNLINK_MOD_CFLAGS): New. + +Thu Oct 8 10:55:15 1998 Werner Koch (wk@isil.d.shuttle.de) + + * Makefile.am (g10defs.h): creates include file + * acconfig.h: now includes g10defs.h + * configure.in: Removed G10_LOCALEDIR and GNUPG_LIB + +Thu Sep 17 18:49:40 1998 Werner Koch (wk@(none)) + + * Makefile.am (dist-hook): Now creates RPM file. + * scripts/gnupg.spec: New template file for RPMs + +Thu Jul 30 19:17:07 1998 Werner Koch (wk@(none)) + + * acinclude.h (WK_CHECK_IPC): New + * configure.in : Add checks for SysV IPC + +Thu Jun 25 11:18:49 1998 Werner Koch (wk@isil.d.shuttle.de) + + * configure.in (--disable-dynload): New. + +Wed Jun 10 07:48:59 1998 Werner Koch,mobil,,, (wk@tobold) + + * configure.in (GNUPG_LIBDIR): New. + +Mon May 25 19:10:59 1998 Werner Koch (wk@isil.d.shuttle.de) + + * rand-unix.c (fast_random_poll): fixed syntax bug. + +Mon May 11 10:21:31 1998 Werner Koch (wk@isil.d.shuttle.de) + + * configure.in (PRINTABLE_OS_NAME): Linux is now GNU/Linux + +Tue Apr 14 19:08:05 1998 Werner Koch (wk@isil.d.shuttle.de) + + * [all files]: Applied Matthew Skala's typo and grammar fixes. + +Wed Mar 4 10:32:40 1998 Werner Koch (wk@isil.d.shuttle.de) + + * configure.in (getrusage,gettimeofday): New tests. + +Fri Feb 27 13:14:17 1998 Werner Koch (wk@isil.d.shuttle.de) + + * configure.in (--disable-m-guard): New. + +Thu Feb 26 17:09:27 1998 Werner Koch (wk@isil.d.shuttle.de) + + * configure.in, acinclude.m4, intl/, po/: New macros taken + from GNOME, switched to automake 1.2f + +Thu Feb 26 09:05:46 1998 Werner Koch (wk@isil.d.shuttle.de) + + * configure.in (doc/Makefile): New + +Thu Feb 26 07:40:47 1998 Werner Koch (wk@isil.d.shuttle.de) + + * configure.in: Changed gettext stuff + +Wed Feb 25 11:44:10 1998 Werner Koch (wk@isil.d.shuttle.de) + + * checks/*test : restructured the directory. + +Tue Feb 24 15:59:12 1998 Werner Koch (wk@isil.d.shuttle.de) + + * configure.in: Changed the name of the package to GNUPG and + chnaged several other names too. + +Wed Feb 18 17:36:45 1998 Werner Koch (wk@isil.d.shuttle.de) + + * Makefile.am (checks): New. + +Sat Feb 14 15:37:55 1998 Werner Koch (wk@isil.d.shuttle.de) + + * configure.in (mpi_config_done): Removed asm links caching. + +Sat Feb 14 14:02:20 1998 Werner Koch (wk@isil.d.shuttle.de) + + * configure.in (PRINTABLE_OS_NAME): New. + * acconfig.h: Likewise. + +Fri Feb 13 19:43:41 1998 Werner Koch (wk@isil.d.shuttle.de) + + * configure.in : Fixed zlib stuff + * Makefile.am: Likewise + + + Copyright 1998, 1999, 2000, 2001, 2002, 2003, + 2004 Free Software Foundation, Inc. + + This file is free software; as a special exception the author gives + unlimited permission to copy and/or distribute it, with or without + modifications, as long as this notice is preserved. + + This file is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY, to the extent permitted by law; without even the + implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + Added: branches/LIBGCRYPT-2.0-MO/src/subsystems/README =================================================================== --- branches/LIBGCRYPT-2.0-MO/src/subsystems/README 2005-10-01 21:23:35 UTC (rev 1117) +++ branches/LIBGCRYPT-2.0-MO/src/subsystems/README 2005-10-01 21:30:32 UTC (rev 1118) @@ -0,0 +1,5 @@ +This directory contains the subsystems integrated in Libgcrypt, one +per sub-directory: + + asym-cipher/... + Modified: branches/LIBGCRYPT-2.0-MO/src/subsystems/mpi/arch/alpha/distfiles =================================================================== --- branches/LIBGCRYPT-2.0-MO/src/subsystems/mpi/arch/alpha/distfiles 2005-10-01 21:23:35 UTC (rev 1117) +++ branches/LIBGCRYPT-2.0-MO/src/subsystems/mpi/arch/alpha/distfiles 2005-10-01 21:30:32 UTC (rev 1118) @@ -6,6 +6,4 @@ mpih-mul3.S mpih-lshift.S mpih-rshift.S - udiv-qrnnd.S - Modified: branches/LIBGCRYPT-2.0-MO/src/subsystems/mpi/arch/generic/distfiles =================================================================== --- branches/LIBGCRYPT-2.0-MO/src/subsystems/mpi/arch/generic/distfiles 2005-10-01 21:23:35 UTC (rev 1117) +++ branches/LIBGCRYPT-2.0-MO/src/subsystems/mpi/arch/generic/distfiles 2005-10-01 21:30:32 UTC (rev 1118) @@ -1,4 +1,3 @@ -Manifest mpih-add1.c mpih-mul1.c mpih-mul2.c Modified: branches/LIBGCRYPT-2.0-MO/src/subsystems/mpi/arch/i386/distfiles =================================================================== --- branches/LIBGCRYPT-2.0-MO/src/subsystems/mpi/arch/i386/distfiles 2005-10-01 21:23:35 UTC (rev 1117) +++ branches/LIBGCRYPT-2.0-MO/src/subsystems/mpi/arch/i386/distfiles 2005-10-01 21:30:32 UTC (rev 1118) @@ -1,4 +1,3 @@ -Manifest mpih-add1.S mpih-mul1.S mpih-mul2.S Modified: branches/LIBGCRYPT-2.0-MO/src/subsystems/mpi/arch/i586/distfiles =================================================================== --- branches/LIBGCRYPT-2.0-MO/src/subsystems/mpi/arch/i586/distfiles 2005-10-01 21:23:35 UTC (rev 1117) +++ branches/LIBGCRYPT-2.0-MO/src/subsystems/mpi/arch/i586/distfiles 2005-10-01 21:30:32 UTC (rev 1118) @@ -1,4 +1,3 @@ -Manifest mpih-add1.S mpih-mul1.S mpih-mul2.S Modified: branches/LIBGCRYPT-2.0-MO/src/subsystems/mpi/arch/m68k/distfiles =================================================================== --- branches/LIBGCRYPT-2.0-MO/src/subsystems/mpi/arch/m68k/distfiles 2005-10-01 21:23:35 UTC (rev 1117) +++ branches/LIBGCRYPT-2.0-MO/src/subsystems/mpi/arch/m68k/distfiles 2005-10-01 21:30:32 UTC (rev 1118) @@ -1,4 +1,3 @@ -Manifest syntax.h mpih-lshift.S mpih-rshift.S Modified: branches/LIBGCRYPT-2.0-MO/src/subsystems/mpi/arch/m68k/mc68020/distfiles =================================================================== --- branches/LIBGCRYPT-2.0-MO/src/subsystems/mpi/arch/m68k/mc68020/distfiles 2005-10-01 21:23:35 UTC (rev 1117) +++ branches/LIBGCRYPT-2.0-MO/src/subsystems/mpi/arch/m68k/mc68020/distfiles 2005-10-01 21:30:32 UTC (rev 1118) @@ -1,4 +1,3 @@ -Manifest mpih-mul1.S mpih-mul2.S mpih-mul3.S Modified: branches/LIBGCRYPT-2.0-MO/src/subsystems/mpi/arch/mips3/distfiles =================================================================== --- branches/LIBGCRYPT-2.0-MO/src/subsystems/mpi/arch/mips3/distfiles 2005-10-01 21:23:35 UTC (rev 1117) +++ branches/LIBGCRYPT-2.0-MO/src/subsystems/mpi/arch/mips3/distfiles 2005-10-01 21:30:32 UTC (rev 1118) @@ -1,4 +1,3 @@ -Manifest README mpih-add1.S mpih-sub1.S Modified: branches/LIBGCRYPT-2.0-MO/src/subsystems/mpi/arch/pa7100/distfiles =================================================================== --- branches/LIBGCRYPT-2.0-MO/src/subsystems/mpi/arch/pa7100/distfiles 2005-10-01 21:23:35 UTC (rev 1117) +++ branches/LIBGCRYPT-2.0-MO/src/subsystems/mpi/arch/pa7100/distfiles 2005-10-01 21:30:32 UTC (rev 1118) @@ -1,4 +1,3 @@ -Manifest mpih-lshift.S mpih-rshift.S Modified: branches/LIBGCRYPT-2.0-MO/src/subsystems/mpi/arch/power/distfiles =================================================================== --- branches/LIBGCRYPT-2.0-MO/src/subsystems/mpi/arch/power/distfiles 2005-10-01 21:23:35 UTC (rev 1117) +++ branches/LIBGCRYPT-2.0-MO/src/subsystems/mpi/arch/power/distfiles 2005-10-01 21:30:32 UTC (rev 1118) @@ -1,4 +1,3 @@ -Manifest mpih-add1.S mpih-lshift.S mpih-mul1.S Modified: branches/LIBGCRYPT-2.0-MO/src/subsystems/mpi/arch/powerpc32/distfiles =================================================================== --- branches/LIBGCRYPT-2.0-MO/src/subsystems/mpi/arch/powerpc32/distfiles 2005-10-01 21:23:35 UTC (rev 1117) +++ branches/LIBGCRYPT-2.0-MO/src/subsystems/mpi/arch/powerpc32/distfiles 2005-10-01 21:30:32 UTC (rev 1118) @@ -1,4 +1,3 @@ -Manifest mpih-add1.S mpih-sub1.S mpih-mul1.S Modified: branches/LIBGCRYPT-2.0-MO/src/subsystems/mpi/arch/sparc32/distfiles =================================================================== --- branches/LIBGCRYPT-2.0-MO/src/subsystems/mpi/arch/sparc32/distfiles 2005-10-01 21:23:35 UTC (rev 1117) +++ branches/LIBGCRYPT-2.0-MO/src/subsystems/mpi/arch/sparc32/distfiles 2005-10-01 21:30:32 UTC (rev 1118) @@ -1,4 +1,3 @@ -Manifest mpih-lshift.S mpih-rshift.S mpih-add1.S Modified: branches/LIBGCRYPT-2.0-MO/src/subsystems/mpi/arch/sparc32v8/distfiles =================================================================== --- branches/LIBGCRYPT-2.0-MO/src/subsystems/mpi/arch/sparc32v8/distfiles 2005-10-01 21:23:35 UTC (rev 1117) +++ branches/LIBGCRYPT-2.0-MO/src/subsystems/mpi/arch/sparc32v8/distfiles 2005-10-01 21:30:32 UTC (rev 1118) @@ -1,4 +1,3 @@ -Manifest mpih-mul1.S mpih-mul2.S mpih-mul3.S Modified: branches/LIBGCRYPT-2.0-MO/src/subsystems/mpi/arch/supersparc/distfiles =================================================================== --- branches/LIBGCRYPT-2.0-MO/src/subsystems/mpi/arch/supersparc/distfiles 2005-10-01 21:23:35 UTC (rev 1117) +++ branches/LIBGCRYPT-2.0-MO/src/subsystems/mpi/arch/supersparc/distfiles 2005-10-01 21:30:32 UTC (rev 1118) @@ -1,3 +1,2 @@ -Manifest udiv.S From cvs at cvs.gnupg.org Sat Oct 1 23:31:24 2005 From: cvs at cvs.gnupg.org (svn author marcus) Date: Sat Oct 1 23:03:00 2005 Subject: [svn] gpgme - r1113 - in trunk: . gpgme Message-ID: Author: marcus Date: 2005-10-01 23:31:24 +0200 (Sat, 01 Oct 2005) New Revision: 1113 Modified: trunk/ChangeLog trunk/NEWS trunk/configure.ac trunk/gpgme/gpgme.h Log: 2005-10-01 Marcus Brinkmann Released 1.1.0. * configure.ac (LIBGPGME_LT_CURRENT, LIBGPGME_LT_AGE): Bump for release. (LIBGPGME_LT_REVISION): Reset to 0 for release. Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2005-10-01 21:02:48 UTC (rev 1112) +++ trunk/ChangeLog 2005-10-01 21:31:24 UTC (rev 1113) @@ -1,3 +1,11 @@ +2005-10-01 Marcus Brinkmann + + Released 1.1.0. + + * configure.ac (LIBGPGME_LT_CURRENT, LIBGPGME_LT_AGE): Bump for + release. + (LIBGPGME_LT_REVISION): Reset to 0 for release. + 2005-09-12 Marcus Brinkmann * configure.ac (HAVE_PTH): Don't add $PTH_CFLAGS to $CFLAGS here. Modified: trunk/NEWS =================================================================== --- trunk/NEWS 2005-10-01 21:02:48 UTC (rev 1112) +++ trunk/NEWS 2005-10-01 21:31:24 UTC (rev 1113) @@ -1,4 +1,4 @@ -Noteworthy changes in version 1.1.0 (unreleased) +Noteworthy changes in version 1.1.0 (2005-10-01) ------------------------------------------------ * You can now configure the backend engine file name and home @@ -1115,7 +1115,7 @@ * Made the W32 support more robust. - Copyright 2001, 2002, 2003, 2004 g10 Code GmbH + Copyright 2001, 2002, 2003, 2004, 2005 g10 Code GmbH This file is free software; as a special exception the author gives unlimited permission to copy and/or distribute it, with or without Modified: trunk/configure.ac =================================================================== --- trunk/configure.ac 2005-10-01 21:02:48 UTC (rev 1112) +++ trunk/configure.ac 2005-10-01 21:31:24 UTC (rev 1113) @@ -24,18 +24,18 @@ min_automake_version="1.9.3" # Version number: Remember to change it immediately *after* a release. -AC_INIT(gpgme, 1.1.0-cvs, [bug-gpgme@gnupg.org]) +AC_INIT(gpgme, 1.1.0, [bug-gpgme@gnupg.org]) # LT Version numbers, remember to change them just *before* a release. # (Code changed: REVISION++) # (Interfaces added/removed/changed: CURRENT++, REVISION=0) # (Interfaces added: AGE++) # (Interfaces removed/changed: AGE=0) # -LIBGPGME_LT_CURRENT=14 +LIBGPGME_LT_CURRENT=16 # Subtract 2 from this value if you want to make the LFS transition an # ABI break. [Note to self: Remove this comment with the next regular break.] -LIBGPGME_LT_AGE=3 -LIBGPGME_LT_REVISION=3 +LIBGPGME_LT_AGE=5 +LIBGPGME_LT_REVISION=0 # If the API is changed in an incompatible way: increment the next counter. GPGME_CONFIG_API_VERSION=1 Modified: trunk/gpgme/gpgme.h =================================================================== --- trunk/gpgme/gpgme.h 2005-10-01 21:02:48 UTC (rev 1112) +++ trunk/gpgme/gpgme.h 2005-10-01 21:31:24 UTC (rev 1113) @@ -72,7 +72,7 @@ AM_PATH_GPGME macro) check that this header matches the installed library. Warning: Do not edit the next line. configure will do that for you! */ -#define GPGME_VERSION "1.1.0-cvs" +#define GPGME_VERSION "1.1.0" From cvs at cvs.gnupg.org Sat Oct 1 23:39:48 2005 From: cvs at cvs.gnupg.org (svn author marcus) Date: Sat Oct 1 23:11:24 2005 Subject: [svn] gpgme - r1114 - trunk Message-ID: Author: marcus Date: 2005-10-01 23:39:42 +0200 (Sat, 01 Oct 2005) New Revision: 1114 Modified: trunk/NEWS Log: Fix typo. Modified: trunk/NEWS =================================================================== --- trunk/NEWS 2005-10-01 21:31:24 UTC (rev 1113) +++ trunk/NEWS 2005-10-01 21:39:42 UTC (rev 1114) @@ -33,7 +33,7 @@ to local government regulations. * You can associate a filename with a data object using the new - function gpgme_data_set_filename(). This filename will be stored + function gpgme_data_set_file_name(). This filename will be stored in the output when encrypting or signing the data and will be returned when decrypting or verifying the output data. @@ -53,7 +53,8 @@ GPGME_STATUS_PLAINTEXT NEW gpgme_key_t EXTENDED: New field is_qualified. gpgme_subkey_t EXTENDED: New field is_qualified. -gpgme_data_set_filename NEW +gpgme_data_get_file_name NEW +gpgme_data_set_file_name NEW gpgme_sig_notation_flags_t NEW GPGME_SIG_NOTATION_HUMAN_READABLE NEW GPGME_SIG_NOTATAION_CRITICAL NEW From cvs at cvs.gnupg.org Sat Oct 1 23:49:24 2005 From: cvs at cvs.gnupg.org (svn author marcus) Date: Sat Oct 1 23:21:01 2005 Subject: [svn] gpgme - r1115 - tags Message-ID: Author: marcus Date: 2005-10-01 23:49:24 +0200 (Sat, 01 Oct 2005) New Revision: 1115 Added: tags/gpgme-1-1-0/ Log: Released 1.1.0. Copied: tags/gpgme-1-1-0 (from rev 1114, trunk) From cvs at cvs.gnupg.org Sat Oct 1 23:58:34 2005 From: cvs at cvs.gnupg.org (svn author marcus) Date: Sat Oct 1 23:30:11 2005 Subject: [svn] gpgme - r1116 - in trunk: . gpgme Message-ID: Author: marcus Date: 2005-10-01 23:58:29 +0200 (Sat, 01 Oct 2005) New Revision: 1116 Modified: trunk/NEWS trunk/configure.ac trunk/gpgme/gpgme.h Log: Post-release fixup. Modified: trunk/NEWS =================================================================== --- trunk/NEWS 2005-10-01 21:49:24 UTC (rev 1115) +++ trunk/NEWS 2005-10-01 21:58:29 UTC (rev 1116) @@ -1,3 +1,14 @@ +Noteworthy changes in version 1.x.y (unreleased) +------------------------------------------------ + + * bla bla bla ... + + * Interface changes relative to the 1.0.3 release: +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +something changed +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + Noteworthy changes in version 1.1.0 (2005-10-01) ------------------------------------------------ Modified: trunk/configure.ac =================================================================== --- trunk/configure.ac 2005-10-01 21:49:24 UTC (rev 1115) +++ trunk/configure.ac 2005-10-01 21:58:29 UTC (rev 1116) @@ -24,7 +24,7 @@ min_automake_version="1.9.3" # Version number: Remember to change it immediately *after* a release. -AC_INIT(gpgme, 1.1.0, [bug-gpgme@gnupg.org]) +AC_INIT(gpgme, 1.2.0-cvs, [bug-gpgme@gnupg.org]) # LT Version numbers, remember to change them just *before* a release. # (Code changed: REVISION++) # (Interfaces added/removed/changed: CURRENT++, REVISION=0) Modified: trunk/gpgme/gpgme.h =================================================================== --- trunk/gpgme/gpgme.h 2005-10-01 21:49:24 UTC (rev 1115) +++ trunk/gpgme/gpgme.h 2005-10-01 21:58:29 UTC (rev 1116) @@ -72,7 +72,7 @@ AM_PATH_GPGME macro) check that this header matches the installed library. Warning: Do not edit the next line. configure will do that for you! */ -#define GPGME_VERSION "1.1.0" +#define GPGME_VERSION "1.2.0-cvs" From cvs at cvs.gnupg.org Sun Oct 2 00:14:41 2005 From: cvs at cvs.gnupg.org (svn author marcus) Date: Sat Oct 1 23:46:17 2005 Subject: [svn] gpgme - r1117 - trunk/doc Message-ID: Author: marcus Date: 2005-10-02 00:14:40 +0200 (Sun, 02 Oct 2005) New Revision: 1117 Modified: trunk/doc/ChangeLog trunk/doc/gpgme.texi Log: 2005-10-01 Marcus Brinkmann * gpgme.texi: Enclose all return parameters of deftypefuns in curly brackets. Modified: trunk/doc/ChangeLog =================================================================== --- trunk/doc/ChangeLog 2005-10-01 21:58:29 UTC (rev 1116) +++ trunk/doc/ChangeLog 2005-10-01 22:14:40 UTC (rev 1117) @@ -1,5 +1,8 @@ 2005-10-01 Marcus Brinkmann + * gpgme.texi: Enclose all return parameters of deftypefuns in + curly brackets. + * gpgme.texi (Signature Notation Data): New section. (Verify): Added more about the notation data structure. Modified: trunk/doc/gpgme.texi =================================================================== --- trunk/doc/gpgme.texi 2005-10-01 21:58:29 UTC (rev 1116) +++ trunk/doc/gpgme.texi 2005-10-01 22:14:40 UTC (rev 1117) @@ -744,7 +744,7 @@ @end deftp -@deftypefun const char *gpgme_get_protocol_name (@w{gpgme_protocol_t @var{protocol}}) +@deftypefun {const char *} gpgme_get_protocol_name (@w{gpgme_protocol_t @var{protocol}}) The function @code{gpgme_get_protocol_name} returns a statically allocated string describing the protocol @var{protocol}, or @code{NULL} if the protocol number is not valid. @@ -1815,7 +1815,7 @@ @cindex data buffer, file name @cindex data buffer, encoding -@deftypefun char *gpgme_data_get_file_name (@w{gpgme_data_t @var{dh}}) +@deftypefun {char *} gpgme_data_get_file_name (@w{gpgme_data_t @var{dh}}) The function @code{gpgme_data_get_file_name} returns a pointer to a string containing the file name associated with the data object. The file name will be stored in the output when encrypting or signing the From cvs at cvs.gnupg.org Sun Oct 2 00:15:20 2005 From: cvs at cvs.gnupg.org (svn author marcus) Date: Sat Oct 1 23:46:58 2005 Subject: [svn] gpgme - r1118 - trunk/doc Message-ID: Author: marcus Date: 2005-10-02 00:15:20 +0200 (Sun, 02 Oct 2005) New Revision: 1118 Modified: trunk/doc/gpgme.texi Log: Fix copyright year. Modified: trunk/doc/gpgme.texi =================================================================== --- trunk/doc/gpgme.texi 2005-10-01 22:14:40 UTC (rev 1117) +++ trunk/doc/gpgme.texi 2005-10-01 22:15:20 UTC (rev 1118) @@ -21,7 +21,7 @@ @value{VERSION}. @c NOTE: Don't forget to update the year for the TeX version, too. -Copyright @copyright{} 2002, 2003, 2004 g10 Code GmbH. +Copyright @copyright{} 2002, 2003, 2004, 2005 g10 Code GmbH. The GPGME reference manual is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -54,7 +54,7 @@ @center for version @value{VERSION} @page @vskip 0pt plus 1filll -Copyright @copyright{} 2002, 2003, 2004 g10 Code GmbH. +Copyright @copyright{} 2002, 2003, 2004, 2005 g10 Code GmbH. The GPGME reference manual is free software; you can redistribute it From cvs at cvs.gnupg.org Sun Oct 2 00:17:04 2005 From: cvs at cvs.gnupg.org (svn author marcus) Date: Sat Oct 1 23:48:41 2005 Subject: [svn] gpgme - r1119 - trunk Message-ID: Author: marcus Date: 2005-10-02 00:17:03 +0200 (Sun, 02 Oct 2005) New Revision: 1119 Modified: trunk/TODO Log: Add item about docs. Modified: trunk/TODO =================================================================== --- trunk/TODO 2005-10-01 22:15:20 UTC (rev 1118) +++ trunk/TODO 2005-10-01 22:17:03 UTC (rev 1119) @@ -4,6 +4,7 @@ ** Some gpg tests fail with gpg 1.3.4-cvs (gpg/t-keylist-sig) The test is currently disabled there and in gpg/t-import. ** Add notation data to key signatures. +** In gpgme.texi: Register callbacks under the right letter in the index. * ABI's to break: ** gpgme_edit_cb_t: Add "processed" return argument From cvs at cvs.gnupg.org Sun Oct 2 16:39:33 2005 From: cvs at cvs.gnupg.org (svn author marcus) Date: Sun Oct 2 16:11:07 2005 Subject: [svn] gpgme - r1120 - in trunk: . doc gpgme Message-ID: Author: marcus Date: 2005-10-02 16:39:31 +0200 (Sun, 02 Oct 2005) New Revision: 1120 Modified: trunk/NEWS trunk/doc/ChangeLog trunk/doc/gpgme.texi trunk/gpgme/ChangeLog trunk/gpgme/conversion.c trunk/gpgme/gpgme.c trunk/gpgme/gpgme.h trunk/gpgme/key.c trunk/gpgme/keylist.c trunk/gpgme/ops.h trunk/gpgme/rungpg.c trunk/gpgme/sig-notation.c trunk/gpgme/util.h trunk/gpgme/verify.c Log: doc/ 2005-10-02 Marcus Brinkmann * gpgme.texi (Key Management): Add the new member notations of gpgme_sig_key_t. (Key Listing Mode): Document GPGME_KEYLIST_MODE_SIG_NOTATIONS. gpgme/ 2005-10-02 Marcus Brinkmann * util.h (_gpgme_decode_percent_string): Add new argument BINARY to prototype. * verify.c (parse_notation): Likewise for invocation. * conversion.c (_gpgme_decode_percent_string): Likewise to declaration. If set, do not replace '\0' characters with a printable string. * gpgme.h (struct _gpgme_key_sig): New field notations. * ops.h (_gpgme_parse_notation): New prototype. * sig-notation.c (_gpgme_parse_notation): New function. * key.c (gpgme_key_unref): Free all signature notations. * keylist.c (op_data_t): New member tmp_keysig. (finish_key): Clear OPD->tmp_keysig. * gpgme.c (gpgme_set_keylist_mode): Remove check. * rungpg.c (gpg_keylist): Support listing signature notations. (gpg_keylist_ext): Likewise. Modified: trunk/NEWS =================================================================== --- trunk/NEWS 2005-10-01 22:17:03 UTC (rev 1119) +++ trunk/NEWS 2005-10-02 14:39:31 UTC (rev 1120) @@ -1,11 +1,15 @@ Noteworthy changes in version 1.x.y (unreleased) ------------------------------------------------ - * bla bla bla ... + * Reading signature notations and policy URLs on key signatures is + supported. They can be found in the new field notations of the + gpgme_key_sig_t structure. This has to be enabled with the keylist + mode flag GPGME_KEYLIST_MODE_SIG_NOTATIONS. * Interface changes relative to the 1.0.3 release: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -something changed +gpgme_key_sig_t EXTENDED: New field notations. +GPGME_KEYLIST_MODE_SIG_NOTATIONS NEW ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Modified: trunk/doc/ChangeLog =================================================================== --- trunk/doc/ChangeLog 2005-10-01 22:17:03 UTC (rev 1119) +++ trunk/doc/ChangeLog 2005-10-02 14:39:31 UTC (rev 1120) @@ -1,3 +1,9 @@ +2005-10-02 Marcus Brinkmann + + * gpgme.texi (Key Management): Add the new member notations of + gpgme_sig_key_t. + (Key Listing Mode): Document GPGME_KEYLIST_MODE_SIG_NOTATIONS. + 2005-10-01 Marcus Brinkmann * gpgme.texi: Enclose all return parameters of deftypefuns in Modified: trunk/doc/gpgme.texi =================================================================== --- trunk/doc/gpgme.texi 2005-10-01 22:17:03 UTC (rev 1119) +++ trunk/doc/gpgme.texi 2005-10-02 14:39:31 UTC (rev 1120) @@ -2136,6 +2136,12 @@ The @code{GPGME_KEYLIST_MODE_SIGS} symbol specifies that the key signatures should be included in the listed keys. +@item GPGME_KEYLIST_MODE_SIG_NOTATIONS +The @code{GPGME_KEYLIST_MODE_SIG_NOTATIONS} symbol specifies that the +signature notations on key signatures should be included in the listed +keys. This only works if @code{GPGME_KEYLIST_MODE_SIGS} is also +enabled. + @item GPGME_KEYLIST_MODE_VALIDATE The @code{GPGME_KEYLIST_MODE_VALIDATE} symbol specifies that the backend should do key or certificate validation and not just get the @@ -2403,8 +2409,14 @@ The signatures on a key are only available if the key was retrieved via a listing operation with the @code{GPGME_KEYLIST_MODE_SIGS} mode -enabled, because it is expensive to retrieve all signatures of a key. +enabled, because it can be expensive to retrieve all signatures of a +key. +The signature notations on a key signature are only available if the +key was retrieved via a listing operation with the +@code{GPGME_KEYLIST_MODE_SIG_NOTATIONS} mode enabled, because it can +be expensive to retrieve all signature notations. + The key signature structure has the following members: @table @code @@ -2458,6 +2470,9 @@ @item char *email This is the email component of @code{uid}, if available. + +@item gpgme_sig_notation_t notations +This is a linked list with the notation data and policy URLs. @end table @end deftp Modified: trunk/gpgme/ChangeLog =================================================================== --- trunk/gpgme/ChangeLog 2005-10-01 22:17:03 UTC (rev 1119) +++ trunk/gpgme/ChangeLog 2005-10-02 14:39:31 UTC (rev 1120) @@ -1,3 +1,21 @@ +2005-10-02 Marcus Brinkmann + + * util.h (_gpgme_decode_percent_string): Add new argument BINARY + to prototype. + * verify.c (parse_notation): Likewise for invocation. + * conversion.c (_gpgme_decode_percent_string): Likewise to + declaration. If set, do not replace '\0' characters with a + printable string. + * gpgme.h (struct _gpgme_key_sig): New field notations. + * ops.h (_gpgme_parse_notation): New prototype. + * sig-notation.c (_gpgme_parse_notation): New function. + * key.c (gpgme_key_unref): Free all signature notations. + * keylist.c (op_data_t): New member tmp_keysig. + (finish_key): Clear OPD->tmp_keysig. + * gpgme.c (gpgme_set_keylist_mode): Remove check. + * rungpg.c (gpg_keylist): Support listing signature notations. + (gpg_keylist_ext): Likewise. + 2005-10-01 Marcus Brinkmann * engine.h (_gpgme_set_engine_info): Add prototype. Modified: trunk/gpgme/conversion.c =================================================================== --- trunk/gpgme/conversion.c 2005-10-01 22:17:03 UTC (rev 1119) +++ trunk/gpgme/conversion.c 2005-10-02 14:39:31 UTC (rev 1120) @@ -174,9 +174,11 @@ large enough buffer is allocated with malloc and *DESTP is set to the result. Currently, LEN is only used to specify if allocation is desired or not, the caller is expected to make sure that *DESTP - is large enough if LEN is not zero. */ + is large enough if LEN is not zero. If BINARY is 1, then '\0' + characters are allowed in the output. */ gpgme_error_t -_gpgme_decode_percent_string (const char *src, char **destp, size_t len) +_gpgme_decode_percent_string (const char *src, char **destp, size_t len, + int binary) { char *dest; @@ -222,7 +224,7 @@ } else { - if (!val) + if (!val && !binary) { /* A binary zero is not representable in a C string. */ Modified: trunk/gpgme/gpgme.c =================================================================== --- trunk/gpgme/gpgme.c 2005-10-01 22:17:03 UTC (rev 1119) +++ trunk/gpgme/gpgme.c 2005-10-02 14:39:31 UTC (rev 1120) @@ -251,11 +251,6 @@ gpgme_error_t gpgme_set_keylist_mode (gpgme_ctx_t ctx, gpgme_keylist_mode_t mode) { - if (!((mode & GPGME_KEYLIST_MODE_LOCAL) - || (mode & GPGME_KEYLIST_MODE_EXTERN) - || (mode & GPGME_KEYLIST_MODE_SIGS))) - return gpg_error (GPG_ERR_INV_VALUE); - ctx->keylist_mode = mode; return 0; } Modified: trunk/gpgme/gpgme.h =================================================================== --- trunk/gpgme/gpgme.h 2005-10-01 22:17:03 UTC (rev 1119) +++ trunk/gpgme/gpgme.h 2005-10-02 14:39:31 UTC (rev 1120) @@ -305,10 +305,11 @@ /* The available keylist mode flags. */ -#define GPGME_KEYLIST_MODE_LOCAL 1 -#define GPGME_KEYLIST_MODE_EXTERN 2 -#define GPGME_KEYLIST_MODE_SIGS 4 -#define GPGME_KEYLIST_MODE_VALIDATE 256 +#define GPGME_KEYLIST_MODE_LOCAL 1 +#define GPGME_KEYLIST_MODE_EXTERN 2 +#define GPGME_KEYLIST_MODE_SIGS 4 +#define GPGME_KEYLIST_MODE_SIG_NOTATIONS 8 +#define GPGME_KEYLIST_MODE_VALIDATE 256 typedef unsigned int gpgme_keylist_mode_t; @@ -594,6 +595,12 @@ /* Crypto backend specific signature class. */ unsigned int sig_class; + + /* Notation data and policy URLs. */ + gpgme_sig_notation_t notations; + + /* Internal to GPGME, do not use. */ + gpgme_sig_notation_t _last_notation; }; typedef struct _gpgme_key_sig *gpgme_key_sig_t; Modified: trunk/gpgme/key.c =================================================================== --- trunk/gpgme/key.c 2005-10-01 22:17:03 UTC (rev 1119) +++ trunk/gpgme/key.c 2005-10-02 14:39:31 UTC (rev 1120) @@ -337,9 +337,19 @@ while (keysig) { - gpgme_key_sig_t next = keysig->next; + gpgme_key_sig_t next_keysig = keysig->next; + gpgme_sig_notation_t notation = keysig->notations; + + while (notation) + { + gpgme_sig_notation_t next_notation = notation->next; + + _gpgme_sig_notation_free (notation); + notation = next_notation; + } + free (keysig); - keysig = next; + keysig = next_keysig; } free (uid); uid = next_uid; Modified: trunk/gpgme/keylist.c =================================================================== --- trunk/gpgme/keylist.c 2005-10-01 22:17:03 UTC (rev 1119) +++ trunk/gpgme/keylist.c 2005-10-02 14:39:31 UTC (rev 1120) @@ -48,8 +48,13 @@ struct _gpgme_op_keylist_result result; gpgme_key_t tmp_key; + /* This points to the last uid in tmp_key. */ gpgme_user_id_t tmp_uid; + + /* This points to the last sig in tmp_uid. */ + gpgme_key_sig_t tmp_keysig; + /* Something new is available. */ int key_cond; struct key_queue_item_s *key_queue; @@ -64,9 +69,10 @@ if (opd->tmp_key) gpgme_key_unref (opd->tmp_key); - /* opd->tmp_uid is actually part of opd->tmp_key, so we do not need - to release it here. */ + /* opd->tmp_uid and opd->tmp_keysig are actually part of opd->tmp_key, + so we do not need to release them here. */ + while (key) { struct key_queue_item_s *next = key->next; @@ -351,6 +357,7 @@ opd->tmp_key = NULL; opd->tmp_uid = NULL; + opd->tmp_keysig = NULL; if (key) _gpgme_engine_io_event (ctx->engine, GPGME_EVENT_NEXT_KEY, key); @@ -365,7 +372,7 @@ enum { RT_NONE, RT_SIG, RT_UID, RT_SUB, RT_PUB, RT_FPR, - RT_SSB, RT_SEC, RT_CRT, RT_CRS, RT_REV + RT_SSB, RT_SEC, RT_CRT, RT_CRS, RT_REV, RT_SPK } rectype = RT_NONE; #define NR_FIELDS 13 @@ -423,6 +430,8 @@ rectype = RT_SUB; else if (!strcmp (field[0], "ssb") && key) rectype = RT_SSB; + else if (!strcmp (field[0], "spk") && key) + rectype = RT_SPK; else rectype = RT_NONE; @@ -432,6 +441,12 @@ if (rectype != RT_SIG && rectype != RT_REV) opd->tmp_uid = NULL; + /* Only look at subpackets immediately following a signature. For + this, clear the signature pointer when encountering anything but + a subpacket. */ + if (rectype != RT_SPK) + opd->tmp_keysig = NULL; + switch (rectype) { case RT_PUB: @@ -673,8 +688,51 @@ if (field[10][2] == 'x') keysig->exportable = 1; } + + opd->tmp_keysig = keysig; break; + case RT_SPK: + if (!opd->tmp_keysig) + return 0; + assert (opd->tmp_keysig == key->_last_uid->_last_keysig); + + if (fields >= 4) + { + /* Field 2 has the subpacket type. */ + int type = atoi (field[1]); + + /* Field 3 has the flags. */ + int flags = atoi (field[2]); + + /* Field 4 has the length. */ + int len = atoi (field[3]); + + /* Field 5 has the data. */ + char *data = field[4]; + + /* Type 20: Notation data. */ + /* Type 26: Policy URL. */ + if (type == 20 || type == 26) + { + gpgme_sig_notation_t notation; + + keysig = opd->tmp_keysig; + + /* At this time, any error is serious. */ + err = _gpgme_parse_notation (¬ation, type, flags, len, data); + if (err) + return err; + + /* Add a new notation. FIXME: Could be factored out. */ + if (!keysig->notations) + keysig->notations = notation; + if (keysig->_last_notation) + keysig->_last_notation->next = notation; + keysig->_last_notation = notation; + } + } + case RT_NONE: /* Unknown record. */ break; Modified: trunk/gpgme/ops.h =================================================================== --- trunk/gpgme/ops.h 2005-10-01 22:17:03 UTC (rev 1119) +++ trunk/gpgme/ops.h 2005-10-02 14:39:31 UTC (rev 1120) @@ -160,4 +160,10 @@ pointer is ignored. */ void _gpgme_sig_notation_free (gpgme_sig_notation_t notation); +/* Parse a notation or policy URL subpacket. If the packet type is + not known, return no error but NULL in NOTATION. */ +gpgme_error_t _gpgme_parse_notation (gpgme_sig_notation_t *notationp, + int type, int pkflags, int len, + char *data); + #endif /* OPS_H */ Modified: trunk/gpgme/rungpg.c =================================================================== --- trunk/gpgme/rungpg.c 2005-10-01 22:17:03 UTC (rev 1119) +++ trunk/gpgme/rungpg.c 2005-10-02 14:39:31 UTC (rev 1120) @@ -1617,6 +1617,13 @@ err = add_arg (gpg, "--with-fingerprint"); if (!err) err = add_arg (gpg, "--with-fingerprint"); + if (!err && (mode & GPGME_KEYLIST_MODE_SIGS) + && (mode & GPGME_KEYLIST_MODE_SIG_NOTATIONS)) + { + err = add_arg (gpg, "--list-options"); + if (!err) + err = add_arg (gpg, "show-sig-subpackets=\"20,26\""); + } if (!err) err = add_arg (gpg, secret_only ? "--list-secret-keys" : ((mode & GPGME_KEYLIST_MODE_SIGS) @@ -1652,6 +1659,13 @@ err = add_arg (gpg, "--with-fingerprint"); if (!err) err = add_arg (gpg, "--with-fingerprint"); + if (!err && (mode & GPGME_KEYLIST_MODE_SIGS) + && (mode & GPGME_KEYLIST_MODE_SIG_NOTATIONS)) + { + err = add_arg (gpg, "--list-options"); + if (!err) + err = add_arg (gpg, "show-sig-subpackets=\"20,26\""); + } if (!err) err = add_arg (gpg, secret_only ? "--list-secret-keys" : ((mode & GPGME_KEYLIST_MODE_SIGS) Modified: trunk/gpgme/sig-notation.c =================================================================== --- trunk/gpgme/sig-notation.c 2005-10-01 22:17:03 UTC (rev 1119) +++ trunk/gpgme/sig-notation.c 2005-10-02 14:39:31 UTC (rev 1120) @@ -80,7 +80,10 @@ if (!notation) return gpg_error_from_errno (errno); - if (name_len) + /* This is critical. We want to reliably identify policy URLs by + using a NULL pointer for NAME. So all notations must have a NAME + string, even if it is empty. */ + if (name) { /* We add a trailing '\0' for stringification in the good case. */ @@ -96,7 +99,7 @@ notation->name_len = name_len; } - if (value_len) + if (value) { /* We add a trailing '\0' for stringification in the good case. */ @@ -121,3 +124,137 @@ _gpgme_sig_notation_free (notation); return err; } + + +/* GnuPG subpacket flags. */ + +/* This subpacket data is part of the hashed data. */ +#define GNUPG_SPK_HASHED 0x01 + +/* This subpacket is marked critical. */ +#define GNUPG_SPK_CRITICAL 0x02 + +/* Parse a notation or policy URL subpacket. If the packet type is + not known, return no error but NULL in NOTATION. */ +gpgme_error_t +_gpgme_parse_notation (gpgme_sig_notation_t *notationp, + int type, int pkflags, int len, char *data) +{ + gpgme_error_t err; + char *name = NULL; + int name_len = 0; + char *value = NULL; + int value_len = 0; + gpgme_sig_notation_flags_t flags = 0; + char *decoded_data; + unsigned char *bdata; + + /* Type 20: Notation data. */ + /* Type 26: Policy URL. */ + if (type != 20 && type != 26) + { + *notationp = NULL; + return 0; + } + + /* A few simple sanity checks. */ + if (len > strlen (data)) + return gpg_error (GPG_ERR_INV_ENGINE); + + /* See below for the format of a notation subpacket. It has at + least four octets of flags and two times two octets of length + information. */ + if (type == 20 && len < 4 + 2 + 2) + return gpg_error (GPG_ERR_INV_ENGINE); + + err = _gpgme_decode_percent_string (data, &decoded_data, 0, 1); + if (err) + return err; + bdata = (unsigned char *) decoded_data; + + /* Flags common to notation data and policy URL. */ + if (pkflags & GNUPG_SPK_CRITICAL) + flags |= GPGME_SIG_NOTATION_CRITICAL; + + /* This information is relevant in parsing multi-octet numbers below: + + 3.1. Scalar numbers + + Scalar numbers are unsigned, and are always stored in big-endian + format. Using n[k] to refer to the kth octet being interpreted, + the value of a two-octet scalar is ((n[0] << 8) + n[1]). The + value of a four-octet scalar is ((n[0] << 24) + (n[1] << 16) + + (n[2] << 8) + n[3]). + + From RFC2440: OpenPGP Message Format. Copyright (C) The Internet + Society (1998). All Rights Reserved. */ +#define RFC2440_GET_WORD(chr) ((((int)((unsigned char *)(chr))[0]) << 8) \ + + ((int)((unsigned char *)(chr))[1])) + + if (type == 20) + { + /* 5.2.3.15. Notation Data + + (4 octets of flags, 2 octets of name length (M), + 2 octets of value length (N), M octets of name data, + N octets of value data) + + [...] The "flags" field holds four octets of flags. + All undefined flags MUST be zero. Defined flags are: + + First octet: 0x80 = human-readable. [...] + Other octets: none. + + From RFC2440: OpenPGP Message Format. Copyright (C) The + Internet Society (1998). All Rights Reserved. */ + + int chr; + + /* First octet of flags. */ +#define RFC2440_SPK20_FLAG1_HUMAN_READABLE 0x80 + + chr = *bdata; + bdata++; + + if (chr & RFC2440_SPK20_FLAG1_HUMAN_READABLE) + flags |= GPGME_SIG_NOTATION_HUMAN_READABLE; + + /* The second, third and four octet of flags are unused. */ + bdata++; + bdata++; + bdata++; + + name_len = RFC2440_GET_WORD (bdata); + bdata += 2; + + value_len = RFC2440_GET_WORD (bdata); + bdata += 2; + + /* Small sanity check. */ + if (4 + 2 + 2 + name_len + value_len > len) + { + free (decoded_data); + return gpg_error (GPG_ERR_INV_ENGINE); + } + + name = (char *) bdata; + bdata += name_len; + + value = (char *) bdata; + } + else + { + /* Type is 26. */ + + /* NAME is NULL, name_len is 0. */ + + value = (char *) bdata; + value_len = strlen (value); + } + + err = _gpgme_sig_notation_create (notationp, name, name_len, + value, value_len, flags); + + free (decoded_data); + return err; +} Modified: trunk/gpgme/util.h =================================================================== --- trunk/gpgme/util.h 2005-10-01 22:17:03 UTC (rev 1119) +++ trunk/gpgme/util.h 2005-10-02 14:39:31 UTC (rev 1120) @@ -80,9 +80,10 @@ large enough buffer is allocated with malloc and *DESTP is set to the result. Currently, LEN is only used to specify if allocation is desired or not, the caller is expected to make sure that *DESTP - is large enough if LEN is not zero. */ + is large enough if LEN is not zero. If BINARY is 1, then '\0' + characters are allowed in the output. */ gpgme_error_t _gpgme_decode_percent_string (const char *src, char **destp, - size_t len); + size_t len, int binary); /* Parse the string TIMESTAMP into a time_t. The string may either be Modified: trunk/gpgme/verify.c =================================================================== --- trunk/gpgme/verify.c 2005-10-01 22:17:03 UTC (rev 1119) +++ trunk/gpgme/verify.c 2005-10-02 14:39:31 UTC (rev 1120) @@ -434,7 +434,7 @@ if (code == GPGME_STATUS_NOTATION_NAME) { - err = _gpgme_decode_percent_string (args, ¬ation->name, 0); + err = _gpgme_decode_percent_string (args, ¬ation->name, 0, 0); if (err) { _gpgme_sig_notation_free (notation); @@ -453,7 +453,7 @@ { /* This is a policy URL. */ - err = _gpgme_decode_percent_string (args, ¬ation->value, 0); + err = _gpgme_decode_percent_string (args, ¬ation->value, 0, 0); if (err) { _gpgme_sig_notation_free (notation); @@ -497,7 +497,7 @@ dest += cur_len; } - err = _gpgme_decode_percent_string (args, &dest, len); + err = _gpgme_decode_percent_string (args, &dest, len, 0); if (err) return err; From cvs at cvs.gnupg.org Sun Oct 2 16:41:03 2005 From: cvs at cvs.gnupg.org (svn author marcus) Date: Sun Oct 2 16:12:36 2005 Subject: [svn] gpgme - r1121 - trunk Message-ID: Author: marcus Date: 2005-10-02 16:41:03 +0200 (Sun, 02 Oct 2005) New Revision: 1121 Modified: trunk/TODO Log: Update some items. Modified: trunk/TODO =================================================================== --- trunk/TODO 2005-10-02 14:39:31 UTC (rev 1120) +++ trunk/TODO 2005-10-02 14:41:03 UTC (rev 1121) @@ -3,8 +3,6 @@ * Before release: ** Some gpg tests fail with gpg 1.3.4-cvs (gpg/t-keylist-sig) The test is currently disabled there and in gpg/t-import. -** Add notation data to key signatures. -** In gpgme.texi: Register callbacks under the right letter in the index. * ABI's to break: ** gpgme_edit_cb_t: Add "processed" return argument @@ -69,6 +67,7 @@ * Documentation ** Document validity and trust issues. +** In gpgme.texi: Register callbacks under the right letter in the index. * Engines ** Do not create/destroy engines, but create engine and then reset it. From cvs at cvs.gnupg.org Sun Oct 2 16:55:33 2005 From: cvs at cvs.gnupg.org (svn author marcus) Date: Sun Oct 2 16:27:05 2005 Subject: [svn] gpgme - r1122 - trunk Message-ID: Author: marcus Date: 2005-10-02 16:55:33 +0200 (Sun, 02 Oct 2005) New Revision: 1122 Modified: trunk/TODO Log: Update some items. Modified: trunk/TODO =================================================================== --- trunk/TODO 2005-10-02 14:41:03 UTC (rev 1121) +++ trunk/TODO 2005-10-02 14:55:33 UTC (rev 1122) @@ -3,7 +3,8 @@ * Before release: ** Some gpg tests fail with gpg 1.3.4-cvs (gpg/t-keylist-sig) The test is currently disabled there and in gpg/t-import. - +** When gpg supports it, write binary subpackets directly, + and parse SUBPACKET status lines. * ABI's to break: ** gpgme_edit_cb_t: Add "processed" return argument (see edit.c::command_handler). @@ -125,8 +126,8 @@ *** Test gpgme_data_seek for invalid types. ** t-keylist Write a test for ext_keylist. +** Test reading key signatures. - * Debug ** Handle malloc and vasprintf errors. But decide first if they should be ignored (and logged with 255?!), or really be assertions. ! From cvs at cvs.gnupg.org Sun Oct 2 21:41:38 2005 From: cvs at cvs.gnupg.org (svn author marcus) Date: Sun Oct 2 21:13:12 2005 Subject: [svn] gpg-error - r145 - trunk Message-ID: Author: marcus Date: 2005-10-02 21:41:37 +0200 (Sun, 02 Oct 2005) New Revision: 145 Modified: trunk/config.guess trunk/config.sub trunk/ltmain.sh Log: 2005-10-02 Marcus Brinkmann * configure.ac: Escape arguments in AC_INIT invocation. * config.guess, config.sub, ltmain.sh: Update. m4/ 2005-10-02 Marcus Brinkmann * libtool.m4: Update. Modified: trunk/config.guess =================================================================== --- trunk/config.guess 2005-10-02 19:39:29 UTC (rev 144) +++ trunk/config.guess 2005-10-02 19:41:37 UTC (rev 145) @@ -1,9 +1,9 @@ #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. +# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. -timestamp='2004-11-12' +timestamp='2005-08-03' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -17,13 +17,15 @@ # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA +# 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. + # Originally written by Per Bothner . # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. @@ -53,7 +55,7 @@ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO @@ -66,11 +68,11 @@ while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) - echo "$timestamp" ; exit 0 ;; + echo "$timestamp" ; exit ;; --version | -v ) - echo "$version" ; exit 0 ;; + echo "$version" ; exit ;; --help | --h* | -h ) - echo "$usage"; exit 0 ;; + echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. @@ -123,7 +125,7 @@ ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ;' +esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) @@ -196,55 +198,20 @@ # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" - exit 0 ;; - amd64:OpenBSD:*:*) - echo x86_64-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - amiga:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - cats:OpenBSD:*:*) - echo arm-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - hp300:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - luna88k:OpenBSD:*:*) - echo m88k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mac68k:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - macppc:OpenBSD:*:*) - echo powerpc-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvme68k:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvme88k:OpenBSD:*:*) - echo m88k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvmeppc:OpenBSD:*:*) - echo powerpc-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - sgi:OpenBSD:*:*) - echo mips64-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - sun3:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; + exit ;; *:OpenBSD:*:*) - echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} + exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} - exit 0 ;; + exit ;; macppc:MirBSD:*:*) echo powerppc-unknown-mirbsd${UNAME_RELEASE} - exit 0 ;; + exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} - exit 0 ;; + exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) @@ -297,40 +264,43 @@ # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit 0 ;; + exit ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix - exit 0 ;; + exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 - exit 0 ;; + exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 - exit 0;; + exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos - exit 0 ;; + exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos - exit 0 ;; + exit ;; *:OS/390:*:*) echo i370-ibm-openedition - exit 0 ;; + exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe - exit 0 ;; + exit ;; *:OS400:*:*) echo powerpc-ibm-os400 - exit 0 ;; + exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} - exit 0;; + exit ;; + arm:riscos:*:*|arm:RISCOS:*:*) + echo arm-unknown-riscos + exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp - exit 0;; + exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then @@ -338,32 +308,32 @@ else echo pyramid-pyramid-bsd fi - exit 0 ;; + exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 - exit 0 ;; + exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 - exit 0 ;; + exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7 && exit 0 ;; + sparc) echo sparc-icl-nx7; exit ;; esac ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; + exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; + exit ;; i86pc:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; + exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; + exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) @@ -372,10 +342,10 @@ esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit 0 ;; + exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} - exit 0 ;; + exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 @@ -387,10 +357,10 @@ echo sparc-sun-sunos${UNAME_RELEASE} ;; esac - exit 0 ;; + exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} - exit 0 ;; + exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor @@ -401,40 +371,40 @@ # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} - exit 0 ;; + exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} - exit 0 ;; + exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} - exit 0 ;; + exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} - exit 0 ;; + exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} - exit 0 ;; + exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} - exit 0 ;; + exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} - exit 0 ;; + exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} - exit 0 ;; + exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 - exit 0 ;; + exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} - exit 0 ;; + exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} - exit 0 ;; + exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} - exit 0 ;; + exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c @@ -458,32 +428,33 @@ exit (-1); } EOF - $CC_FOR_BUILD -o $dummy $dummy.c \ - && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ - && exit 0 + $CC_FOR_BUILD -o $dummy $dummy.c && + dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`$dummy $dummyarg` && + { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} - exit 0 ;; + exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax - exit 0 ;; + exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax - exit 0 ;; + exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax - exit 0 ;; + exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix - exit 0 ;; + exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 - exit 0 ;; + exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 - exit 0 ;; + exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 - exit 0 ;; + exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` @@ -499,29 +470,29 @@ else echo i586-dg-dgux${UNAME_RELEASE} fi - exit 0 ;; + exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 - exit 0 ;; + exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 - exit 0 ;; + exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 - exit 0 ;; + exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd - exit 0 ;; + exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` - exit 0 ;; + exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix - exit 0 ;; + exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` @@ -529,7 +500,7 @@ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} - exit 0 ;; + exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build @@ -544,14 +515,18 @@ exit(0); } EOF - $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 - echo rs6000-ibm-aix3.2.5 + if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` + then + echo "$SYSTEM_NAME" + else + echo rs6000-ibm-aix3.2.5 + fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi - exit 0 ;; + exit ;; *:AIX:*:[45]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then @@ -565,28 +540,28 @@ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} - exit 0 ;; + exit ;; *:AIX:*:*) echo rs6000-ibm-aix - exit 0 ;; + exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 - exit 0 ;; + exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to - exit 0 ;; # report: romp-ibm BSD 4.3 + exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx - exit 0 ;; + exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 - exit 0 ;; + exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd - exit 0 ;; + exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 - exit 0 ;; + exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in @@ -648,9 +623,19 @@ esac if [ ${HP_ARCH} = "hppa2.0w" ] then - # avoid double evaluation of $set_cc_for_build - test -n "$CC_FOR_BUILD" || eval $set_cc_for_build - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null + eval $set_cc_for_build + + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler + # generating 64-bit code. GNU and HP use different nomenclature: + # + # $ CC_FOR_BUILD=cc ./config.guess + # => hppa2.0w-hp-hpux11.23 + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess + # => hppa64-hp-hpux11.23 + + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | + grep __LP64__ >/dev/null then HP_ARCH="hppa2.0w" else @@ -658,11 +643,11 @@ fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit 0 ;; + exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} - exit 0 ;; + exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c @@ -690,158 +675,166 @@ exit (0); } EOF - $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 + $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 - exit 0 ;; + exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd - exit 0 ;; + exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd - exit 0 ;; + exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix - exit 0 ;; + exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf - exit 0 ;; + exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf - exit 0 ;; + exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi - exit 0 ;; + exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites - exit 0 ;; + exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd - exit 0 ;; + exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi - exit 0 ;; + exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd - exit 0 ;; + exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd - exit 0 ;; + exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd - exit 0 ;; + exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; + exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' - exit 0 ;; + exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; + exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; + exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; + exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; + exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit 0 ;; + exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit 0 ;; + exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} - exit 0 ;; + exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} - exit 0 ;; + exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit 0 ;; + exit ;; *:FreeBSD:*:*) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit 0 ;; + exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin - exit 0 ;; + exit ;; i*:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 - exit 0 ;; + exit ;; + i*:windows32*:*) + # uname -m includes "-pc" on this system. + echo ${UNAME_MACHINE}-mingw32 + exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 - exit 0 ;; + exit ;; x86:Interix*:[34]*) echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' - exit 0 ;; + exit ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks - exit 0 ;; + exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix - exit 0 ;; + exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin - exit 0 ;; + exit ;; + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) + echo x86_64-unknown-cygwin + exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin - exit 0 ;; + exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; + exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit 0 ;; + exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu - exit 0 ;; + exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix - exit 0 ;; + exit ;; arm*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; + exit ;; cris:Linux:*:*) echo cris-axis-linux-gnu - exit 0 ;; + exit ;; crisv32:Linux:*:*) echo crisv32-axis-linux-gnu - exit 0 ;; + exit ;; frv:Linux:*:*) echo frv-unknown-linux-gnu - exit 0 ;; + exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; + exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; + exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; + exit ;; mips:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c @@ -859,7 +852,7 @@ #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` - test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; mips64:Linux:*:*) eval $set_cc_for_build @@ -878,14 +871,17 @@ #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` - test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; + or32:Linux:*:*) + echo or32-unknown-linux-gnu + exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu - exit 0 ;; + exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu - exit 0 ;; + exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; @@ -899,7 +895,7 @@ objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} - exit 0 ;; + exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in @@ -907,25 +903,25 @@ PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac - exit 0 ;; + exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu - exit 0 ;; + exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux - exit 0 ;; + exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; + exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; + exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; + exit ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu - exit 0 ;; + exit ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent @@ -943,15 +939,15 @@ ;; a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" - exit 0 ;; + exit ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" - exit 0 ;; + exit ;; "") # Either a pre-BFD a.out linker (linux-gnuoldld) or # one that does not give us useful --help. echo "${UNAME_MACHINE}-pc-linux-gnuoldld" - exit 0 ;; + exit ;; esac # Determine whether the default compiler is a.out or elf eval $set_cc_for_build @@ -979,15 +975,18 @@ #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` - test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 - test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 + test x"${LIBC}" != x && { + echo "${UNAME_MACHINE}-pc-linux-${LIBC}" + exit + } + test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 - exit 0 ;; + exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... @@ -995,27 +994,27 @@ # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - exit 0 ;; + exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx - exit 0 ;; + exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop - exit 0 ;; + exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos - exit 0 ;; - i*86:syllable:*:*) + exit ;; + i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable - exit 0 ;; + exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; + exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp - exit 0 ;; + exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then @@ -1023,15 +1022,16 @@ else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi - exit 0 ;; - i*86:*:5:[78]*) + exit ;; + i*86:*:5:[678]*) + # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} - exit 0 ;; + exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi - exit 0 ;; + exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv - exit 0 ;; + exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv - exit 0 ;; + exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix - exit 0 ;; + exit ;; M68*:*:R3V[5678]*:*) - test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && echo i486-ncr-sysv4.3${OS_REL} && exit 0 + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && echo i486-ncr-sysv4 && exit 0 ;; + && { echo i486-ncr-sysv4; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; + exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 - exit 0 ;; + exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; + exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; + exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; + exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} - exit 0 ;; + exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 - exit 0 ;; + exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 - exit 0 ;; + exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` @@ -1123,61 +1123,65 @@ else echo ns32k-sni-sysv fi - exit 0 ;; + exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 - exit 0 ;; + exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 - exit 0 ;; + exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 - exit 0 ;; + exit ;; + i*86:VOS:*:*) + # From Paul.Green@stratus.com. + echo ${UNAME_MACHINE}-stratus-vos + exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos - exit 0 ;; + exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} - exit 0 ;; + exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 - exit 0 ;; + exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi - exit 0 ;; + exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos - exit 0 ;; + exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos - exit 0 ;; + exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos - exit 0 ;; + exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} - exit 0 ;; + exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} - exit 0 ;; + exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} - exit 0 ;; + exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} - exit 0 ;; + exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} - exit 0 ;; + exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in @@ -1185,7 +1189,7 @@ unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} - exit 0 ;; + exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then @@ -1193,22 +1197,25 @@ UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} - exit 0 ;; + exit ;; *:QNX:*:4*) echo i386-pc-qnx - exit 0 ;; + exit ;; + NSE-?:NONSTOP_KERNEL:*:*) + echo nse-tandem-nsk${UNAME_RELEASE} + exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} - exit 0 ;; + exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux - exit 0 ;; + exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv - exit 0 ;; + exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} - exit 0 ;; + exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 @@ -1219,41 +1226,44 @@ UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 - exit 0 ;; + exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 - exit 0 ;; + exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex - exit 0 ;; + exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 - exit 0 ;; + exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 - exit 0 ;; + exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 - exit 0 ;; + exit ;; *:ITS:*:*) echo pdp10-unknown-its - exit 0 ;; + exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} - exit 0 ;; + exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit 0 ;; + exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in - A*) echo alpha-dec-vms && exit 0 ;; - I*) echo ia64-dec-vms && exit 0 ;; - V*) echo vax-dec-vms && exit 0 ;; + A*) echo alpha-dec-vms ; exit ;; + I*) echo ia64-dec-vms ; exit ;; + V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix - exit 0 ;; + exit ;; + i*86:skyos:*:*) + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' + exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 @@ -1285,7 +1295,7 @@ #endif #if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix"); exit (0); + printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) @@ -1374,11 +1384,12 @@ } EOF -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0 +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) @@ -1387,22 +1398,22 @@ case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd - exit 0 ;; + exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi - exit 0 ;; + exit ;; c34*) echo c34-convex-bsd - exit 0 ;; + exit ;; c38*) echo c38-convex-bsd - exit 0 ;; + exit ;; c4*) echo c4-convex-bsd - exit 0 ;; + exit ;; esac fi @@ -1413,7 +1424,9 @@ the operating system you are using. It is advised that you download the most up to date version of the config scripts from - ftp://ftp.gnu.org/pub/gnu/config/ + http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess +and + http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub If the version you run ($0) is already up to date, please send the following data and any information you think might be Modified: trunk/config.sub =================================================================== --- trunk/config.sub 2005-10-02 19:39:29 UTC (rev 144) +++ trunk/config.sub 2005-10-02 19:41:37 UTC (rev 145) @@ -1,9 +1,9 @@ #! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. +# 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. -timestamp='2004-11-30' +timestamp='2005-07-08' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -21,14 +21,15 @@ # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, -# Boston, MA 02111-1307, USA. - +# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA +# 02110-1301, USA. +# # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. + # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # @@ -70,7 +71,7 @@ version="\ GNU config.sub ($timestamp) -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO @@ -83,11 +84,11 @@ while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) - echo "$timestamp" ; exit 0 ;; + echo "$timestamp" ; exit ;; --version | -v ) - echo "$version" ; exit 0 ;; + echo "$version" ; exit ;; --help | --h* | -h ) - echo "$usage"; exit 0 ;; + echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. @@ -99,7 +100,7 @@ *local*) # First pass through any local machine types. echo $1 - exit 0;; + exit ;; * ) break ;; @@ -231,13 +232,14 @@ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ + | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ - | m32r | m32rle | m68000 | m68k | m88k | mcore \ + | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ @@ -246,6 +248,7 @@ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ @@ -254,15 +257,17 @@ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ + | ms1 \ | msp430 \ | ns16k | ns32k \ - | openrisc | or32 \ + | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ - | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ + | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ - | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \ + | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b \ | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ @@ -271,6 +276,9 @@ | z8k) basic_machine=$basic_machine-unknown ;; + m32c) + basic_machine=$basic_machine-unknown + ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown @@ -298,7 +306,7 @@ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* \ - | bs2000-* \ + | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ @@ -310,7 +318,7 @@ | ip2k-* | iq2000-* \ | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | mcore-* \ + | m88110-* | m88k-* | maxq-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ @@ -319,6 +327,7 @@ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ + | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ @@ -327,6 +336,7 @@ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ + | ms1-* \ | msp430-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ @@ -334,9 +344,10 @@ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ - | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \ + | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ @@ -348,6 +359,8 @@ | ymp-* \ | z8k-*) ;; + m32c-*) + ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) @@ -758,9 +771,8 @@ basic_machine=hppa1.1-oki os=-proelf ;; - or32 | or32-*) + openrisc | openrisc-*) basic_machine=or32-unknown - os=-coff ;; os400) basic_machine=powerpc-ibm @@ -1086,12 +1098,9 @@ we32k) basic_machine=we32k-att ;; - sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) + sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; - sh64) - basic_machine=sh64-unknown - ;; sparc | sparcv8 | sparcv9 | sparcv9b) basic_machine=sparc-sun ;; @@ -1178,7 +1187,8 @@ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*) + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ + | -skyos* | -haiku*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1196,7 +1206,7 @@ os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) @@ -1385,6 +1395,9 @@ *-be) os=-beos ;; + *-haiku) + os=-haiku + ;; *-ibm) os=-aix ;; @@ -1556,7 +1569,7 @@ esac echo $basic_machine$os -exit 0 +exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) Modified: trunk/ltmain.sh =================================================================== --- trunk/ltmain.sh 2005-10-02 19:39:29 UTC (rev 144) +++ trunk/ltmain.sh 2005-10-02 19:41:37 UTC (rev 145) @@ -44,7 +44,7 @@ PROGRAM=ltmain.sh PACKAGE=libtool VERSION=1.5.6 -TIMESTAMP=" (1.1220.2.95 2004/04/11 05:50:42) Debian$Rev: 224 $" +TIMESTAMP=" (1.1220.2.95 2004/04/11 05:50:42) Debian$Rev$" # Check that we have a working $echo. From cvs at cvs.gnupg.org Mon Oct 3 14:47:44 2005 From: cvs at cvs.gnupg.org (svn author marcus) Date: Mon Oct 3 14:19:15 2005 Subject: [svn] GnuPG - r3900 - in trunk: . scripts Message-ID: Author: marcus Date: 2005-10-03 14:47:43 +0200 (Mon, 03 Oct 2005) New Revision: 3900 Modified: trunk/ChangeLog trunk/configure.ac trunk/scripts/ChangeLog trunk/scripts/autogen.sh Log: 2005-10-02 Marcus Brinkmann * configure.ac [!$try_gettext]: Invoke AM_PO_SUBDIRS. scripts/ 2005-10-02 Marcus Brinkmann * autogen.sh (DIE): Remove ugly hack for po dir suppression. Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2005-09-28 22:45:05 UTC (rev 3899) +++ trunk/ChangeLog 2005-10-03 12:47:43 UTC (rev 3900) @@ -1,3 +1,7 @@ +2005-10-02 Marcus Brinkmann + + * configure.ac [!$try_gettext]: Invoke AM_PO_SUBDIRS. + 2005-08-31 David Shaw * configure.ac: Check for getpwnam, getpwuid, and pwd.h. Modified: trunk/configure.ac =================================================================== --- trunk/configure.ac 2005-09-28 22:45:05 UTC (rev 3899) +++ trunk/configure.ac 2005-10-03 12:47:43 UTC (rev 3900) @@ -708,6 +708,7 @@ AC_SUBST(USE_NLS) AC_SUBST(USE_INCLUDED_LIBINTL) AC_SUBST(BUILD_INCLUDED_LIBINTL) + AM_PO_SUBDIRS fi if test "$try_extensions" = yes || test x"$card_support" = xyes ; then Modified: trunk/scripts/ChangeLog =================================================================== --- trunk/scripts/ChangeLog 2005-09-28 22:45:05 UTC (rev 3899) +++ trunk/scripts/ChangeLog 2005-10-03 12:47:43 UTC (rev 3900) @@ -1,3 +1,7 @@ +2005-10-02 Marcus Brinkmann + + * autogen.sh (DIE): Remove ugly hack for po dir suppression. + 2005-08-21 David Shaw * gnupg.spec.in: Distribute gpg-zip. Modified: trunk/scripts/autogen.sh =================================================================== --- trunk/scripts/autogen.sh 2005-09-28 22:45:05 UTC (rev 3899) +++ trunk/scripts/autogen.sh 2005-10-03 12:47:43 UTC (rev 3900) @@ -99,12 +99,6 @@ $tsdir/configure ${conf_CC} --build=${build} --host=${host} \ ${disable_foo_tests} $* - - # Ugly hack to overcome a gettext problem. Someone should look into - # gettext to figure out why the po directory is not ignored as it used - # to be. - [ $? = 0 ] && touch $tsdir/po/all - exit $? fi From cvs at cvs.gnupg.org Wed Oct 5 12:07:46 2005 From: cvs at cvs.gnupg.org (svn author wk) Date: Wed Oct 5 11:39:02 2005 Subject: [svn] gcry - r1119 - in branches/LIBGCRYPT-1-2-BRANCH: . src Message-ID: Author: wk Date: 2005-10-05 12:07:45 +0200 (Wed, 05 Oct 2005) New Revision: 1119 Modified: branches/LIBGCRYPT-1-2-BRANCH/ChangeLog branches/LIBGCRYPT-1-2-BRANCH/Makefile.am branches/LIBGCRYPT-1-2-BRANCH/NEWS branches/LIBGCRYPT-1-2-BRANCH/README branches/LIBGCRYPT-1-2-BRANCH/configure.ac branches/LIBGCRYPT-1-2-BRANCH/src/gcrypt.h Log: Releasing 1.2.2 Modified: branches/LIBGCRYPT-1-2-BRANCH/ChangeLog =================================================================== --- branches/LIBGCRYPT-1-2-BRANCH/ChangeLog 2005-10-01 21:30:32 UTC (rev 1118) +++ branches/LIBGCRYPT-1-2-BRANCH/ChangeLog 2005-10-05 10:07:45 UTC (rev 1119) @@ -1,3 +1,9 @@ +2005-10-05 Werner Koch + + Released 1.2.2. + + * configure.ac: Set LT to C13/A1/R1. + 2005-09-14 Werner Koch * configure.ac: New option --enable-noexecstack. Modified: branches/LIBGCRYPT-1-2-BRANCH/Makefile.am =================================================================== --- branches/LIBGCRYPT-1-2-BRANCH/Makefile.am 2005-10-01 21:30:32 UTC (rev 1118) +++ branches/LIBGCRYPT-1-2-BRANCH/Makefile.am 2005-10-05 10:07:45 UTC (rev 1119) @@ -22,7 +22,7 @@ DIST_SUBDIRS = mpi cipher src doc tests w32-dll SUBDIRS = mpi cipher src doc tests -EXTRA_DIST = BUGS autogen.sh README.apichanges README.CVS +EXTRA_DIST = BUGS autogen.sh README.apichanges README.SVN DISTCLEANFILES = Modified: branches/LIBGCRYPT-1-2-BRANCH/NEWS =================================================================== --- branches/LIBGCRYPT-1-2-BRANCH/NEWS 2005-10-01 21:30:32 UTC (rev 1118) +++ branches/LIBGCRYPT-1-2-BRANCH/NEWS 2005-10-05 10:07:45 UTC (rev 1119) @@ -1,12 +1,13 @@ -Noteworthy changes in version 1.2.2 +Noteworthy changes in version 1.2.2 (2005-10-05} ------------------------------------------------ * Made the RNG immune against fork without exec. * Minor changes to some function declarations. Buffer arguments are now typed as void pointer. This should not affect any compilation. - A bug in the definition of gcry_cipher_register has been fixed. + * A bug in the definition of gcry_cipher_register has been fixed. + * Interface changes relative to the 1.2.1 release: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ gcry_cipher_encrypt CHANGED: Arguments IN and OUT are now void*. Modified: branches/LIBGCRYPT-1-2-BRANCH/README =================================================================== --- branches/LIBGCRYPT-1-2-BRANCH/README 2005-10-01 21:30:32 UTC (rev 1118) +++ branches/LIBGCRYPT-1-2-BRANCH/README 2005-10-05 10:07:45 UTC (rev 1119) @@ -2,7 +2,7 @@ ------------------------------------ Version 1.2.1 - Copyright 2000, 2002, 2003, 2004 Free Software Foundation, Inc. + Copyright 2000, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This file is free software; as a special exception the author gives unlimited permission to copy and/or distribute it, with or without Modified: branches/LIBGCRYPT-1-2-BRANCH/configure.ac =================================================================== --- branches/LIBGCRYPT-1-2-BRANCH/configure.ac 2005-10-01 21:30:32 UTC (rev 1118) +++ branches/LIBGCRYPT-1-2-BRANCH/configure.ac 2005-10-05 10:07:45 UTC (rev 1119) @@ -27,7 +27,7 @@ # but remove a "-cvs" prefix right *before* a release and append it # soon later. -AC_INIT(libgcrypt, 1.2.2-cvs, bug-libgcrypt@gnupg.org) +AC_INIT(libgcrypt, 1.2.2, bug-libgcrypt@gnupg.org) # LT Version numbers, remember to change them just *before* a release. # (Interfaces removed: CURRENT++, AGE=0, REVISION=0) @@ -35,7 +35,7 @@ # (No interfaces changed: REVISION++) LIBGCRYPT_LT_CURRENT=13 LIBGCRYPT_LT_AGE=2 -LIBGCRYPT_LT_REVISION=0 +LIBGCRYPT_LT_REVISION=1 # If the API is changed in an incompatible way: increment the next counter. LIBGCRYPT_CONFIG_API_VERSION=1 Modified: branches/LIBGCRYPT-1-2-BRANCH/src/gcrypt.h =================================================================== --- branches/LIBGCRYPT-1-2-BRANCH/src/gcrypt.h 2005-10-01 21:30:32 UTC (rev 1118) +++ branches/LIBGCRYPT-1-2-BRANCH/src/gcrypt.h 2005-10-05 10:07:45 UTC (rev 1119) @@ -49,7 +49,7 @@ autoconf (using the AM_PATH_GCRYPT macro) check that this header matches the installed library. Note: Do not edit the next line as configure may fix the string here. */ -#define GCRYPT_VERSION "1.2.2-cvs" +#define GCRYPT_VERSION "1.2.2" /* Internal: We can't use the convenience macros for the multi precision integer functions when building this library. */ From cvs at cvs.gnupg.org Wed Oct 5 12:24:31 2005 From: cvs at cvs.gnupg.org (svn author wk) Date: Wed Oct 5 11:56:00 2005 Subject: [svn] gcry - r1120 - tags Message-ID: Author: wk Date: 2005-10-05 12:24:26 +0200 (Wed, 05 Oct 2005) New Revision: 1120 Added: tags/V1-2-2/ Log: Tagged release Copied: tags/V1-2-2 (from rev 1119, branches/LIBGCRYPT-1-2-BRANCH) From cvs at cvs.gnupg.org Wed Oct 5 12:28:29 2005 From: cvs at cvs.gnupg.org (svn author wk) Date: Wed Oct 5 11:59:45 2005 Subject: [svn] gcry - r1121 - in branches/LIBGCRYPT-1-2-BRANCH: . src Message-ID: Author: wk Date: 2005-10-05 12:28:29 +0200 (Wed, 05 Oct 2005) New Revision: 1121 Modified: branches/LIBGCRYPT-1-2-BRANCH/NEWS branches/LIBGCRYPT-1-2-BRANCH/configure.ac branches/LIBGCRYPT-1-2-BRANCH/src/gcrypt.h Log: Post release updates Modified: branches/LIBGCRYPT-1-2-BRANCH/NEWS =================================================================== --- branches/LIBGCRYPT-1-2-BRANCH/NEWS 2005-10-05 10:24:26 UTC (rev 1120) +++ branches/LIBGCRYPT-1-2-BRANCH/NEWS 2005-10-05 10:28:29 UTC (rev 1121) @@ -1,3 +1,6 @@ +Noteworthy changes in version 1.2.3 +------------------------------------------------ + Noteworthy changes in version 1.2.2 (2005-10-05} ------------------------------------------------ Modified: branches/LIBGCRYPT-1-2-BRANCH/configure.ac =================================================================== --- branches/LIBGCRYPT-1-2-BRANCH/configure.ac 2005-10-05 10:24:26 UTC (rev 1120) +++ branches/LIBGCRYPT-1-2-BRANCH/configure.ac 2005-10-05 10:28:29 UTC (rev 1121) @@ -27,7 +27,7 @@ # but remove a "-cvs" prefix right *before* a release and append it # soon later. -AC_INIT(libgcrypt, 1.2.2, bug-libgcrypt@gnupg.org) +AC_INIT(libgcrypt, 1.2.3-cvs, bug-libgcrypt@gnupg.org) # LT Version numbers, remember to change them just *before* a release. # (Interfaces removed: CURRENT++, AGE=0, REVISION=0) Modified: branches/LIBGCRYPT-1-2-BRANCH/src/gcrypt.h =================================================================== --- branches/LIBGCRYPT-1-2-BRANCH/src/gcrypt.h 2005-10-05 10:24:26 UTC (rev 1120) +++ branches/LIBGCRYPT-1-2-BRANCH/src/gcrypt.h 2005-10-05 10:28:29 UTC (rev 1121) @@ -49,7 +49,7 @@ autoconf (using the AM_PATH_GCRYPT macro) check that this header matches the installed library. Note: Do not edit the next line as configure may fix the string here. */ -#define GCRYPT_VERSION "1.2.2" +#define GCRYPT_VERSION "1.2.3-cvs" /* Internal: We can't use the convenience macros for the multi precision integer functions when building this library. */ From cvs at cvs.gnupg.org Wed Oct 5 20:22:41 2005 From: cvs at cvs.gnupg.org (svn author wk) Date: Wed Oct 5 19:53:56 2005 Subject: [svn] GnuPG - r3902 - in trunk: . g10 Message-ID: Author: wk Date: 2005-10-05 20:22:36 +0200 (Wed, 05 Oct 2005) New Revision: 3902 Modified: trunk/ChangeLog trunk/configure.ac trunk/g10/Makefile.am Log: Fixes for the g10.c -> gpg.c renamed Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2005-10-05 16:58:50 UTC (rev 3901) +++ trunk/ChangeLog 2005-10-05 18:22:36 UTC (rev 3902) @@ -1,3 +1,7 @@ +2005-10-05 Werner Koch + + * configure.ac: Changed identification file name to g10/gpg.c + 2005-10-02 Marcus Brinkmann * configure.ac [!$try_gettext]: Invoke AM_PO_SUBDIRS. Modified: trunk/configure.ac =================================================================== --- trunk/configure.ac 2005-10-05 16:58:50 UTC (rev 3901) +++ trunk/configure.ac 2005-10-05 18:22:36 UTC (rev 3902) @@ -33,7 +33,7 @@ development_version=no AC_CONFIG_AUX_DIR(scripts) -AC_CONFIG_SRCDIR(g10/g10.c) +AC_CONFIG_SRCDIR(g10/gpg.c) AC_CANONICAL_HOST AM_INIT_AUTOMAKE([std-options]) AM_CONFIG_HEADER(config.h) Modified: trunk/g10/Makefile.am =================================================================== --- trunk/g10/Makefile.am 2005-10-05 16:58:50 UTC (rev 3901) +++ trunk/g10/Makefile.am 2005-10-05 18:22:36 UTC (rev 3902) @@ -70,7 +70,7 @@ signal.c if ENABLE_CARD_SUPPORT -card_support_source_g10 = card-util.c +card_support_source_gpg = card-util.c card_support_source_scd = \ app-common.h \ app-openpgp.c \ @@ -79,14 +79,14 @@ ccid-driver.c ccid-driver.h card_support_source_local = cardglue.c cardglue.h tlv.c tlv.h else -card_support_source_g10 = +card_support_source_gpg = card_support_source_scd = card_support_source_local = endif -card_support_source = $(card_support_source_local) $(card_support_source_g10) $(card_support_source_scd) +card_support_source = $(card_support_source_local) $(card_support_source_gpg) $(card_support_source_scd) -gpg_SOURCES = g10.c \ +gpg_SOURCES = gpg.c \ $(common_source) \ $(card_support_source) \ pkclist.c \ @@ -148,7 +148,7 @@ for i in $(card_support_source_scd); do \ cp $$dir/scd/$$i $$i; echo $$i; \ done ;\ - for i in $(card_support_source_g10); do \ + for i in $(card_support_source_gpg); do \ cp $$dir/g10/$$i $$i; echo $$i; \ done ; \ echo "Please remember to update the ChangeLog accordingly!" From cvs at cvs.gnupg.org Thu Oct 6 12:38:24 2005 From: cvs at cvs.gnupg.org (svn author wk) Date: Thu Oct 6 12:09:33 2005 Subject: [svn] GnuPG - r3903 - in trunk: g10 po Message-ID: Author: wk Date: 2005-10-06 12:38:23 +0200 (Thu, 06 Oct 2005) New Revision: 3903 Modified: trunk/g10/export.c trunk/po/ChangeLog trunk/po/POTFILES.in Log: Yet another fix for the gpg.c rename Modified: trunk/g10/export.c =================================================================== --- trunk/g10/export.c 2005-10-05 18:22:36 UTC (rev 3902) +++ trunk/g10/export.c 2005-10-06 10:38:23 UTC (rev 3903) @@ -340,7 +340,22 @@ default: break; } + + /* XXX: before skipping a subkey, check whether any + other description wants an exact macth on a subkey + and include that subkey into the output too. Need + to add this subkey to a list so that it won't get + processed a second time. + + So the first step here is to check that list and + skip in any case if the key is in that list. + We need this whole mess becuase the import fnction + is not able to merge secret key and thus it is not + possible to output them as two keys and have import + merge them. + */ + if(skip_until_subkey) continue; } Modified: trunk/po/ChangeLog =================================================================== --- trunk/po/ChangeLog 2005-10-05 18:22:36 UTC (rev 3902) +++ trunk/po/ChangeLog 2005-10-06 10:38:23 UTC (rev 3903) @@ -1,3 +1,7 @@ +2005-10-06 Werner Koch + + * POTFILES.in: s/g10.c/gpg.c/. + 2005-07-26 Werner Koch * zh_TW.po, fr.po, cs.po: Updated. Modified: trunk/po/POTFILES.in =================================================================== --- trunk/po/POTFILES.in 2005-10-05 18:22:36 UTC (rev 3902) +++ trunk/po/POTFILES.in 2005-10-06 10:38:23 UTC (rev 3903) @@ -19,7 +19,7 @@ g10/encr-data.c g10/exec.c g10/export.c -g10/g10.c +g10/gpg.c g10/getkey.c g10/gpgv.c g10/helptext.c From cvs at cvs.gnupg.org Thu Oct 6 12:44:27 2005 From: cvs at cvs.gnupg.org (svn author marcus) Date: Thu Oct 6 12:15:38 2005 Subject: [svn] gpgme - r1123 - in trunk: . doc gpgme Message-ID: Author: marcus Date: 2005-10-06 12:44:26 +0200 (Thu, 06 Oct 2005) New Revision: 1123 Modified: trunk/NEWS trunk/doc/ChangeLog trunk/doc/gpgme.texi trunk/gpgme/ChangeLog trunk/gpgme/data-mem.c trunk/gpgme/gpgme.def trunk/gpgme/gpgme.h trunk/gpgme/libgpgme.vers Log: doc/ 2005-10-06 Marcus Brinkmann * gpgme.texi (Destroying Data Buffers): Document gpgme_free. gpgme/ 2005-10-06 Marcus Brinkmann * gpgme.h (gpgme_free): New prototype. * data-mem.c (gpgme_free): New function. * libgpgme.vers (GPGME_1.1): Add gpgme_free. * gpgme.def: Add gpgme_free. Modified: trunk/NEWS =================================================================== --- trunk/NEWS 2005-10-02 14:55:33 UTC (rev 1122) +++ trunk/NEWS 2005-10-06 10:44:26 UTC (rev 1123) @@ -1,4 +1,4 @@ -Noteworthy changes in version 1.x.y (unreleased) +Noteworthy changes in version 1.1.1 (unreleased) ------------------------------------------------ * Reading signature notations and policy URLs on key signatures is @@ -6,10 +6,19 @@ gpgme_key_sig_t structure. This has to be enabled with the keylist mode flag GPGME_KEYLIST_MODE_SIG_NOTATIONS. - * Interface changes relative to the 1.0.3 release: + * A new gpgme_free() function solves the problem of using different + allocators in a single program. This function should now be used + instead calling free() to release the buffer returned by + gpgme_data_release_and_get_mem. It is recommended that you always + do this, but it is only necessary on certain platforms, so backwards + compatibility is provided. In other words: If free() worked for + you before, it will keep working. + + * Interface changes relative to the 1.1.0 release: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ gpgme_key_sig_t EXTENDED: New field notations. GPGME_KEYLIST_MODE_SIG_NOTATIONS NEW +gpgme_free NEW ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Modified: trunk/doc/ChangeLog =================================================================== --- trunk/doc/ChangeLog 2005-10-02 14:55:33 UTC (rev 1122) +++ trunk/doc/ChangeLog 2005-10-06 10:44:26 UTC (rev 1123) @@ -1,3 +1,7 @@ +2005-10-06 Marcus Brinkmann + + * gpgme.texi (Destroying Data Buffers): Document gpgme_free. + 2005-10-02 Marcus Brinkmann * gpgme.texi (Key Management): Add the new member notations of Modified: trunk/doc/gpgme.texi =================================================================== --- trunk/doc/gpgme.texi 2005-10-02 14:55:33 UTC (rev 1122) +++ trunk/doc/gpgme.texi 2005-10-06 10:44:26 UTC (rev 1123) @@ -1711,15 +1711,23 @@ @code{gpgme_data_release}, except that it returns the data buffer and its length that was provided by the object. -The user has to release the buffer with @code{free}. In case the user -provided the data buffer in non-copy mode, a copy will be made for -this purpose. +The user has to release the buffer with @code{gpgme_free}. In case +the user provided the data buffer in non-copy mode, a copy will be +made for this purpose. In case an error returns, or there is no suitable data buffer that can be returned to the user, the function will return @code{NULL}. @end deftypefun +@deftypefun void gpgme_free (@w{void *@var{buffer}}) +The function @code{gpgme_free} releases the memory returned by +@code{gpgme_data_release_and_get_mem}. It should be used instead of +the system libraries @code{free} function in case different allocators +are used in a single program. +@end deftypefun + + @node Manipulating Data Buffers @section Manipulating Data Buffers @cindex data buffer, manipulation Modified: trunk/gpgme/ChangeLog =================================================================== --- trunk/gpgme/ChangeLog 2005-10-02 14:55:33 UTC (rev 1122) +++ trunk/gpgme/ChangeLog 2005-10-06 10:44:26 UTC (rev 1123) @@ -1,3 +1,10 @@ +2005-10-06 Marcus Brinkmann + + * gpgme.h (gpgme_free): New prototype. + * data-mem.c (gpgme_free): New function. + * libgpgme.vers (GPGME_1.1): Add gpgme_free. + * gpgme.def: Add gpgme_free. + 2005-10-02 Marcus Brinkmann * util.h (_gpgme_decode_percent_string): Add new argument BINARY Modified: trunk/gpgme/data-mem.c =================================================================== --- trunk/gpgme/data-mem.c 2005-10-02 14:55:33 UTC (rev 1122) +++ trunk/gpgme/data-mem.c 2005-10-06 10:44:26 UTC (rev 1123) @@ -161,6 +161,7 @@ }; +/* Create a new data buffer and return it in R_DH. */ gpgme_error_t gpgme_data_new (gpgme_data_t *dh) { @@ -200,6 +201,9 @@ } +/* Destroy the data buffer DH and return a pointer to its content. + The memory has be to released with gpgme_free() by the user. It's + size is returned in R_LEN. */ char * gpgme_data_release_and_get_mem (gpgme_data_t dh, size_t *r_len) { @@ -222,3 +226,13 @@ return str; } + + +/* Release the memory returned by gpgme_data_release_and_get_mem(). */ +void +gpgme_free (void *buffer) +{ + if (buffer) + free (buffer); +} + Modified: trunk/gpgme/gpgme.def =================================================================== --- trunk/gpgme/gpgme.def 2005-10-02 14:55:33 UTC (rev 1122) +++ trunk/gpgme/gpgme.def 2005-10-06 10:44:26 UTC (rev 1123) @@ -151,5 +151,6 @@ gpgme_sig_notation_add @118 gpgme_sig_notation_get @119 + gpgme_free @120 ; END Modified: trunk/gpgme/gpgme.h =================================================================== --- trunk/gpgme/gpgme.h 2005-10-02 14:55:33 UTC (rev 1122) +++ trunk/gpgme/gpgme.h 2005-10-06 10:44:26 UTC (rev 1123) @@ -996,10 +996,13 @@ int copy); /* Destroy the data buffer DH and return a pointer to its content. - The memory has be to released with free by the user. It's size is - returned in R_LEN. */ + The memory has be to released with gpgme_free() by the user. It's + size is returned in R_LEN. */ char *gpgme_data_release_and_get_mem (gpgme_data_t dh, size_t *r_len); +/* Release the memory returned by gpgme_data_release_and_get_mem(). */ +void gpgme_free (void *buffer); + gpgme_error_t gpgme_data_new_from_cbs (gpgme_data_t *dh, gpgme_data_cbs_t cbs, void *handle); Modified: trunk/gpgme/libgpgme.vers =================================================================== --- trunk/gpgme/libgpgme.vers 2005-10-02 14:55:33 UTC (rev 1122) +++ trunk/gpgme/libgpgme.vers 2005-10-06 10:44:26 UTC (rev 1123) @@ -34,6 +34,8 @@ gpgme_sig_notation_clear; gpgme_sig_notation_add; gpgme_sig_notation_get; + + gpgme_free; }; From cvs at cvs.gnupg.org Thu Oct 6 13:06:26 2005 From: cvs at cvs.gnupg.org (svn author marcus) Date: Thu Oct 6 12:37:39 2005 Subject: [svn] gpgme - r1124 - trunk/gpgme Message-ID: Author: marcus Date: 2005-10-06 13:06:25 +0200 (Thu, 06 Oct 2005) New Revision: 1124 Modified: trunk/gpgme/ChangeLog trunk/gpgme/Makefile.am Log: 2005-10-06 Marcus Brinkmann * Makefile.am (gpgme.dll gpgme.dll.a): Use $(srcdir) for gpgme.def. Modified: trunk/gpgme/ChangeLog =================================================================== --- trunk/gpgme/ChangeLog 2005-10-06 10:44:26 UTC (rev 1123) +++ trunk/gpgme/ChangeLog 2005-10-06 11:06:25 UTC (rev 1124) @@ -1,5 +1,8 @@ 2005-10-06 Marcus Brinkmann + * Makefile.am (gpgme.dll gpgme.dll.a): Use $(srcdir) for + gpgme.def. + * gpgme.h (gpgme_free): New prototype. * data-mem.c (gpgme_free): New function. * libgpgme.vers (GPGME_1.1): Add gpgme_free. Modified: trunk/gpgme/Makefile.am =================================================================== --- trunk/gpgme/Makefile.am 2005-10-06 10:44:26 UTC (rev 1123) +++ trunk/gpgme/Makefile.am 2005-10-06 11:06:25 UTC (rev 1124) @@ -138,7 +138,7 @@ $(STRIP) $(DESTDIR)$(libdir)/gpgme.dll gpgme.dll gpgme.dll.a: gpgme.def $(w32_o_files) versioninfo.o - $(CC) -shared -o gpgme.dll gpgme.def $(w32_o_files) \ + $(CC) -shared -o gpgme.dll $(srcdir)/gpgme.def $(w32_o_files) \ versioninfo.o @GPG_ERROR_LIBS@ -Wl,--out-implib,gpgme.dll.a From cvs at cvs.gnupg.org Thu Oct 6 14:03:04 2005 From: cvs at cvs.gnupg.org (svn author marcus) Date: Thu Oct 6 13:34:14 2005 Subject: [svn] GPGol - r111 - trunk Message-ID: Author: marcus Date: 2005-10-06 14:03:03 +0200 (Thu, 06 Oct 2005) New Revision: 111 Modified: trunk/ChangeLog trunk/configure.ac Log: 2005-10-06 Marcus Brinkmann * configure.ac: Change AC_CONFIG_SRCDIR argument to src/gpgol.def. Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2005-09-29 10:48:15 UTC (rev 110) +++ trunk/ChangeLog 2005-10-06 12:03:03 UTC (rev 111) @@ -1,3 +1,7 @@ +2005-10-06 Marcus Brinkmann + + * configure.ac: Change AC_CONFIG_SRCDIR argument to src/gpgol.def. + 2005-09-29 Werner Koch Released 0.9.3. Modified: trunk/configure.ac =================================================================== --- trunk/configure.ac 2005-09-29 10:48:15 UTC (rev 110) +++ trunk/configure.ac 2005-10-06 12:03:03 UTC (rev 111) @@ -25,7 +25,7 @@ PACKAGE_GT=${PACKAGE_NAME} VERSION=$PACKAGE_VERSION -AC_CONFIG_SRCDIR(src/olgpgcore.def) +AC_CONFIG_SRCDIR(src/gpgol.def) AM_CONFIG_HEADER(config.h) AC_CANONICAL_TARGET() AM_INIT_AUTOMAKE($PACKAGE, $VERSION) From cvs at cvs.gnupg.org Thu Oct 6 14:05:24 2005 From: cvs at cvs.gnupg.org (svn author marcus) Date: Thu Oct 6 13:36:33 2005 Subject: [svn] GPGol - r112 - trunk/src Message-ID: Author: marcus Date: 2005-10-06 14:05:24 +0200 (Thu, 06 Oct 2005) New Revision: 112 Modified: trunk/src/ChangeLog trunk/src/Makefile.am Log: 2005-10-06 Marcus Brinkmann * Makefile.am (gpgol_SOURCES): Add util.h Modified: trunk/src/ChangeLog =================================================================== --- trunk/src/ChangeLog 2005-10-06 12:03:03 UTC (rev 111) +++ trunk/src/ChangeLog 2005-10-06 12:05:24 UTC (rev 112) @@ -1,3 +1,7 @@ +2005-10-06 Marcus Brinkmann + + * Makefile.am (gpgol_SOURCES): Add util.h + 2005-09-29 Werner Koch * gpgmsg.cpp (encrypt_and_sign): Pass signing key to encryption Modified: trunk/src/Makefile.am =================================================================== --- trunk/src/Makefile.am 2005-10-06 12:03:03 UTC (rev 111) +++ trunk/src/Makefile.am 2005-10-06 12:05:24 UTC (rev 112) @@ -34,7 +34,7 @@ msgcache.c msgcache.h \ engine-gpgme.c engine.h \ rfc822parse.c rfc822parse.h \ - common.c intern.h \ + common.c util.h intern.h \ passcache.c passcache.h \ config-dialog.c \ passphrase-dialog.c \ From cvs at cvs.gnupg.org Thu Oct 6 14:05:39 2005 From: cvs at cvs.gnupg.org (svn author marcus) Date: Thu Oct 6 13:36:48 2005 Subject: [svn] GPGol - r113 - trunk/src Message-ID: Author: marcus Date: 2005-10-06 14:05:39 +0200 (Thu, 06 Oct 2005) New Revision: 113 Modified: trunk/src/ChangeLog Log: Fix typo. Modified: trunk/src/ChangeLog =================================================================== --- trunk/src/ChangeLog 2005-10-06 12:05:24 UTC (rev 112) +++ trunk/src/ChangeLog 2005-10-06 12:05:39 UTC (rev 113) @@ -1,6 +1,6 @@ 2005-10-06 Marcus Brinkmann - * Makefile.am (gpgol_SOURCES): Add util.h + * Makefile.am (gpgol_SOURCES): Add util.h. 2005-09-29 Werner Koch From cvs at cvs.gnupg.org Thu Oct 6 14:09:08 2005 From: cvs at cvs.gnupg.org (svn author marcus) Date: Thu Oct 6 13:40:17 2005 Subject: [svn] GPGol - r114 - trunk/src Message-ID: Author: marcus Date: 2005-10-06 14:09:07 +0200 (Thu, 06 Oct 2005) New Revision: 114 Modified: trunk/src/ChangeLog trunk/src/Makefile.am Log: 2005-10-06 Marcus Brinkmann * Makefile.am (.rc.o): Invoke windres with -I $(srcdir). Modified: trunk/src/ChangeLog =================================================================== --- trunk/src/ChangeLog 2005-10-06 12:05:39 UTC (rev 113) +++ trunk/src/ChangeLog 2005-10-06 12:09:07 UTC (rev 114) @@ -1,5 +1,7 @@ 2005-10-06 Marcus Brinkmann + * Makefile.am (.rc.o): Invoke windres with -I $(srcdir). + * Makefile.am (gpgol_SOURCES): Add util.h. 2005-09-29 Werner Koch Modified: trunk/src/Makefile.am =================================================================== --- trunk/src/Makefile.am 2005-10-06 12:05:39 UTC (rev 113) +++ trunk/src/Makefile.am 2005-10-06 12:09:07 UTC (rev 114) @@ -51,7 +51,7 @@ resource.o: resource.rc versioninfo.rc gpgol-rsrcs.rc olflange-rsrcs.rc .rc.o: - $(WINDRES) `test -f '$<' || echo '$(srcdir)/'`$< $@ + $(WINDRES) -I $(srcdir) `test -f '$<' || echo '$(srcdir)/'`$< $@ From cvs at cvs.gnupg.org Thu Oct 6 14:14:21 2005 From: cvs at cvs.gnupg.org (svn author marcus) Date: Thu Oct 6 13:45:31 2005 Subject: [svn] GPGol - r115 - trunk/src Message-ID: Author: marcus Date: 2005-10-06 14:14:21 +0200 (Thu, 06 Oct 2005) New Revision: 115 Modified: trunk/src/ChangeLog trunk/src/Makefile.am Log: 2005-10-06 Marcus Brinkmann * Makefile.am (.rc.o): Invoke windres with -I $(builddir). Modified: trunk/src/ChangeLog =================================================================== --- trunk/src/ChangeLog 2005-10-06 12:09:07 UTC (rev 114) +++ trunk/src/ChangeLog 2005-10-06 12:14:21 UTC (rev 115) @@ -1,5 +1,7 @@ 2005-10-06 Marcus Brinkmann + * Makefile.am (.rc.o): Invoke windres with -I $(builddir). + * Makefile.am (.rc.o): Invoke windres with -I $(srcdir). * Makefile.am (gpgol_SOURCES): Add util.h. Modified: trunk/src/Makefile.am =================================================================== --- trunk/src/Makefile.am 2005-10-06 12:09:07 UTC (rev 114) +++ trunk/src/Makefile.am 2005-10-06 12:14:21 UTC (rev 115) @@ -51,7 +51,8 @@ resource.o: resource.rc versioninfo.rc gpgol-rsrcs.rc olflange-rsrcs.rc .rc.o: - $(WINDRES) -I $(srcdir) `test -f '$<' || echo '$(srcdir)/'`$< $@ + $(WINDRES) -I $(srcdir) -I $(builddir) \ + `test -f '$<' || echo '$(srcdir)/'`$< $@ From cvs at cvs.gnupg.org Thu Oct 6 14:16:18 2005 From: cvs at cvs.gnupg.org (svn author marcus) Date: Thu Oct 6 13:47:28 2005 Subject: [svn] GPGol - r116 - trunk/src Message-ID: Author: marcus Date: 2005-10-06 14:16:18 +0200 (Thu, 06 Oct 2005) New Revision: 116 Modified: trunk/src/ChangeLog trunk/src/Makefile.am Log: Fix last change. Modified: trunk/src/ChangeLog =================================================================== --- trunk/src/ChangeLog 2005-10-06 12:14:21 UTC (rev 115) +++ trunk/src/ChangeLog 2005-10-06 12:16:18 UTC (rev 116) @@ -1,6 +1,6 @@ 2005-10-06 Marcus Brinkmann - * Makefile.am (.rc.o): Invoke windres with -I $(builddir). + * Makefile.am (.rc.o): Invoke windres with "-I .". * Makefile.am (.rc.o): Invoke windres with -I $(srcdir). Modified: trunk/src/Makefile.am =================================================================== --- trunk/src/Makefile.am 2005-10-06 12:14:21 UTC (rev 115) +++ trunk/src/Makefile.am 2005-10-06 12:16:18 UTC (rev 116) @@ -51,8 +51,7 @@ resource.o: resource.rc versioninfo.rc gpgol-rsrcs.rc olflange-rsrcs.rc .rc.o: - $(WINDRES) -I $(srcdir) -I $(builddir) \ - `test -f '$<' || echo '$(srcdir)/'`$< $@ + $(WINDRES) -I $(srcdir) -I . `test -f '$<' || echo '$(srcdir)/'`$< $@ From cvs at cvs.gnupg.org Thu Oct 6 14:19:38 2005 From: cvs at cvs.gnupg.org (svn author marcus) Date: Thu Oct 6 13:50:53 2005 Subject: [svn] GPGol - r117 - trunk/src Message-ID: Author: marcus Date: 2005-10-06 14:19:38 +0200 (Thu, 06 Oct 2005) New Revision: 117 Modified: trunk/src/ChangeLog trunk/src/Makefile.am Log: 2005-10-06 Marcus Brinkmann * Makefile.am (gpgol_LDADD): Prefix gpgol.def and mapi32.dll with $(srcdir). Modified: trunk/src/ChangeLog =================================================================== --- trunk/src/ChangeLog 2005-10-06 12:16:18 UTC (rev 116) +++ trunk/src/ChangeLog 2005-10-06 12:19:38 UTC (rev 117) @@ -1,5 +1,8 @@ 2005-10-06 Marcus Brinkmann + * Makefile.am (gpgol_LDADD): Prefix gpgol.def and mapi32.dll with + $(srcdir). + * Makefile.am (.rc.o): Invoke windres with "-I .". * Makefile.am (.rc.o): Invoke windres with -I $(srcdir). Modified: trunk/src/Makefile.am =================================================================== --- trunk/src/Makefile.am 2005-10-06 12:16:18 UTC (rev 116) +++ trunk/src/Makefile.am 2005-10-06 12:19:38 UTC (rev 117) @@ -45,8 +45,8 @@ watcher.cpp \ attach.cpp attach.h -gpgol_LDADD = gpgol.def \ - $(GPGME_LIBS) mapi32.dll -lshell32 -lgdi32 -lcomdlg32 +gpgol_LDADD = $(srcdir) gpgol.def \ + $(GPGME_LIBS) $(srcdir) mapi32.dll -lshell32 -lgdi32 -lcomdlg32 resource.o: resource.rc versioninfo.rc gpgol-rsrcs.rc olflange-rsrcs.rc From cvs at cvs.gnupg.org Thu Oct 6 14:20:02 2005 From: cvs at cvs.gnupg.org (svn author marcus) Date: Thu Oct 6 13:51:11 2005 Subject: [svn] GPGol - r118 - trunk/src Message-ID: Author: marcus Date: 2005-10-06 14:20:02 +0200 (Thu, 06 Oct 2005) New Revision: 118 Modified: trunk/src/Makefile.am Log: Fix last change. Modified: trunk/src/Makefile.am =================================================================== --- trunk/src/Makefile.am 2005-10-06 12:19:38 UTC (rev 117) +++ trunk/src/Makefile.am 2005-10-06 12:20:02 UTC (rev 118) @@ -45,8 +45,8 @@ watcher.cpp \ attach.cpp attach.h -gpgol_LDADD = $(srcdir) gpgol.def \ - $(GPGME_LIBS) $(srcdir) mapi32.dll -lshell32 -lgdi32 -lcomdlg32 +gpgol_LDADD = $(srcdir)/gpgol.def \ + $(GPGME_LIBS) $(srcdir)/mapi32.dll -lshell32 -lgdi32 -lcomdlg32 resource.o: resource.rc versioninfo.rc gpgol-rsrcs.rc olflange-rsrcs.rc From cvs at cvs.gnupg.org Thu Oct 6 15:51:59 2005 From: cvs at cvs.gnupg.org (svn author marcus) Date: Thu Oct 6 15:23:09 2005 Subject: [svn] GPGol - r119 - trunk Message-ID: Author: marcus Date: 2005-10-06 15:51:54 +0200 (Thu, 06 Oct 2005) New Revision: 119 Modified: trunk/configure.ac Log: Add -cvs to version string. Modified: trunk/configure.ac =================================================================== --- trunk/configure.ac 2005-10-06 12:20:02 UTC (rev 118) +++ trunk/configure.ac 2005-10-06 13:51:54 UTC (rev 119) @@ -15,7 +15,7 @@ # Version number: Remember to change it immediately *after* a release. # Add a "-cvs" prefix for non-released code. -AC_INIT(gpgol, 0.9.3, bug-gpgol@g10code.com) +AC_INIT(gpgol, 0.9.3-cvs, bug-gpgol@g10code.com) NEED_GPGME_API=1 NEED_GPGME_VERSION=1.1.0 From cvs at cvs.gnupg.org Fri Oct 7 01:28:51 2005 From: cvs at cvs.gnupg.org (svn author marcus) Date: Fri Oct 7 00:59:59 2005 Subject: [svn] gpgme - r1125 - in trunk/tests: . gpg Message-ID: Author: marcus Date: 2005-10-07 01:28:50 +0200 (Fri, 07 Oct 2005) New Revision: 1125 Modified: trunk/tests/ChangeLog trunk/tests/gpg/t-sig-notation.c Log: 2005-10-07 Marcus Brinkmann * gpg/t-sig-notation.c: Change critical notation to something GnuPG understands. Modified: trunk/tests/ChangeLog =================================================================== --- trunk/tests/ChangeLog 2005-10-06 11:06:25 UTC (rev 1124) +++ trunk/tests/ChangeLog 2005-10-06 23:28:50 UTC (rev 1125) @@ -1,3 +1,8 @@ +2005-10-07 Marcus Brinkmann + + * gpg/t-sig-notation.c: Change critical notation to something + GnuPG understands. + 2005-10-01 Marcus Brinkmann * gpg/Makefile.am (EXTRA_DIST): Remove gpg.conf. Modified: trunk/tests/gpg/t-sig-notation.c =================================================================== --- trunk/tests/gpg/t-sig-notation.c 2005-10-06 11:06:25 UTC (rev 1124) +++ trunk/tests/gpg/t-sig-notation.c 2005-10-06 23:28:50 UTC (rev 1125) @@ -42,8 +42,8 @@ { "laughing@me", "Just Squeeze Me", GPGME_SIG_NOTATION_HUMAN_READABLE }, - { "leave@home", - "Right Now", + { "preferred-email-encoding@pgp.com", + "pgpmime", GPGME_SIG_NOTATION_HUMAN_READABLE | GPGME_SIG_NOTATION_CRITICAL }, { NULL, "http://www.gnu.org/policy/", From cvs at cvs.gnupg.org Fri Oct 7 02:40:46 2005 From: cvs at cvs.gnupg.org (svn author marcus) Date: Fri Oct 7 02:11:53 2005 Subject: [svn] assuan - r191 - trunk/src Message-ID: Author: marcus Date: 2005-10-07 02:40:45 +0200 (Fri, 07 Oct 2005) New Revision: 191 Added: trunk/src/setenv.c Modified: trunk/src/ChangeLog trunk/src/assuan-defs.h trunk/src/assuan-domain-connect.c trunk/src/stpcpy.c Log: 2005-10-07 Marcus Brinkmann * configure.ac: Invoke AC_CANONICAL_HOST. Define _XOPEN_SOURCE, _XOPEN_SOURCE_EXTENDED and __EXTENSIONS__ on Solaris. Add stpcy as replacement function. Add setenv as replacement function (and check for unistd.h). src/ 2005-10-06 Marcus Brinkmann * assuan-defs.h (memrchr) [!HAVE_MEMRCHR]: New prototype. (stpcpy) [!HAVE_STPCPY]: Likewise. * stpcpy.c: New LGPL'ed file from the GNU C Library. * setenv.c: New file. * assuan-domain-connect.c (read_int): New function. (write_int): New function. (domain_reader): Use read_int. (domain_sendfd): Use write_int. Modified: trunk/src/ChangeLog =================================================================== --- trunk/src/ChangeLog 2005-10-01 20:15:45 UTC (rev 190) +++ trunk/src/ChangeLog 2005-10-07 00:40:45 UTC (rev 191) @@ -1,3 +1,14 @@ +2005-10-07 Marcus Brinkmann + + * assuan-defs.h (memrchr) [!HAVE_MEMRCHR]: New prototype. + (stpcpy) [!HAVE_STPCPY]: Likewise. + * stpcpy.c: New LGPL'ed file from the GNU C Library. + * setenv.c: New file. + * assuan-domain-connect.c (read_int): New function. + (write_int): New function. + (domain_reader): Use read_int. + (domain_sendfd): Use write_int. + 2005-10-01 Marcus Brinkmann * assuan.h (assuan_pipe_connect, assuan_pipe_connect2): Make type Modified: trunk/src/assuan-defs.h =================================================================== --- trunk/src/assuan-defs.h 2005-10-01 20:15:45 UTC (rev 190) +++ trunk/src/assuan-defs.h 2005-10-07 00:40:45 UTC (rev 191) @@ -1,5 +1,5 @@ /* assuan-defs.c - Internal definitions to Assuan - * Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc. + * Copyright (C) 2001, 2002, 2004, 2005 Free Software Foundation, Inc. * * This file is part of Assuan. * @@ -251,5 +251,16 @@ #define funopen(a,r,w,s,c) _assuan_funopen ((a), (r), (w), (s), (c)) #endif /*HAVE_FOPENCOOKIE*/ +/* Prototypes for replacement functions. */ +#ifndef HAVE_MEMRCHR +void *memrchr (const void *block, int c, size_t size); +#endif +#ifndef HAVE_STPCPY +char *stpcpy (char *dest, const char *src); +#endif +#ifndef HAVE_SETENV +int setenv (const char *name, const char *value, int replace); +#endif + #endif /*ASSUAN_DEFS_H*/ Modified: trunk/src/assuan-domain-connect.c =================================================================== --- trunk/src/assuan-domain-connect.c 2005-10-01 20:15:45 UTC (rev 190) +++ trunk/src/assuan-domain-connect.c 2005-10-07 00:40:45 UTC (rev 191) @@ -1,5 +1,5 @@ /* assuan-domain-connect.c - Assuan unix domain socket based client - * Copyright (C) 2002, 2003 Free Software Foundation, Inc. + * Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. * * This file is part of Assuan. * @@ -55,7 +55,30 @@ #endif + +/* Read an integer from byte address ADDR. Works even if ADDR is + misaligned. */ +static int +read_int (const char *addr) +{ + int val; + + memcpy (&val, addr, sizeof (int)); + + return val; +} + + +/* Write the integer VAL to byte address ADDR. Works even if ADDR is + misaligned. */ static void +write_int (char *addr, int val) +{ + memcpy (addr, &val, sizeof (int)); +} + + +static void do_deinit (assuan_context_t ctx) { if (ctx->inbound.fd != -1) @@ -207,7 +230,7 @@ ctx->pendingfds = tmp; ctx->pendingfds[ctx->pendingfdscount++] - = *(int *) CMSG_DATA (&cmsg.hdr); + = read_int (CMSG_DATA (&cmsg.hdr)); _assuan_log_printf ("received file descriptor %d from peer\n", ctx->pendingfds[ctx->pendingfdscount - 1]); @@ -299,7 +322,7 @@ msg.msg_control = &cmsg; msg.msg_controllen = sizeof (cmsg); - *(int *) CMSG_DATA (&cmsg.hdr) = fd; + write_int (CMSG_DATA (&cmsg.hdr), fd); len = sendmsg (ctx->outbound.fd, &msg, 0); if (len < 0) Added: trunk/src/setenv.c =================================================================== --- trunk/src/setenv.c 2005-10-01 20:15:45 UTC (rev 190) +++ trunk/src/setenv.c 2005-10-07 00:40:45 UTC (rev 191) @@ -0,0 +1,350 @@ +/* Copyright (C) 1992,1995-2001,2004 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library 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. + + The GNU C Library 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 the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#if HAVE_CONFIG_H +# include +#endif + +#define __builtin_expect(cond,val) (cond) + +#include +#if !_LIBC +# if !defined errno && !defined HAVE_ERRNO_DECL +extern int errno; +# endif +# define __set_errno(ev) ((errno) = (ev)) +#endif + +#if _LIBC || HAVE_STDLIB_H +# include +#endif +#if _LIBC || HAVE_STRING_H +# include +#endif +#if _LIBC || HAVE_UNISTD_H +# include +#endif + +#if !_LIBC +# define __environ environ +# ifndef HAVE_ENVIRON_DECL +extern char **environ; +# endif +#endif + +#if _LIBC +/* This lock protects against simultaneous modifications of `environ'. */ +# include +__libc_lock_define_initialized (static, envlock) +# define LOCK __libc_lock_lock (envlock) +# define UNLOCK __libc_lock_unlock (envlock) +#else +# define LOCK +# define UNLOCK +#endif + +/* In the GNU C library we must keep the namespace clean. */ +#ifdef _LIBC +# define setenv __setenv +# define unsetenv __unsetenv +# define clearenv __clearenv +# define tfind __tfind +# define tsearch __tsearch +#endif + +/* In the GNU C library implementation we try to be more clever and + allow arbitrarily many changes of the environment given that the used + values are from a small set. Outside glibc this will eat up all + memory after a while. */ +#if defined _LIBC || (defined HAVE_SEARCH_H && defined HAVE_TSEARCH \ + && defined __GNUC__) +# define USE_TSEARCH 1 +# include + +/* This is a pointer to the root of the search tree with the known + values. */ +static void *known_values; + +# define KNOWN_VALUE(Str) \ + ({ \ + void *value = tfind (Str, &known_values, (__compar_fn_t) strcmp); \ + value != NULL ? *(char **) value : NULL; \ + }) +# define STORE_VALUE(Str) \ + tsearch (Str, &known_values, (__compar_fn_t) strcmp) + +#else +# undef USE_TSEARCH + +# define KNOWN_VALUE(Str) NULL +# define STORE_VALUE(Str) do { } while (0) + +#endif + + +/* If this variable is not a null pointer we allocated the current + environment. */ +static char **last_environ; + + +/* This function is used by `setenv' and `putenv'. The difference between + the two functions is that for the former must create a new string which + is then placed in the environment, while the argument of `putenv' + must be used directly. This is all complicated by the fact that we try + to reuse values once generated for a `setenv' call since we can never + free the strings. */ +int +__add_to_environ (const char *name, const char *value, const char *combined, + int replace) +{ + register char **ep; + register size_t size; + const size_t namelen = strlen (name); + const size_t vallen = value != NULL ? strlen (value) + 1 : 0; + + LOCK; + + /* We have to get the pointer now that we have the lock and not earlier + since another thread might have created a new environment. */ + ep = __environ; + + size = 0; + if (ep != NULL) + { + for (; *ep != NULL; ++ep) + if (!strncmp (*ep, name, namelen) && (*ep)[namelen] == '=') + break; + else + ++size; + } + + if (ep == NULL || __builtin_expect (*ep == NULL, 1)) + { + char **new_environ; + + /* We allocated this space; we can extend it. */ + new_environ = (char **) realloc (last_environ, + (size + 2) * sizeof (char *)); + if (new_environ == NULL) + { + UNLOCK; + return -1; + } + + /* If the whole entry is given add it. */ + if (combined != NULL) + /* We must not add the string to the search tree since it belongs + to the user. */ + new_environ[size] = (char *) combined; + else + { + /* See whether the value is already known. */ +#ifdef USE_TSEARCH +# ifdef __GNUC__ + char new_value[namelen + 1 + vallen]; +# else + char *new_value = (char *) alloca (namelen + 1 + vallen); +# endif +# ifdef _LIBC + __mempcpy (__mempcpy (__mempcpy (new_value, name, namelen), "=", 1), + value, vallen); +# else + memcpy (new_value, name, namelen); + new_value[namelen] = '='; + memcpy (&new_value[namelen + 1], value, vallen); +# endif + + new_environ[size] = KNOWN_VALUE (new_value); + if (__builtin_expect (new_environ[size] == NULL, 1)) +#endif + { + new_environ[size] = (char *) malloc (namelen + 1 + vallen); + if (__builtin_expect (new_environ[size] == NULL, 0)) + { + __set_errno (ENOMEM); + UNLOCK; + return -1; + } + +#ifdef USE_TSEARCH + memcpy (new_environ[size], new_value, namelen + 1 + vallen); +#else + memcpy (new_environ[size], name, namelen); + new_environ[size][namelen] = '='; + memcpy (&new_environ[size][namelen + 1], value, vallen); +#endif + /* And save the value now. We cannot do this when we remove + the string since then we cannot decide whether it is a + user string or not. */ + STORE_VALUE (new_environ[size]); + } + } + + if (__environ != last_environ) + memcpy ((char *) new_environ, (char *) __environ, + size * sizeof (char *)); + + new_environ[size + 1] = NULL; + + last_environ = __environ = new_environ; + } + else if (replace) + { + char *np; + + /* Use the user string if given. */ + if (combined != NULL) + np = (char *) combined; + else + { +#ifdef USE_TSEARCH +# ifdef __GNUC__ + char new_value[namelen + 1 + vallen]; +# else + char *new_value = (char *) alloca (namelen + 1 + vallen); +# endif +# ifdef _LIBC + __mempcpy (__mempcpy (__mempcpy (new_value, name, namelen), "=", 1), + value, vallen); +# else + memcpy (new_value, name, namelen); + new_value[namelen] = '='; + memcpy (&new_value[namelen + 1], value, vallen); +# endif + + np = KNOWN_VALUE (new_value); + if (__builtin_expect (np == NULL, 1)) +#endif + { + np = malloc (namelen + 1 + vallen); + if (__builtin_expect (np == NULL, 0)) + { + UNLOCK; + return -1; + } + +#ifdef USE_TSEARCH + memcpy (np, new_value, namelen + 1 + vallen); +#else + memcpy (np, name, namelen); + np[namelen] = '='; + memcpy (&np[namelen + 1], value, vallen); +#endif + /* And remember the value. */ + STORE_VALUE (np); + } + } + + *ep = np; + } + + UNLOCK; + + return 0; +} + +int +setenv (const char *name, const char *value, int replace) +{ + if (name == NULL || *name == '\0' || strchr (name, '=') != NULL) + { + __set_errno (EINVAL); + return -1; + } + + return __add_to_environ (name, value, NULL, replace); +} + +int +unsetenv (const char *name) +{ + size_t len; + char **ep; + + if (name == NULL || *name == '\0' || strchr (name, '=') != NULL) + { + __set_errno (EINVAL); + return -1; + } + + len = strlen (name); + + LOCK; + + ep = __environ; + while (*ep != NULL) + if (!strncmp (*ep, name, len) && (*ep)[len] == '=') + { + /* Found it. Remove this pointer by moving later ones back. */ + char **dp = ep; + + do + dp[0] = dp[1]; + while (*dp++); + /* Continue the loop in case NAME appears again. */ + } + else + ++ep; + + UNLOCK; + + return 0; +} + +/* The `clearenv' was planned to be added to POSIX.1 but probably + never made it. Nevertheless the POSIX.9 standard (POSIX bindings + for Fortran 77) requires this function. */ +int +clearenv (void) +{ + LOCK; + + if (__environ == last_environ && __environ != NULL) + { + /* We allocated this environment so we can free it. */ + free (__environ); + last_environ = NULL; + } + + /* Clear the environment pointer removes the whole environment. */ + __environ = NULL; + + UNLOCK; + + return 0; +} +#ifdef _LIBC +libc_freeres_fn (free_mem) +{ + /* Remove all traces. */ + clearenv (); + + /* Now remove the search tree. */ + __tdestroy (known_values, free); + known_values = NULL; +} + +# undef setenv +# undef unsetenv +# undef clearenv +weak_alias (__setenv, setenv) +weak_alias (__unsetenv, unsetenv) +weak_alias (__clearenv, clearenv) +#endif + + Modified: trunk/src/stpcpy.c =================================================================== --- trunk/src/stpcpy.c 2005-10-01 20:15:45 UTC (rev 190) +++ trunk/src/stpcpy.c 2005-10-07 00:40:45 UTC (rev 191) @@ -1,33 +1,55 @@ -/* stpcpy.c - Replacement for stpcpy - * Copyright (C) 2002 Free Software Foundation, Inc. - * - * 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 2 of the License, or - * (at your option) any later version. - * - * GnuPG 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, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - */ +/* Copyright (C) 1992, 1995, 1997, 2002, 2004 Free Software Foundation, Inc. + This file is part of the GNU C Library. + The GNU C Library 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. + + The GNU C Library 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 the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include + +#undef __stpcpy +#undef stpcpy + +#ifndef weak_alias +# define __stpcpy stpcpy +#endif + +/* Copy SRC to DEST, returning the address of the terminating '\0' in DEST. */ char * -stpcpy (char *dest, const char *src) +__stpcpy (dest, src) + char *dest; + const char *src; { register char *d = dest; register const char *s = src; - + do *d++ = *s; while (*s++ != '\0'); - + return d - 1; } - +#ifdef libc_hidden_def +libc_hidden_def (__stpcpy) +#endif +#ifdef weak_alias +weak_alias (__stpcpy, stpcpy) +#endif +#ifdef libc_hidden_builtin_def +libc_hidden_builtin_def (stpcpy) +#endif From cvs at cvs.gnupg.org Fri Oct 7 15:09:21 2005 From: cvs at cvs.gnupg.org (svn author marcus) Date: Fri Oct 7 14:40:24 2005 Subject: [svn] GnuPG - r3904 - branches/GNUPG-1-9-BRANCH/tests Message-ID: Author: marcus Date: 2005-10-07 15:09:20 +0200 (Fri, 07 Oct 2005) New Revision: 3904 Modified: branches/GNUPG-1-9-BRANCH/tests/ChangeLog branches/GNUPG-1-9-BRANCH/tests/Makefile.am Log: 2005-10-07 Marcus Brinkmann * Makefile.am (TESTS_ENVIRONMENT): Remove LD_LIBRARY_PATH hack. It's the responsibility of the person building the software to set it properly. Modified: branches/GNUPG-1-9-BRANCH/tests/ChangeLog =================================================================== --- branches/GNUPG-1-9-BRANCH/tests/ChangeLog 2005-10-06 10:38:23 UTC (rev 3903) +++ branches/GNUPG-1-9-BRANCH/tests/ChangeLog 2005-10-07 13:09:20 UTC (rev 3904) @@ -1,3 +1,9 @@ +2005-10-07 Marcus Brinkmann + + * Makefile.am (TESTS_ENVIRONMENT): Remove LD_LIBRARY_PATH hack. + It's the responsibility of the person building the software to set + it properly. + 2004-09-30 Werner Koch * Makefile.am (SUBDIRS): Remove pkits until the copyright issues Modified: branches/GNUPG-1-9-BRANCH/tests/Makefile.am =================================================================== --- branches/GNUPG-1-9-BRANCH/tests/Makefile.am 2005-10-06 10:38:23 UTC (rev 3903) +++ branches/GNUPG-1-9-BRANCH/tests/Makefile.am 2005-10-07 13:09:20 UTC (rev 3904) @@ -33,26 +33,7 @@ TESTS_ENVIRONMENT = GNUPGHOME=`pwd` GPG_AGENT_INFO= LC_ALL=C GPGSM=$(GPGSM) \ - LD_LIBRARY_PATH=$$(seen=0; \ - for i in $(LDFLAGS) $(LIBGCRYPT_LIBS) $(PTH_LIBS); \ - do \ - if echo "$$i" | egrep '^-L' >/dev/null 2>&1; \ - then \ - if test $$seen = 0; \ - then \ - seen=1; \ - else \ - printf ":"; \ - fi; \ - printf "%s" "$${i}" | sed 's/^-L//'; \ - fi; \ - done; \ - if test $$seen != 0 \ - && test x$${LD_LIBRARY_PATH} != x; \ - then \ - printf ":"; \ - fi; \ - printf "%s" "$${LD_LIBRARY_PATH}") $(srcdir)/runtest + $(srcdir)/runtest testscripts = sm-sign+verify sm-verify From cvs at cvs.gnupg.org Fri Oct 7 15:34:23 2005 From: cvs at cvs.gnupg.org (svn author marcus) Date: Fri Oct 7 15:05:32 2005 Subject: [svn] gpgme - r1126 - in trunk/tests: . gpgsm Message-ID: Author: marcus Date: 2005-10-07 15:34:22 +0200 (Fri, 07 Oct 2005) New Revision: 1126 Modified: trunk/tests/ChangeLog trunk/tests/gpgsm/t-keylist.c Log: 2005-10-07 Marcus Brinkmann * gpgsm/t-keylist.c (main): Allow for an email address as a second uid. Modified: trunk/tests/ChangeLog =================================================================== --- trunk/tests/ChangeLog 2005-10-06 23:28:50 UTC (rev 1125) +++ trunk/tests/ChangeLog 2005-10-07 13:34:22 UTC (rev 1126) @@ -1,5 +1,8 @@ 2005-10-07 Marcus Brinkmann + * gpgsm/t-keylist.c (main): Allow for an email address as a second + uid. + * gpg/t-sig-notation.c: Change critical notation to something GnuPG understands. Modified: trunk/tests/gpgsm/t-keylist.c =================================================================== --- trunk/tests/gpgsm/t-keylist.c 2005-10-06 23:28:50 UTC (rev 1125) +++ trunk/tests/gpgsm/t-keylist.c 2005-10-07 13:34:22 UTC (rev 1126) @@ -44,6 +44,7 @@ char *issuer_name; char *chain_id; char *uid; + char *email; gpgme_validity_t validity; unsigned int key_length; } @@ -53,7 +54,7 @@ "CN=test cert 1,OU=Aegypten Project,O=g10 Code GmbH,L=D\xc3\xbcsseldorf,C=DE", "3CF405464F66ED4A7DF45BBDD1E4282E33BDB76E", "CN=test cert 1,OU=Aegypten Project,O=g10 Code GmbH,L=D\xc3\xbcsseldorf,C=DE", - GPGME_VALIDITY_ULTIMATE, 1024 + NULL, GPGME_VALIDITY_ULTIMATE, 1024 }, { "DFA56FB5FC41E3A8921F77AD1622EEFD9152A5AD", 0, 909684190, 1009821790, "01", "1.2.840.113549.1.9.1=#63657274696679407063612E64666E2E6465," @@ -63,7 +64,7 @@ "1.2.840.113549.1.9.1=#63657274696679407063612E64666E2E6465," "CN=DFN Top Level Certification Authority,OU=DFN-PCA," "O=Deutsches Forschungsnetz,C=DE", - GPGME_VALIDITY_NEVER, 2048 + "", GPGME_VALIDITY_NEVER, 2048 }, { "2C8F3C356AB761CB3674835B792CDA52937F9285", 0, 973183644, 1009735200, "15", "1.2.840.113549.1.9.1=#63657274696679407063612E64666E2E6465," @@ -73,7 +74,7 @@ "1.2.840.113549.1.9.1=#63657274696679407063612E64666E2E6465," "CN=DFN Server Certification Authority,OU=DFN-PCA," "O=Deutsches Forschungsnetz,C=DE", - GPGME_VALIDITY_UNKNOWN, 2048 + "", GPGME_VALIDITY_UNKNOWN, 2048 }, { NULL } }; @@ -286,7 +287,8 @@ exit (1); } - if (!key->uids || key->uids->next) + /* Be tolerant against a missing email (ie, older gpgsm versions). */ + if (!key->uids || (key->uids->next && !keys[i].email)) { fprintf (stderr, "Key has unexpected number of user IDs\n"); exit (1); @@ -336,7 +338,14 @@ key->uids->uid); exit (1); } + if (key->uids->next && strcmp (key->uids->next->uid, keys[i].email)) + { + fprintf (stderr, "Unexpected email in user ID: %s\n", + key->uids->next->uid); + exit (1); + } + gpgme_key_unref (key); i++; } From cvs at cvs.gnupg.org Sat Oct 8 01:46:36 2005 From: cvs at cvs.gnupg.org (svn author marcus) Date: Sat Oct 8 01:17:37 2005 Subject: [svn] GnuPG - r3905 - branches/GNUPG-1-9-BRANCH/common Message-ID: Author: marcus Date: 2005-10-08 01:46:36 +0200 (Sat, 08 Oct 2005) New Revision: 3905 Modified: branches/GNUPG-1-9-BRANCH/common/ChangeLog branches/GNUPG-1-9-BRANCH/common/signal.c Log: 2005-10-08 Marcus Brinkmann * signal.c (get_signal_name): Check value of HAVE_DECL_SYS_SIGLIST instead of just if it is defined. Modified: branches/GNUPG-1-9-BRANCH/common/ChangeLog =================================================================== --- branches/GNUPG-1-9-BRANCH/common/ChangeLog 2005-10-07 13:09:20 UTC (rev 3904) +++ branches/GNUPG-1-9-BRANCH/common/ChangeLog 2005-10-07 23:46:36 UTC (rev 3905) @@ -1,3 +1,8 @@ +2005-10-08 Marcus Brinkmann + + * signal.c (get_signal_name): Check value of HAVE_DECL_SYS_SIGLIST + instead of just if it is defined. + 2005-09-28 Marcus Brinkmann * Makefile.am (AM_CFLAGS): Add $(LIBASSUAN_CFLAGS). Modified: branches/GNUPG-1-9-BRANCH/common/signal.c =================================================================== --- branches/GNUPG-1-9-BRANCH/common/signal.c 2005-10-07 13:09:20 UTC (rev 3904) +++ branches/GNUPG-1-9-BRANCH/common/signal.c 2005-10-07 23:46:36 UTC (rev 3905) @@ -76,7 +76,7 @@ { /* Note that we can't use strsignal(), because it is not reentrant. */ -#if defined(HAVE_DECL_SYS_SIGLIST) && defined(NSIG) +#if HAVE_DECL_SYS_SIGLIST && defined(NSIG) return (signum >= 0 && signum < NSIG) ? sys_siglist[signum] : "?"; #else return NULL; From cvs at cvs.gnupg.org Sat Oct 8 02:13:28 2005 From: cvs at cvs.gnupg.org (svn author marcus) Date: Sat Oct 8 01:44:30 2005 Subject: [svn] GnuPG - r3906 - in branches/GNUPG-1-9-BRANCH: agent kbx scd sm tools Message-ID: Author: marcus Date: 2005-10-08 02:13:27 +0200 (Sat, 08 Oct 2005) New Revision: 3906 Modified: branches/GNUPG-1-9-BRANCH/agent/ChangeLog branches/GNUPG-1-9-BRANCH/agent/Makefile.am branches/GNUPG-1-9-BRANCH/kbx/ChangeLog branches/GNUPG-1-9-BRANCH/kbx/Makefile.am branches/GNUPG-1-9-BRANCH/scd/ChangeLog branches/GNUPG-1-9-BRANCH/scd/Makefile.am branches/GNUPG-1-9-BRANCH/sm/ChangeLog branches/GNUPG-1-9-BRANCH/sm/Makefile.am branches/GNUPG-1-9-BRANCH/tools/ChangeLog branches/GNUPG-1-9-BRANCH/tools/Makefile.am Log: agent/ 2005-10-08 Marcus Brinkmann * Makefile.am (gpg_protect_tool_LDADD): Add ../gl/libgnu.a. (gpg_preset_passphrase_LDADD, t_common_ldadd): Likewise. (gpg_agent_LDADD): Add ../gl/libgnu.a after ../common/libcommon.a. kbx/ 2005-10-08 Marcus Brinkmann * Makefile.am (kbxutil_LDADD): Add ../gl/libgnu.a after ../jnlib/libjnlib.a. scd/ 2005-10-08 Marcus Brinkmann * Makefile.am (scdaemon_LDADD): Add ../gl/libgnu.a after ../common/libcommon.a. sm/ 2005-10-08 Marcus Brinkmann * Makefile.am (gpgsm_LDADD): Add ../gl/libgnu.a after ../common/libcommon.a. tools/ 2005-10-08 Marcus Brinkmann * Makefile.am (gpgconf_LDADD): Add ../gl/libgnu.a after ../common/libcommon.a. (symcryptrun_LDADD, gpg_connect_agent_LDADD, gpgkey2ssh_LDADD): Likewise. Modified: branches/GNUPG-1-9-BRANCH/agent/ChangeLog =================================================================== --- branches/GNUPG-1-9-BRANCH/agent/ChangeLog 2005-10-07 23:46:36 UTC (rev 3905) +++ branches/GNUPG-1-9-BRANCH/agent/ChangeLog 2005-10-08 00:13:27 UTC (rev 3906) @@ -1,3 +1,9 @@ +2005-10-08 Marcus Brinkmann + + * Makefile.am (gpg_protect_tool_LDADD): Add ../gl/libgnu.a. + (gpg_preset_passphrase_LDADD, t_common_ldadd): Likewise. + (gpg_agent_LDADD): Add ../gl/libgnu.a after ../common/libcommon.a. + 2005-09-16 Werner Koch * minip12.c (build_key_sequence, build_cert_sequence): Fixed Modified: branches/GNUPG-1-9-BRANCH/agent/Makefile.am =================================================================== --- branches/GNUPG-1-9-BRANCH/agent/Makefile.am 2005-10-07 23:46:36 UTC (rev 3905) +++ branches/GNUPG-1-9-BRANCH/agent/Makefile.am 2005-10-08 00:13:27 UTC (rev 3906) @@ -45,7 +45,7 @@ learncard.c -gpg_agent_LDADD = ../gl/libgnu.a ../jnlib/libjnlib.a ../common/libcommon.a \ +gpg_agent_LDADD = ../jnlib/libjnlib.a ../common/libcommon.a ../gl/libgnu.a \ $(LIBGCRYPT_LIBS) $(PTH_LIBS) $(LIBASSUAN_LIBS) \ -lgpg-error @LIBINTL@ @@ -55,7 +55,7 @@ minip12.c minip12.h gpg_protect_tool_LDADD = ../common/libsimple-pwquery.a \ - ../jnlib/libjnlib.a ../common/libcommon.a \ + ../jnlib/libjnlib.a ../common/libcommon.a ../gl/libgnu.a \ $(LIBGCRYPT_LIBS) -lgpg-error @LIBINTL@ if HAVE_W32_SYSTEM gpg_protect_tool_LDADD += -lwsock32 @@ -65,7 +65,7 @@ preset-passphrase.c gpg_preset_passphrase_LDADD = ../common/libsimple-pwquery.a \ - ../jnlib/libjnlib.a ../common/libcommon.a \ + ../jnlib/libjnlib.a ../common/libcommon.a ../gl/libgnu.a \ $(LIBGCRYPT_LIBS) -lgpg-error @LIBINTL@ if HAVE_W32_SYSTEM gpg_preset_passphrase_LDADD += -lwsock32 @@ -76,7 +76,7 @@ # TESTS = t-protect -t_common_ldadd = ../jnlib/libjnlib.a ../common/libcommon.a \ +t_common_ldadd = ../jnlib/libjnlib.a ../common/libcommon.a ../gl/libgnu.a \ $(LIBGCRYPT_LIBS) -lgpg-error @LIBINTL@ t_protect_SOURCES = t-protect.c protect.c Modified: branches/GNUPG-1-9-BRANCH/kbx/ChangeLog =================================================================== --- branches/GNUPG-1-9-BRANCH/kbx/ChangeLog 2005-10-07 23:46:36 UTC (rev 3905) +++ branches/GNUPG-1-9-BRANCH/kbx/ChangeLog 2005-10-08 00:13:27 UTC (rev 3906) @@ -1,3 +1,8 @@ +2005-10-08 Marcus Brinkmann + + * Makefile.am (kbxutil_LDADD): Add ../gl/libgnu.a after + ../jnlib/libjnlib.a. + 2005-06-15 Werner Koch * keybox-file.c (_keybox_read_blob2): Make IMAGE unsigned. Modified: branches/GNUPG-1-9-BRANCH/kbx/Makefile.am =================================================================== --- branches/GNUPG-1-9-BRANCH/kbx/Makefile.am 2005-10-07 23:46:36 UTC (rev 3905) +++ branches/GNUPG-1-9-BRANCH/kbx/Makefile.am 2005-10-08 00:13:27 UTC (rev 3906) @@ -45,7 +45,7 @@ # Note that libcommon is only required to resolve the LIBOBJS. kbxutil_SOURCES = kbxutil.c $(common_sources) -kbxutil_LDADD = ../gl/libgnu.a ../jnlib/libjnlib.a \ +kbxutil_LDADD = ../jnlib/libjnlib.a ../gl/libgnu.a \ $(KSBA_LIBS) $(LIBGCRYPT_LIBS) \ -lgpg-error $(LIBINTL) ../common/libcommon.a Modified: branches/GNUPG-1-9-BRANCH/scd/ChangeLog =================================================================== --- branches/GNUPG-1-9-BRANCH/scd/ChangeLog 2005-10-07 23:46:36 UTC (rev 3905) +++ branches/GNUPG-1-9-BRANCH/scd/ChangeLog 2005-10-08 00:13:27 UTC (rev 3906) @@ -1,3 +1,8 @@ +2005-10-08 Marcus Brinkmann + + * Makefile.am (scdaemon_LDADD): Add ../gl/libgnu.a after + ../common/libcommon.a. + 2005-09-09 Werner Koch * pcsc-wrapper.c (main): Removed bogus free. Modified: branches/GNUPG-1-9-BRANCH/scd/Makefile.am =================================================================== --- branches/GNUPG-1-9-BRANCH/scd/Makefile.am 2005-10-07 23:46:36 UTC (rev 3905) +++ branches/GNUPG-1-9-BRANCH/scd/Makefile.am 2005-10-08 00:13:27 UTC (rev 3906) @@ -43,7 +43,7 @@ app.c app-common.h app-help.c $(card_apps) -scdaemon_LDADD = ../gl/libgnu.a ../jnlib/libjnlib.a ../common/libcommon.a \ +scdaemon_LDADD = ../jnlib/libjnlib.a ../common/libcommon.a ../gl/libgnu.a \ $(LIBGCRYPT_LIBS) $(KSBA_LIBS) $(PTH_LIBS) $(LIBASSUAN_LIBS) \ $(LIBUSB_LIBS) -lgpg-error $(LIBINTL) $(DL_LIBS) Modified: branches/GNUPG-1-9-BRANCH/sm/ChangeLog =================================================================== --- branches/GNUPG-1-9-BRANCH/sm/ChangeLog 2005-10-07 23:46:36 UTC (rev 3905) +++ branches/GNUPG-1-9-BRANCH/sm/ChangeLog 2005-10-08 00:13:27 UTC (rev 3906) @@ -1,3 +1,8 @@ +2005-10-08 Marcus Brinkmann + + * Makefile.am (gpgsm_LDADD): Add ../gl/libgnu.a after + ../common/libcommon.a. + 2005-09-08 Werner Koch * export.c (popen_protect_tool): Add option --have-cert. We Modified: branches/GNUPG-1-9-BRANCH/sm/Makefile.am =================================================================== --- branches/GNUPG-1-9-BRANCH/sm/Makefile.am 2005-10-07 23:46:36 UTC (rev 3905) +++ branches/GNUPG-1-9-BRANCH/sm/Makefile.am 2005-10-08 00:13:27 UTC (rev 3906) @@ -52,8 +52,8 @@ certreqgen.c -gpgsm_LDADD = ../gl/libgnu.a ../jnlib/libjnlib.a ../kbx/libkeybox.a \ - ../common/libcommon.a \ +gpgsm_LDADD = ../jnlib/libjnlib.a ../kbx/libkeybox.a \ + ../common/libcommon.a ../gl/libgnu.a \ $(LIBGCRYPT_LIBS) $(KSBA_LIBS) $(LIBASSUAN_LIBS) -lgpg-error \ $(LIBINTL) $(PTH_LIBS) Modified: branches/GNUPG-1-9-BRANCH/tools/ChangeLog =================================================================== --- branches/GNUPG-1-9-BRANCH/tools/ChangeLog 2005-10-07 23:46:36 UTC (rev 3905) +++ branches/GNUPG-1-9-BRANCH/tools/ChangeLog 2005-10-08 00:13:27 UTC (rev 3906) @@ -1,3 +1,10 @@ +2005-10-08 Marcus Brinkmann + + * Makefile.am (gpgconf_LDADD): Add ../gl/libgnu.a after + ../common/libcommon.a. + (symcryptrun_LDADD, gpg_connect_agent_LDADD, gpgkey2ssh_LDADD): + Likewise. + 2005-09-29 Marcus Brinkmann * Makefile.am (AM_CFLAGS): Add $(LIBGCRYPT_CFLAGS). Modified: branches/GNUPG-1-9-BRANCH/tools/Makefile.am =================================================================== --- branches/GNUPG-1-9-BRANCH/tools/Makefile.am 2005-10-07 23:46:36 UTC (rev 3905) +++ branches/GNUPG-1-9-BRANCH/tools/Makefile.am 2005-10-08 00:13:27 UTC (rev 3906) @@ -43,23 +43,23 @@ gpgconf_SOURCES = gpgconf.c gpgconf.h gpgconf-comp.c no-libgcrypt.c -gpgconf_LDADD = ../gl/libgnu.a ../jnlib/libjnlib.a \ - ../common/libcommon.a @LIBINTL@ +gpgconf_LDADD = ../jnlib/libjnlib.a \ + ../common/libcommon.a ../gl/libgnu.a @LIBINTL@ symcryptrun_SOURCES = symcryptrun.c -symcryptrun_LDADD = $(LIBUTIL_LIBS) ../gl/libgnu.a ../jnlib/libjnlib.a \ - ../common/libcommon.a \ +symcryptrun_LDADD = $(LIBUTIL_LIBS) ../jnlib/libjnlib.a \ + ../common/libcommon.a ../gl/libgnu.a \ ../common/libsimple-pwquery.a $(LIBGCRYPT_LIBS) \ $(GPG_ERROR_LIBS) $(LIBINTL) watchgnupg_SOURCES = watchgnupg.c gpg_connect_agent_SOURCES = gpg-connect-agent.c no-libgcrypt.c -gpg_connect_agent_LDADD = ../gl/libgnu.a ../jnlib/libjnlib.a \ - ../common/libcommon.a \ +gpg_connect_agent_LDADD = ../jnlib/libjnlib.a \ + ../common/libcommon.a ../gl/libgnu.a \ $(LIBASSUAN_LIBS) $(GPG_ERROR_LIBS) $(LIBINTL) gpgkey2ssh_SOURCES = gpgkey2ssh.c gpgkey2ssh_CFLAGS = $(LIBGCRYPT_CFLAGS) $(GPG_ERROR_CFLAGS) -gpgkey2ssh_LDADD = ../gl/libgnu.a ../common/libcommon.a \ +gpgkey2ssh_LDADD = ../common/libcommon.a ../gl/libgnu.a \ $(LIBGCRYPT_LIBS) $(GPG_ERROR_LIBS) From cvs at cvs.gnupg.org Sat Oct 8 02:17:09 2005 From: cvs at cvs.gnupg.org (svn author marcus) Date: Sat Oct 8 01:48:10 2005 Subject: [svn] GnuPG - r3907 - branches/GNUPG-1-9-BRANCH/tools Message-ID: Author: marcus Date: 2005-10-08 02:17:09 +0200 (Sat, 08 Oct 2005) New Revision: 3907 Modified: branches/GNUPG-1-9-BRANCH/tools/ChangeLog branches/GNUPG-1-9-BRANCH/tools/Makefile.am Log: 2005-10-08 Marcus Brinkmann * Makefile.am (watchgnupg_LDADD): New variable. Modified: branches/GNUPG-1-9-BRANCH/tools/ChangeLog =================================================================== --- branches/GNUPG-1-9-BRANCH/tools/ChangeLog 2005-10-08 00:13:27 UTC (rev 3906) +++ branches/GNUPG-1-9-BRANCH/tools/ChangeLog 2005-10-08 00:17:09 UTC (rev 3907) @@ -1,5 +1,7 @@ 2005-10-08 Marcus Brinkmann + * Makefile.am (watchgnupg_LDADD): New variable. + * Makefile.am (gpgconf_LDADD): Add ../gl/libgnu.a after ../common/libcommon.a. (symcryptrun_LDADD, gpg_connect_agent_LDADD, gpgkey2ssh_LDADD): Modified: branches/GNUPG-1-9-BRANCH/tools/Makefile.am =================================================================== --- branches/GNUPG-1-9-BRANCH/tools/Makefile.am 2005-10-08 00:13:27 UTC (rev 3906) +++ branches/GNUPG-1-9-BRANCH/tools/Makefile.am 2005-10-08 00:17:09 UTC (rev 3907) @@ -53,6 +53,7 @@ $(GPG_ERROR_LIBS) $(LIBINTL) watchgnupg_SOURCES = watchgnupg.c +watchgnupg_LDADD = $(NETLIBS) gpg_connect_agent_SOURCES = gpg-connect-agent.c no-libgcrypt.c gpg_connect_agent_LDADD = ../jnlib/libjnlib.a \ From cvs at cvs.gnupg.org Sat Oct 8 02:21:54 2005 From: cvs at cvs.gnupg.org (svn author marcus) Date: Sat Oct 8 01:52:55 2005 Subject: [svn] assuan - r192 - trunk/src Message-ID: Author: marcus Date: 2005-10-08 02:21:54 +0200 (Sat, 08 Oct 2005) New Revision: 192 Modified: trunk/src/ChangeLog trunk/src/assuan-defs.h trunk/src/setenv.c Log: 2005-10-08 Marcus Brinkmann * assuan-defs.h (setenv, unsetenv, clearenv) [!HAVE_SETENV]: Define to _assuan_*. * setenv.c: Include "assuan-defs.h". (__add_to_environ): Make static. Modified: trunk/src/ChangeLog =================================================================== --- trunk/src/ChangeLog 2005-10-07 00:40:45 UTC (rev 191) +++ trunk/src/ChangeLog 2005-10-08 00:21:54 UTC (rev 192) @@ -1,3 +1,10 @@ +2005-10-08 Marcus Brinkmann + + * assuan-defs.h (setenv, unsetenv, clearenv) [!HAVE_SETENV]: + Define to _assuan_*. + * setenv.c: Include "assuan-defs.h". + (__add_to_environ): Make static. + 2005-10-07 Marcus Brinkmann * assuan-defs.h (memrchr) [!HAVE_MEMRCHR]: New prototype. Modified: trunk/src/assuan-defs.h =================================================================== --- trunk/src/assuan-defs.h 2005-10-07 00:40:45 UTC (rev 191) +++ trunk/src/assuan-defs.h 2005-10-08 00:21:54 UTC (rev 192) @@ -259,6 +259,9 @@ char *stpcpy (char *dest, const char *src); #endif #ifndef HAVE_SETENV +#define setenv _assuan_setenv +#define unsetenv _assuan_setenv +#define clearenv _assuan_clearenv int setenv (const char *name, const char *value, int replace); #endif Modified: trunk/src/setenv.c =================================================================== --- trunk/src/setenv.c 2005-10-07 00:40:45 UTC (rev 191) +++ trunk/src/setenv.c 2005-10-08 00:21:54 UTC (rev 192) @@ -20,6 +20,8 @@ # include #endif +#include "assuan-defs.h" + #define __builtin_expect(cond,val) (cond) #include @@ -108,7 +110,7 @@ must be used directly. This is all complicated by the fact that we try to reuse values once generated for a `setenv' call since we can never free the strings. */ -int +static int __add_to_environ (const char *name, const char *value, const char *combined, int replace) { From cvs at cvs.gnupg.org Sat Oct 8 02:25:12 2005 From: cvs at cvs.gnupg.org (svn author marcus) Date: Sat Oct 8 01:56:13 2005 Subject: [svn] assuan - r193 - trunk Message-ID: Author: marcus Date: 2005-10-08 02:25:12 +0200 (Sat, 08 Oct 2005) New Revision: 193 Modified: trunk/ChangeLog trunk/configure.ac Log: 2005-10-08 Marcus Brinkmann * configure.ac: Check for socket library and add it to LIBASSUAN_CONFIG_LIBS if necessary. Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2005-10-08 00:21:54 UTC (rev 192) +++ trunk/ChangeLog 2005-10-08 00:25:12 UTC (rev 193) @@ -1,3 +1,15 @@ +2005-10-08 Marcus Brinkmann + + * configure.ac: Check for socket library and add it to + LIBASSUAN_CONFIG_LIBS if necessary. + +2005-10-07 Marcus Brinkmann + + * configure.ac: Invoke AC_CANONICAL_HOST. Define _XOPEN_SOURCE, + _XOPEN_SOURCE_EXTENDED and __EXTENSIONS__ on Solaris. + Add stpcy as replacement function. + Add setenv as replacement function (and check for unistd.h). + 2005-06-20 Werner Koch Released 0.6.10. Modified: trunk/configure.ac =================================================================== --- trunk/configure.ac 2005-10-08 00:21:54 UTC (rev 192) +++ trunk/configure.ac 2005-10-08 00:25:12 UTC (rev 193) @@ -34,6 +34,7 @@ AC_CONFIG_SRCDIR(src/assuan.h) AM_CONFIG_HEADER(config.h) +AC_CANONICAL_HOST AC_GNU_SOURCE @@ -77,6 +78,11 @@ have_dosish_system=yes have_w32_system=yes ;; + *-solaris*) + AC_DEFINE(_XOPEN_SOURCE, 500, Activate extensions on Solaris) + AC_DEFINE(_XOPEN_SOURCE_EXTENDED, 1, Activate extensions on Solaris) + AC_DEFINE(__EXTENSIONS__, 1, Activate extensions on Solaris) + ;; esac if test "$have_dosish_system" = yes; then @@ -92,14 +98,20 @@ fi dnl AM_CONDITIONAL(HAVE_W32_SYSTEM, test "$have_w32_system" = yes) +# Check for network libraries. +NETLIBS= +AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt, + [NETLIBS="-lsocket"])) - # For src/libassuan-config.in LIBASSUAN_CONFIG_LIBS="-lassuan" LIBASSUAN_CONFIG_CFLAGS="" if test "$have_w32_system" = yes; then LIBASSUAN_CONFIG_LIBS="$LIBASSUAN_CONFIG_LIBS -lwsock32" fi +if test x"$NETLIBS" != x; then + LIBASSUAN_CONFIG_LIBS="$LIBASSUAN_CONFIG_LIBS $NETLIBS" +fi AC_SUBST(LIBASSUAN_CONFIG_LIBS) AC_SUBST(LIBASSUAN_CONFIG_CFLAGS) @@ -139,6 +151,10 @@ AC_REPLACE_FUNCS(isascii) AC_REPLACE_FUNCS(putc_unlocked) AC_REPLACE_FUNCS(memrchr) +AC_REPLACE_FUNCS(stpcpy) +# Check for unistd.h for setenv replacement function. +AC_CHECK_HEADERS(unistd.h) +AC_REPLACE_FUNCS(setenv) # Create the config files. AC_CONFIG_FILES([Makefile]) From cvs at cvs.gnupg.org Sat Oct 8 19:15:54 2005 From: cvs at cvs.gnupg.org (svn author mo) Date: Sat Oct 8 18:46:51 2005 Subject: [svn] gcry - r1122 - branches/LIBGCRYPT-2.0-MO Message-ID: Author: mo Date: 2005-10-08 19:15:52 +0200 (Sat, 08 Oct 2005) New Revision: 1122 Added: branches/LIBGCRYPT-2.0-MO/DESIGN Modified: branches/LIBGCRYPT-2.0-MO/ChangeLog Log: 2005-10-08 Moritz Schulte * DESIGN: New file. Modified: branches/LIBGCRYPT-2.0-MO/ChangeLog =================================================================== --- branches/LIBGCRYPT-2.0-MO/ChangeLog 2005-10-05 10:28:29 UTC (rev 1121) +++ branches/LIBGCRYPT-2.0-MO/ChangeLog 2005-10-08 17:15:52 UTC (rev 1122) @@ -1,3 +1,7 @@ +2005-10-08 Moritz Schulte + + * DESIGN: New file. + 2005-10-01 Moritz Schulte * Makefile.am: Adjust directory specifications to new source-tree Added: branches/LIBGCRYPT-2.0-MO/DESIGN =================================================================== --- branches/LIBGCRYPT-2.0-MO/DESIGN 2005-10-05 10:28:29 UTC (rev 1121) +++ branches/LIBGCRYPT-2.0-MO/DESIGN 2005-10-08 17:15:52 UTC (rev 1122) @@ -0,0 +1,197 @@ +Short: + +Although Libgcrypt 2 does still support the API of Libgcrypt 1.x, the +code has been modified fundamentally; the several subsystems have been +untangled, reordered and do now communicate through well-specified +interfaces. + +Long: + +I felt the need to modify the Libgcrypt core, since I have observed +several already present or potential problems: + + * Libgcrypt 1.x is *monolithic* + + Although Libgcrypt 1.x does consist of several so-called + "subsystems", these subsystems are not really that seperate from each + other. This makes it difficult to extract or even replace + subsystems. + + Furthermore, the fact that the subsystems may interact with each + other in subtle ways, adds unnecessary complexity. + + * The well-known initialization-problem + + Unexpected results might occur when Libgcrypt is initialized by + e.g. two seperate libraries, linked into one program. The problem + steems from the fact that Libgcrypt 1 makes extensive use of + global state. + + Related to this problem is the threading problem: Libgcrypt might + be used by two different libraries, which have different preferences + in respect to the threading library used. + +Design goals: + + * Subsystems are *indeed* seperate from each other. No subsystem + implementation does depend on a different subsystem + implementation; subsystems *do* depend only on subsystem + *interfaces*. Example: the "sexp" subsystem needs to deal with + MPI object. But instead of depending on the included MPI + subsystem, the sexp subsystem does only require the user to + register any subsystem, that complies to the MPI subsystem + specification; of course, the included MPI subsystem does + conform to the MPI subsystem specification. + + * Clear rules, defining which subsystem is allowed to use which + subsystem interface. + + * Less complex. + +Implementation: + + * Source tree: + + The source code of Libgcrypt 2 is split up into several directories: + + src/liberty + src/include + src/ath + src/common + src/util + + src/subsystems/asym-cipher + src/subsystems/hash + src/subsystems/mpi + src/subsystems/prime + src/subsystems/random + src/subsystems/secmem + src/subsystems/sexp + src/subsystems/sym-cipher + + src/compat + + * The Libgcrypt 2 package does contain two libraries: + + - libgcrypt-core + - libgcrypt + + libgcrypt-core provides roughly the same functionality like + Libgcrypt 1, the API is different. libgcrypt-core does not use any + (is this correct?) global state; a context needs to be passed to + every single library function. + + libgcrypt is a compatibility layer on top of libgcrypt-core; it + provides the same API and ABI like Libgcrypt 1. + + * Subsystem hierarchy + + + high-level asym-cipher + . hash sym-cipher + . prime sexp + . mpi + . random + low-level secmem + + Only down-calls are allowed. + + * Namespace + + Exported symbols contained in libgcrypt-core are prefixed with + "gcry_core_" or "GCRY_CORE_"; the same applies to exported types. + + Only exceptions: Libgpg-error provided types, wrapped by + Libgcrypt: gcry_error_t, gcry_err_code_t, gcry_err_source_t. + + * The context object + + libgcrypt-core makes extensive use of a "context object". This + object needs to be passed by the user to every function contained + in libgcrypt-core. + + General procedure for users of Libgcrypt: + + - create context + - initialize context + - install all required subsystems and handlers in context + - set general library properties (e.g. flags) + - use "prepare" mechanism to give subsystem a chance to + initialize if they need to do so + - use library + - destroy context + + * Functionality which is included in libgcrypt-compat, but which has + been left out from libgcrypt-core + + - the module system: the user needs to pass algorithm + specification structures directly to the library; this implies + the removal of the following functionality: + + - lookup functions, which convert between different algorithm + identifiers (e.g. names to IDs) + + - the possibility to disable/enable algorithms + + - the pubkey subsystem: when looking at the API of the pubkey + subsystem, it becomes clear that it can hardly be adjusted so + that it makes no use of global-state: + + - algorithm identifiers are encoded in S-Expressions, module + lookups are necessary for retrieving the algorithm + specification structures + - the subsystem does not use "handles" at all + + - the gcry_control() catch-all call: there are special functions + now available for the different purposes + + - the API for ac data sets has been simplified; now it is not + possible anymore to control when copying and deallocation of + data happens; when storing data in or receiving data from data + sets, data is always copied; this reduces complexity and code + size + + - the "convenience" MPI macros + +Side effects: + + * Since the whole code has been reorganized fundamentally, ChangeLogs ... + +Notes: + + * the Libgcrypt-core API is NOT public yet, it is considered highly + experimental and subject to changes until it is declared as stable; + especially in the field of subsystem interfaces, there is still much + work to do + +* the whole code has been reformatted with indent + +* the test suite has been changed so that each test includes some + shared startup code; this startup code allows for controlling the + test suite runs through environment variables (like: + GCRY_ENABLE_QUICK_RANDOM) + +* when linking GnuPG components against the new Libgcrypt, i noticed + that some components do NOT follow the instructions in the manual in + respect to thread initialization. Now, this was not be a problem, + if the new Libgcrypt would not DEPEND on the behaviour defined in + the manual[0] + +Misc new features: + +* the test suite contains stress tests for threading, trying to + trigger race conditions + +To do: + +* update manual (actually this is a low-priority task, since the new + core API is not public yet) + + +-- + +[0] the manual says "If your application is multi-threaded, you must + set the thread support callbacks with the `GCRYCTL_SET_THREAD_CBS' + command *before* any other function in the library."; + e.g. gpg-agent and scdaemon did other kinds of Libgcrypt + initialization before registering the threading system From cvs at cvs.gnupg.org Sun Oct 9 14:29:17 2005 From: cvs at cvs.gnupg.org (svn author mo) Date: Sun Oct 9 14:00:13 2005 Subject: [svn] gcry - r1123 - trunk/mpi Message-ID: Author: mo Date: 2005-10-09 14:29:17 +0200 (Sun, 09 Oct 2005) New Revision: 1123 Modified: trunk/mpi/ChangeLog trunk/mpi/mpi-bit.c trunk/mpi/mpi-cmp.c Log: mpi/ChangeLog: 2005-10-09 Moritz Schulte * mpi-cmp.c (gcry_mpi_cmp_ui): Rewritten; correctly handle case of zero limbs in U. Modified: trunk/mpi/ChangeLog =================================================================== --- trunk/mpi/ChangeLog 2005-10-08 17:15:52 UTC (rev 1122) +++ trunk/mpi/ChangeLog 2005-10-09 12:29:17 UTC (rev 1123) @@ -1,3 +1,8 @@ +2005-10-09 Moritz Schulte + + * mpi-cmp.c (gcry_mpi_cmp_ui): Rewritten; correctly handle case of + zero limbs in U. + 2005-04-27 Moritz Schulte * mpiutil.c (gcry_mpi_randomize): Store random data in secure Modified: trunk/mpi/mpi-bit.c =================================================================== --- trunk/mpi/mpi-bit.c 2005-10-08 17:15:52 UTC (rev 1122) +++ trunk/mpi/mpi-bit.c 2005-10-09 12:29:17 UTC (rev 1123) @@ -163,7 +163,8 @@ bitno = n % BITS_PER_MPI_LIMB; if( limbno >= a->nlimbs ) - return; /* not allocated, so need to clear bits :-) */ + return; /* not allocated, therefore no need to clear bits + :-) */ for( ; bitno < BITS_PER_MPI_LIMB; bitno++ ) a->d[limbno] &= ~(A_LIMB_1 << bitno); Modified: trunk/mpi/mpi-cmp.c =================================================================== --- trunk/mpi/mpi-cmp.c 2005-10-08 17:15:52 UTC (rev 1122) +++ trunk/mpi/mpi-cmp.c 2005-10-09 12:29:17 UTC (rev 1123) @@ -1,5 +1,5 @@ /* mpi-cmp.c - MPI functions - * Copyright (C) 1998, 1999, 2001, 2002 Free Software Foundation, Inc. + * Copyright (C) 1998, 1999, 2001, 2002, 2005 Free Software Foundation, Inc. * * This file is part of Libgcrypt. * @@ -24,51 +24,67 @@ #include "mpi-internal.h" int -gcry_mpi_cmp_ui( gcry_mpi_t u, unsigned long v ) +gcry_mpi_cmp_ui (gcry_mpi_t u, unsigned long v) { - mpi_limb_t limb = v; + mpi_limb_t limb = v; - _gcry_mpi_normalize( u ); - if( !u->nlimbs && !limb ) - return 0; - if( u->sign ) - return -1; - if( u->nlimbs > 1 ) - return 1; + _gcry_mpi_normalize (u); - if( u->d[0] == limb ) - return 0; - else if( u->d[0] > limb ) + /* Handle the case that U contains no limb. */ + if (u->nlimbs == 0) + return -(limb != 0); + + /* Handle the case that U is negative. */ + if (u->sign) + return -1; + + if (u->nlimbs == 1) + { + /* Handle the case that U contains exactly one limb. */ + + if (u->d[0] > limb) return 1; - else + if (u->d[0] < limb) return -1; + return 0; + } + else + /* Handle the case that U contains more than one limb. */ + return 1; } int -gcry_mpi_cmp( gcry_mpi_t u, gcry_mpi_t v ) +gcry_mpi_cmp (gcry_mpi_t u, gcry_mpi_t v) { - mpi_size_t usize, vsize; - int cmp; + mpi_size_t usize; + mpi_size_t vsize; + int cmp; - _gcry_mpi_normalize( u ); - _gcry_mpi_normalize( v ); - usize = u->nlimbs; - vsize = v->nlimbs; - if( !u->sign && v->sign ) - return 1; - if( u->sign && !v->sign ) - return -1; - if( usize != vsize && !u->sign && !v->sign ) - return usize - vsize; - if( usize != vsize && u->sign && v->sign ) - return vsize + usize; - if( !usize ) - return 0; - if( !(cmp = _gcry_mpih_cmp( u->d, v->d, usize )) ) - return 0; - if( (cmp < 0?1:0) == (u->sign?1:0)) - return 1; + _gcry_mpi_normalize (u); + _gcry_mpi_normalize (v); + + usize = u->nlimbs; + vsize = v->nlimbs; + + /* Compare sign bits. */ + + if (!u->sign && v->sign) + return 1; + if (u->sign && !v->sign) return -1; -} + /* U and V are either both positive or both negative. */ + if( usize != vsize && !u->sign && !v->sign ) + return usize - vsize; + if( usize != vsize && u->sign && v->sign ) + return vsize + usize; + if( !usize ) + return 0; + if( !(cmp = _gcry_mpih_cmp( u->d, v->d, usize )) ) + return 0; + if( (cmp < 0?1:0) == (u->sign?1:0)) + return 1; + + return -1; +} From cvs at cvs.gnupg.org Sun Oct 9 15:32:36 2005 From: cvs at cvs.gnupg.org (svn author mo) Date: Sun Oct 9 15:03:32 2005 Subject: [svn] gcry - r1124 - trunk/src Message-ID: Author: mo Date: 2005-10-09 15:32:35 +0200 (Sun, 09 Oct 2005) New Revision: 1124 Modified: trunk/src/ChangeLog trunk/src/global.c Log: 2005-10-09 Moritz Schulte * global.c (gcry_control): Call global_init() after passing thread cbs to ath. global_init() MUST to be called AFTER passing the cbs to ath and BEFORE calling library functions, which make use of ath. This change combines cbs installing with ath initialization and thus removes the need to call other library initialization functions inbetween like e.g. gcry_check_version(). Modified: trunk/src/ChangeLog =================================================================== --- trunk/src/ChangeLog 2005-10-09 12:29:17 UTC (rev 1123) +++ trunk/src/ChangeLog 2005-10-09 13:32:35 UTC (rev 1124) @@ -1,3 +1,12 @@ +2005-10-09 Moritz Schulte + + * global.c (gcry_control): Call global_init() after passing thread + cbs to ath. global_init() MUST to be called AFTER passing the cbs + to ath and BEFORE calling library functions, which make use of + ath. This change combines cbs installing with ath initialization + and thus removes the need to call other library initialization + functions inbetween like e.g. gcry_check_version(). + 2005-10-01 Moritz Schulte * ath.c: Assign copyright to FSF. Modified: trunk/src/global.c =================================================================== --- trunk/src/global.c 2005-10-09 12:29:17 UTC (rev 1123) +++ trunk/src/global.c 2005-10-09 13:32:35 UTC (rev 1124) @@ -275,6 +275,8 @@ case GCRYCTL_SET_THREAD_CBS: err = ath_install (va_arg (arg_ptr, void *), any_init_done); + if (! err) + global_init (); break; case GCRYCTL_FAST_POLL: From cvs at cvs.gnupg.org Sun Oct 9 16:00:54 2005 From: cvs at cvs.gnupg.org (svn author mo) Date: Sun Oct 9 15:31:46 2005 Subject: [svn] gcry - r1125 - branches/LIBGCRYPT-2.0-MO/src/subsystems/prime Message-ID: Author: mo Date: 2005-10-09 16:00:53 +0200 (Sun, 09 Oct 2005) New Revision: 1125 Modified: branches/LIBGCRYPT-2.0-MO/src/subsystems/prime/ChangeLog branches/LIBGCRYPT-2.0-MO/src/subsystems/prime/core.c Log: prime/ChangeLog: 2005-10-09 Moritz Schulte Merged changes made by Werner to trunk from 2005-08-22: * core.c (check_prime): New arg RM_ROUNDS. (prime_generate_internal): Call it here with 5 rounds as used before. (_gcry_prime_check): But here with 64 rounds. (is_prime): Make sure never to use less than 5 rounds. Modified: branches/LIBGCRYPT-2.0-MO/src/subsystems/prime/ChangeLog =================================================================== --- branches/LIBGCRYPT-2.0-MO/src/subsystems/prime/ChangeLog 2005-10-09 13:32:35 UTC (rev 1124) +++ branches/LIBGCRYPT-2.0-MO/src/subsystems/prime/ChangeLog 2005-10-09 14:00:53 UTC (rev 1125) @@ -1,3 +1,12 @@ +2005-10-09 Moritz Schulte + + Merged changes made by Werner to trunk from 2005-08-22: + * core.c (check_prime): New arg RM_ROUNDS. + (prime_generate_internal): Call it here with 5 rounds as used + before. + (_gcry_prime_check): But here with 64 rounds. + (is_prime): Make sure never to use less than 5 rounds. + 2005-09-23 Moritz Schulte Reorganized source tree. @@ -2,3 +11,3 @@ - New file: core.c (based on former file cipher/prime.c). + New file: core.c (based on former file cipher/primegen.c). New files: gcrypt-prime-common.h, gcrypt-prime.h, Modified: branches/LIBGCRYPT-2.0-MO/src/subsystems/prime/core.c =================================================================== --- branches/LIBGCRYPT-2.0-MO/src/subsystems/prime/core.c 2005-10-09 13:32:35 UTC (rev 1124) +++ branches/LIBGCRYPT-2.0-MO/src/subsystems/prime/core.c 2005-10-09 14:00:53 UTC (rev 1125) @@ -39,7 +39,8 @@ void *extra_check_arg); static int check_prime (gcry_core_context_t ctx, gcry_core_mpi_t prime, gcry_core_mpi_t val_2, - gcry_prime_check_func_t cb_func, void *cb_arg); + int rm_rounds, gcry_prime_check_func_t cb_func, + void *cb_arg); static int is_prime (gcry_core_context_t ctx, gcry_core_mpi_t n, int steps, int *count); static void m_out_of_n (gcry_core_context_t ctx, char *array, int m, int n); @@ -359,9 +360,8 @@ else count2 = 0; } - while (! - ((nprime == pbits) - && check_prime (ctx, prime, val_2, cb_func, cb_arg))); + while (! ((nprime == pbits) + && check_prime (ctx, prime, val_2, 5, cb_func, cb_arg))); if (GCRY_CORE_DEBUGGING_PRIME (ctx)) { @@ -636,11 +636,12 @@ /**************** * Returns: true if this may be a prime + * RM_ROUNDS gives the number of Rabin-Miller tests to run. */ static int check_prime (gcry_core_context_t ctx, gcry_core_mpi_t prime, gcry_core_mpi_t val_2, - gcry_prime_check_func_t cb_func, void *cb_arg) + int rm_rounds, gcry_prime_check_func_t cb_func, void *cb_arg) { int count = 0; @@ -680,7 +681,7 @@ if (!cb_func || cb_func (cb_arg, GCRY_PRIME_CHECK_AT_MAYBE_PRIME, prime)) { /* Perform stronger tests. */ - if (is_prime (ctx, prime, 5, &count)) + if (is_prime (ctx, prime, rm_rounds, &count)) { if (!cb_func || cb_func (cb_arg, GCRY_PRIME_CHECK_AT_GOT_PRIME, prime)) @@ -708,6 +709,9 @@ int rc = 0; unsigned nbits = gcry_core_mpi_get_nbits (ctx, n); + if (steps < 5) /* Make sure that we do at least 5 rounds. */ + steps = 5; + gcry_core_mpi_sub_ui (ctx, nminus1, n, 1); /* Find q and k, so that n = 1 + 2^k * q . */ @@ -945,7 +949,9 @@ gcry_error_t err = 0; gcry_core_mpi_t val_2 = gcry_core_mpi_alloc_set_ui (ctx, 2); /* Used by the Fermat test. */ - if (!check_prime (ctx, x, val_2, NULL, NULL)) + /* We use 64 rounds because the prime we are going to test is not + guaranteed to be a random one. */ + if (! check_prime (ctx, x, val_2, 64, NULL, NULL)) err = gcry_core_error (GPG_ERR_NO_PRIME); gcry_core_mpi_release (ctx, val_2); From cvs at cvs.gnupg.org Sun Oct 9 16:53:37 2005 From: cvs at cvs.gnupg.org (svn author mo) Date: Sun Oct 9 16:24:31 2005 Subject: [svn] gcry - r1126 - branches/LIBGCRYPT-2.0-MO/src/compat Message-ID: Author: mo Date: 2005-10-09 16:53:37 +0200 (Sun, 09 Oct 2005) New Revision: 1126 Added: branches/LIBGCRYPT-2.0-MO/src/compat/ChangeLog Modified: branches/LIBGCRYPT-2.0-MO/src/compat/init.c Log: compat/ChangeLog: 2005-10-09 Moritz Schulte * init.c: Removed superfluous include commands. Added: branches/LIBGCRYPT-2.0-MO/src/compat/ChangeLog =================================================================== --- branches/LIBGCRYPT-2.0-MO/src/compat/ChangeLog 2005-10-09 14:00:53 UTC (rev 1125) +++ branches/LIBGCRYPT-2.0-MO/src/compat/ChangeLog 2005-10-09 14:53:37 UTC (rev 1126) @@ -0,0 +1,3 @@ +2005-10-09 Moritz Schulte + + * init.c: Removed superfluous include commands. Modified: branches/LIBGCRYPT-2.0-MO/src/compat/init.c =================================================================== --- branches/LIBGCRYPT-2.0-MO/src/compat/init.c 2005-10-09 14:00:53 UTC (rev 1125) +++ branches/LIBGCRYPT-2.0-MO/src/compat/init.c 2005-10-09 14:53:37 UTC (rev 1126) @@ -19,15 +19,6 @@ 02111-1307, USA. */ #include - -#include -#include -#include -#include -#include -#include -#include - #include #include From cvs at cvs.gnupg.org Wed Oct 12 00:13:53 2005 From: cvs at cvs.gnupg.org (svn author dshaw) Date: Tue Oct 11 23:44:31 2005 Subject: [svn] GnuPG - r3908 - in trunk: . g10 Message-ID: Author: dshaw Date: 2005-10-12 00:13:49 +0200 (Wed, 12 Oct 2005) New Revision: 3908 Modified: trunk/ChangeLog trunk/configure.ac trunk/g10/ChangeLog trunk/g10/getkey.c trunk/g10/keygen.c trunk/g10/sig-check.c Log: * getkey.c (merge_selfsigs_subkey), sig-check.c (signature_check2), keygen.c (make_backsig): Did some backsig interop testing with the PGP folks. All is well, so I'm turning generation of backsigs on for new keys. Checking for backsigs on verification is still off. Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2005-10-08 00:17:09 UTC (rev 3907) +++ trunk/ChangeLog 2005-10-11 22:13:49 UTC (rev 3908) @@ -1,3 +1,9 @@ +2005-10-11 David Shaw + + * configure.ac: Did some backsig testing with the PGP folks. All + is well, so I'm turning generation of backsigs on for new keys. + Checking for backsigs on verification is still off. + 2005-10-05 Werner Koch * configure.ac: Changed identification file name to g10/gpg.c Modified: trunk/configure.ac =================================================================== --- trunk/configure.ac 2005-10-08 00:17:09 UTC (rev 3907) +++ trunk/configure.ac 2005-10-11 22:13:49 UTC (rev 3908) @@ -129,10 +129,10 @@ gnupg_use_iconv=$enableval, gnupg_use_iconv=yes) AC_MSG_RESULT($gnupg_use_iconv) -AC_MSG_CHECKING([whether to enable the experimental backsigs code]) +AC_MSG_CHECKING([whether to require signing subkeys to have back signatures]) AC_ARG_ENABLE(backsigs, AC_HELP_STRING([--enable-backsigs], - [enable the experimental backsigs code]), + [require signing subkeys to have back signatures]), do_backsigs=$enableval, do_backsigs=no) AC_MSG_RESULT($do_backsigs) @@ -757,8 +757,8 @@ AC_DEFINE(USE_GNUPG_ICONV,1,[Define to use the new iconv based code]) fi -if test "$do_backsigs" = yes ; then - AC_DEFINE(DO_BACKSIGS,1,[Define to enable the experimental backsigs code]) +if test "$do_backsigs" = no ; then + AC_DEFINE(FAKE_BACKSIGS,1,[Define to fake missing backsigs]) fi AM_CONDITIONAL(ENABLE_CARD_SUPPORT, test "$card_support" = yes) Modified: trunk/g10/ChangeLog =================================================================== --- trunk/g10/ChangeLog 2005-10-08 00:17:09 UTC (rev 3907) +++ trunk/g10/ChangeLog 2005-10-11 22:13:49 UTC (rev 3908) @@ -1,3 +1,11 @@ +2005-10-11 David Shaw + + * getkey.c (merge_selfsigs_subkey), sig-check.c + (signature_check2), keygen.c (make_backsig): Did some backsig + interop testing with the PGP folks. All is well, so I'm turning + generation of backsigs on for new keys. Checking for backsigs on + verification is still off. + 2005-10-05 Werner Koch * g10.c: Renamed to .. Modified: trunk/g10/getkey.c =================================================================== --- trunk/g10/getkey.c 2005-10-08 00:17:09 UTC (rev 3907) +++ trunk/g10/getkey.c 2005-10-11 22:13:49 UTC (rev 3908) @@ -2043,10 +2043,6 @@ subpk->is_valid = 1; -#ifndef DO_BACKSIGS - /* Pretend the backsig is present and accounted for. */ - subpk->backsig=2; -#else /* Find the first 0x19 embedded signature on our self-sig. */ if(subpk->backsig==0) { @@ -2086,6 +2082,12 @@ free_seckey_enc(backsig); } } + +#ifdef FAKE_BACKSIGS + /* If there is no backsig, pretend there is a valid one. If there + is a backsig (or an invalid backsig), use it. */ + if(subpk->backsig==0) + subpk->backsig=2; #endif } Modified: trunk/g10/keygen.c =================================================================== --- trunk/g10/keygen.c 2005-10-08 00:17:09 UTC (rev 3907) +++ trunk/g10/keygen.c 2005-10-11 22:13:49 UTC (rev 3908) @@ -712,25 +712,17 @@ } static int -make_backsig(PKT_signature *sig, PKT_public_key *pk, - PKT_public_key *sub_pk, PKT_secret_key *sub_sk) +make_backsig(PKT_signature *sig,PKT_public_key *pk, + PKT_public_key *sub_pk,PKT_secret_key *sub_sk) { PKT_signature *backsig; int rc; -#ifndef DO_BACKSIGS - /* This is not enabled yet, as I want to get a bit closer to RFC day - before enabling this. I've been burned before :) */ + cache_public_key(sub_pk); - return 0; -#endif - - cache_public_key (sub_pk); - - rc=make_keysig_packet(&backsig,pk,NULL,sub_pk,sub_sk, 0x19, 0, 0, 0, 0, - NULL,NULL); - if( rc ) - log_error("make_keysig_packet failed for backsig: %s\n", g10_errstr(rc) ); + rc=make_keysig_packet(&backsig,pk,NULL,sub_pk,sub_sk,0x19,0,0,0,0,NULL,NULL); + if(rc) + log_error("make_keysig_packet failed for backsig: %s\n",g10_errstr(rc)); else { /* get it into a binary packed form. */ Modified: trunk/g10/sig-check.c =================================================================== --- trunk/g10/sig-check.c 2005-10-08 00:17:09 UTC (rev 3907) +++ trunk/g10/sig-check.c 2005-10-11 22:13:49 UTC (rev 3908) @@ -100,8 +100,11 @@ log_info(_("WARNING: signing subkey %s is not" " cross-certified\n"),keystr_from_pk(pk)); else - log_info(_("WARNING: signing subkey %s has an invalid" - " cross-certification\n"),keystr_from_pk(pk)); + { + log_info(_("WARNING: signing subkey %s has an invalid" + " cross-certification\n"),keystr_from_pk(pk)); + rc=G10ERR_GENERAL; + } } } From cvs at cvs.gnupg.org Wed Oct 12 22:44:27 2005 From: cvs at cvs.gnupg.org (svn author dshaw) Date: Wed Oct 12 22:15:04 2005 Subject: [svn] GnuPG - r3909 - trunk/g10 Message-ID: Author: dshaw Date: 2005-10-12 22:44:24 +0200 (Wed, 12 Oct 2005) New Revision: 3909 Modified: trunk/g10/ChangeLog trunk/g10/getkey.c trunk/g10/gpg.c trunk/g10/options.h trunk/g10/sig-check.c Log: * options.h, getkey.c (merge_selfsigs_subkey), gpg.c (main), sig-check.c (signature_check2): Add --require-backsigs and --no-require-backsigs. Currently defaults to --no-require-backsigs. Modified: trunk/g10/ChangeLog =================================================================== --- trunk/g10/ChangeLog 2005-10-11 22:13:49 UTC (rev 3908) +++ trunk/g10/ChangeLog 2005-10-12 20:44:24 UTC (rev 3909) @@ -1,3 +1,10 @@ +2005-10-12 David Shaw + + * options.h, getkey.c (merge_selfsigs_subkey), gpg.c (main), + sig-check.c (signature_check2): Add --require-backsigs and + --no-require-backsigs. Currently defaults to + --no-require-backsigs. + 2005-10-11 David Shaw * getkey.c (merge_selfsigs_subkey), sig-check.c Modified: trunk/g10/getkey.c =================================================================== --- trunk/g10/getkey.c 2005-10-11 22:13:49 UTC (rev 3908) +++ trunk/g10/getkey.c 2005-10-12 20:44:24 UTC (rev 3909) @@ -2082,13 +2082,6 @@ free_seckey_enc(backsig); } } - -#ifdef FAKE_BACKSIGS - /* If there is no backsig, pretend there is a valid one. If there - is a backsig (or an invalid backsig), use it. */ - if(subpk->backsig==0) - subpk->backsig=2; -#endif } Modified: trunk/g10/gpg.c =================================================================== --- trunk/g10/gpg.c 2005-10-11 22:13:49 UTC (rev 3908) +++ trunk/g10/gpg.c 2005-10-12 20:44:24 UTC (rev 3909) @@ -355,6 +355,9 @@ opcscDriver, oDisableCCID, + oRequireBacksigs, + oNoRequireBacksigs, + oNoop }; @@ -695,6 +698,8 @@ the favor. */ { oLocalUser, "sign-with", 2, "@" }, { oRecipient, "user", 2, "@" }, + { oRequireBacksigs, "require-backsigs", 0, "@"}, + { oNoRequireBacksigs, "no-require-backsigs", 0, "@"}, {0,NULL,0,NULL} }; @@ -2586,7 +2591,9 @@ opt.limit_card_insert_tries = pargs.r.ret_int; break; - + case oRequireBacksigs: opt.require_backsigs=1; break; + case oNoRequireBacksigs: opt.require_backsigs=0; break; + case oNoop: break; default : pargs.err = configfp? 1:2; break; Modified: trunk/g10/options.h =================================================================== --- trunk/g10/options.h 2005-10-11 22:13:49 UTC (rev 3908) +++ trunk/g10/options.h 2005-10-12 20:44:24 UTC (rev 3909) @@ -162,6 +162,8 @@ STRLIST sig_policy_url; STRLIST cert_policy_url; STRLIST sig_keyserver_url; + STRLIST cert_subpackets; + STRLIST sig_subpackets; int use_embedded_filename; int allow_non_selfsigned_uid; int allow_freeform_uid; @@ -207,6 +209,11 @@ int disable_ccid; /* Disable the use of the internal CCID driver. */ #endif /*ENABLE_CARD_SUPPORT*/ + /* If set, require an 0x19 backsig to be present on signatures made + by signing subkeys. If not set, a missing backsig is not an + error (but an invalid backsig still is). */ + int require_backsigs; + } opt; /* CTRL is used to keep some global variables we currently can't Modified: trunk/g10/sig-check.c =================================================================== --- trunk/g10/sig-check.c 2005-10-11 22:13:49 UTC (rev 3908) +++ trunk/g10/sig-check.c 2005-10-12 20:44:24 UTC (rev 3909) @@ -96,11 +96,18 @@ signaures issued by it. */ if(rc==0 && !pk->is_primary && pk->backsig<2) { - if(pk->backsig==0) - log_info(_("WARNING: signing subkey %s is not" - " cross-certified\n"),keystr_from_pk(pk)); - else + /* TODO: In a future version, once enough signing subkeys + have backsigs, change this to always give the warning, + and have --require-backsigs enable or disable the + G10ERR_GENERAL. */ + if(pk->backsig==0 && opt.require_backsigs) { + log_info(_("WARNING: signing subkey %s is not" + " cross-certified\n"),keystr_from_pk(pk)); + rc=G10ERR_GENERAL; + } + else if(pk->backsig==1) + { log_info(_("WARNING: signing subkey %s has an invalid" " cross-certification\n"),keystr_from_pk(pk)); rc=G10ERR_GENERAL; From cvs at cvs.gnupg.org Fri Oct 14 06:07:15 2005 From: cvs at cvs.gnupg.org (svn author dshaw) Date: Fri Oct 14 05:37:40 2005 Subject: [svn] GnuPG - r3910 - trunk/g10 Message-ID: Author: dshaw Date: 2005-10-14 06:07:13 +0200 (Fri, 14 Oct 2005) New Revision: 3910 Modified: trunk/g10/ChangeLog trunk/g10/getkey.c trunk/g10/keyedit.c trunk/g10/keygen.c trunk/g10/main.h trunk/g10/misc.c Log: * keyedit.c (keyedit_menu, menu_backsign): New "backsign" command to add 0x19 backsigs to old keys that don't have them. * misc.c (parse_options): Fix build warning. * main.h, keygen.c (make_backsig): Make public. Modified: trunk/g10/ChangeLog =================================================================== --- trunk/g10/ChangeLog 2005-10-12 20:44:24 UTC (rev 3909) +++ trunk/g10/ChangeLog 2005-10-14 04:07:13 UTC (rev 3910) @@ -1,3 +1,12 @@ +2005-10-13 David Shaw + + * keyedit.c (keyedit_menu, menu_backsign): New "backsign" command + to add 0x19 backsigs to old keys that don't have them. + + * misc.c (parse_options): Fix build warning. + + * main.h, keygen.c (make_backsig): Make public. + 2005-10-12 David Shaw * options.h, getkey.c (merge_selfsigs_subkey), gpg.c (main), Modified: trunk/g10/getkey.c =================================================================== --- trunk/g10/getkey.c 2005-10-12 20:44:24 UTC (rev 3909) +++ trunk/g10/getkey.c 2005-10-14 04:07:13 UTC (rev 3910) @@ -2049,6 +2049,8 @@ int seq=0; size_t n; + /* We do this while() since there may be other embedded + signatures in the future. We only want 0x19 here. */ while((p=enum_sig_subpkt(sig->hashed, SIGSUBPKT_SIGNATURE,&n,&seq,NULL))) if(n>3 && ((p[0]==3 && p[2]==0x19) || (p[0]==4 && p[1]==0x19))) @@ -2058,7 +2060,8 @@ { seq=0; /* It is safe to have this in the unhashed area since the - 0x19 is located here for convenience, not security. */ + 0x19 is located on the selfsig for convenience, not + security. */ while((p=enum_sig_subpkt(sig->unhashed,SIGSUBPKT_SIGNATURE, &n,&seq,NULL))) if(n>3 && ((p[0]==3 && p[2]==0x19) || (p[0]==4 && p[1]==0x19))) Modified: trunk/g10/keyedit.c =================================================================== --- trunk/g10/keyedit.c 2005-10-12 20:44:24 UTC (rev 3909) +++ trunk/g10/keyedit.c 2005-10-14 04:07:13 UTC (rev 3910) @@ -63,6 +63,7 @@ static int menu_addrevoker( KBNODE pub_keyblock, KBNODE sec_keyblock, int sensitive ); static int menu_expire( KBNODE pub_keyblock, KBNODE sec_keyblock ); +static int menu_backsign(KBNODE pub_keyblock,KBNODE sec_keyblock); static int menu_set_primary_uid( KBNODE pub_keyblock, KBNODE sec_keyblock ); static int menu_set_preferences( KBNODE pub_keyblock, KBNODE sec_keyblock ); static int menu_set_keyserver_url (const char *url, @@ -1338,8 +1339,8 @@ cmdREVSIG, cmdREVKEY, cmdREVUID, cmdDELSIG, cmdPRIMARY, cmdDEBUG, cmdSAVE, cmdADDUID, cmdADDPHOTO, cmdDELUID, cmdADDKEY, cmdDELKEY, cmdADDREVOKER, cmdTOGGLE, cmdSELKEY, cmdPASSWD, cmdTRUST, cmdPREF, - cmdEXPIRE, cmdENABLEKEY, cmdDISABLEKEY, cmdSHOWPREF, cmdSETPREF, - cmdPREFKS, cmdINVCMD, cmdSHOWPHOTO, cmdUPDTRUST, cmdCHKTRUST, + cmdEXPIRE, cmdBACKSIGN, cmdENABLEKEY, cmdDISABLEKEY, cmdSHOWPREF, + cmdSETPREF, cmdPREFKS, cmdINVCMD, cmdSHOWPHOTO, cmdUPDTRUST, cmdCHKTRUST, cmdADDCARDKEY, cmdKEYTOCARD, cmdBKUPTOCARD, cmdCLEAN, cmdNOP }; @@ -1363,6 +1364,7 @@ { "key" , cmdSELKEY , 0, N_("select subkey N") }, { "check" , cmdCHECK , 0, N_("check signatures") }, { "c" , cmdCHECK , 0, NULL }, + { "backsign", cmdBACKSIGN , KEYEDIT_NOT_SK|KEYEDIT_NEED_SK, NULL }, { "sign" , cmdSIGN , KEYEDIT_NOT_SK|KEYEDIT_TAIL_MATCH, N_("sign selected user IDs [* see below for related commands]") }, { "s" , cmdSIGN , KEYEDIT_NOT_SK, NULL }, @@ -2051,6 +2053,15 @@ } break; + case cmdBACKSIGN: + if(menu_backsign(keyblock,sec_keyblock)) + { + sec_modified = 1; + modified = 1; + redisplay = 1; + } + break; + case cmdPRIMARY: if( menu_set_primary_uid ( keyblock, sec_keyblock ) ) { merge_keys_and_selfsig( keyblock ); @@ -3623,6 +3634,151 @@ } static int +menu_backsign(KBNODE pub_keyblock,KBNODE sec_keyblock) +{ + int rc,modified=0; + PKT_public_key *main_pk; + PKT_secret_key *main_sk,*sub_sk=NULL; + KBNODE node; + + assert(pub_keyblock->pkt->pkttype==PKT_PUBLIC_KEY); + assert(sec_keyblock->pkt->pkttype==PKT_SECRET_KEY); + + merge_keys_and_selfsig(pub_keyblock); + main_pk=pub_keyblock->pkt->pkt.public_key; + main_sk=copy_secret_key(NULL,sec_keyblock->pkt->pkt.secret_key); + keyid_from_pk(main_pk,NULL); + + for(node=pub_keyblock;node;node=node->next) + { + PKT_public_key *sub_pk=NULL; + KBNODE node2,sig_pk=NULL,sig_sk=NULL; + char *passphrase; + + if(sub_sk) + { + free_secret_key(sub_sk); + sub_sk=NULL; + } + + /* Find a signing subkey with no backsig */ + if(node->pkt->pkttype==PKT_PUBLIC_SUBKEY + && (node->pkt->pkt.public_key->pubkey_usage&PUBKEY_USAGE_SIG) + && !node->pkt->pkt.public_key->backsig) + sub_pk=node->pkt->pkt.public_key; + + if(!sub_pk) + continue; + + /* Find the selected selfsig on this subkey */ + for(node2=node->next; + node2 && node2->pkt->pkttype==PKT_SIGNATURE; + node2=node2->next) + if(node2->pkt->pkt.signature->version>=4 + && node2->pkt->pkt.signature->flags.chosen_selfsig) + { + sig_pk=node2; + break; + } + + if(!sig_pk) + continue; + + /* Find the secret subkey that matches the public subkey */ + for(node2=sec_keyblock;node2;node2=node2->next) + if(node2->pkt->pkttype==PKT_SECRET_SUBKEY + && !cmp_public_secret_key(sub_pk,node2->pkt->pkt.secret_key)) + { + sub_sk=copy_secret_key(NULL,node2->pkt->pkt.secret_key); + break; + } + + if(!sub_sk) + continue; + + /* Now finally find the matching selfsig on the secret subkey. + We can't use chosen_selfsig here (it's not set for secret + keys), so we just pick the selfsig with the right class. + This is what menu_expire does as well. */ + for(node2=node2->next; + node2 && node2->pkt->pkttype==PKT_SIGNATURE; + node2=node2->next) + if(node2->pkt->pkt.signature->version>=4 + && node2->pkt->pkt.signature->keyid[0]==sig_pk->pkt->pkt.signature->keyid[0] + && node2->pkt->pkt.signature->keyid[1]==sig_pk->pkt->pkt.signature->keyid[1] + && node2->pkt->pkt.signature->sig_class==sig_pk->pkt->pkt.signature->sig_class) + { + sig_sk=node2; + break; + } + + if(!sig_sk) + continue; + + /* Now we can get to work. We have a main key and secret part, + a signing subkey with signature and secret part with + signature. */ + + passphrase=get_last_passphrase(); + set_next_passphrase(passphrase); + xfree(passphrase); + + rc=make_backsig(sig_pk->pkt->pkt.signature,main_pk,sub_pk,sub_sk); + if(rc==0) + { + PKT_signature *newsig; + PACKET *newpkt; + + passphrase=get_last_passphrase(); + set_next_passphrase(passphrase); + xfree(passphrase); + + rc=update_keysig_packet(&newsig,sig_pk->pkt->pkt.signature,main_pk, + NULL,sub_pk,main_sk,NULL,NULL); + if(rc==0) + { + /* Put the new sig into place on the pubkey */ + newpkt=xmalloc_clear(sizeof(*newpkt)); + newpkt->pkttype=PKT_SIGNATURE; + newpkt->pkt.signature=newsig; + free_packet(sig_pk->pkt); + xfree(sig_pk->pkt); + sig_pk->pkt=newpkt; + + /* Put the new sig into place on the seckey */ + newpkt=xmalloc_clear(sizeof(*newpkt)); + newpkt->pkttype=PKT_SIGNATURE; + newpkt->pkt.signature=copy_signature(NULL,newsig); + free_packet(sig_sk->pkt); + xfree(sig_sk->pkt); + sig_sk->pkt=newpkt; + + modified=1; + } + else + { + log_error("update_keysig_packet failed: %s\n",g10_errstr(rc)); + break; + } + } + else + { + log_error("make_backsig failed: %s\n",g10_errstr(rc)); + break; + } + } + + set_next_passphrase(NULL); + + free_secret_key(main_sk); + if(sub_sk) + free_secret_key(sub_sk); + + return modified; +} + + +static int change_primary_uid_cb ( PKT_signature *sig, void *opaque ) { byte buf[1]; Modified: trunk/g10/keygen.c =================================================================== --- trunk/g10/keygen.c 2005-10-12 20:44:24 UTC (rev 3909) +++ trunk/g10/keygen.c 2005-10-14 04:07:13 UTC (rev 3910) @@ -711,7 +711,7 @@ return 0; } -static int +int make_backsig(PKT_signature *sig,PKT_public_key *pk, PKT_public_key *sub_pk,PKT_secret_key *sub_sk) { Modified: trunk/g10/main.h =================================================================== --- trunk/g10/main.h 2005-10-12 20:44:24 UTC (rev 3909) +++ trunk/g10/main.h 2005-10-14 04:07:13 UTC (rev 3910) @@ -182,6 +182,8 @@ int keygen_upd_std_prefs( PKT_signature *sig, void *opaque ); int keygen_add_keyserver_url(PKT_signature *sig, void *opaque); int keygen_add_revkey(PKT_signature *sig, void *opaque); +int make_backsig(PKT_signature *sig,PKT_public_key *pk, + PKT_public_key *sub_pk,PKT_secret_key *sub_sk); int generate_subkeypair( KBNODE pub_keyblock, KBNODE sec_keyblock ); #ifdef ENABLE_CARD_SUPPORT int generate_card_subkeypair (KBNODE pub_keyblock, KBNODE sec_keyblock, Modified: trunk/g10/misc.c =================================================================== --- trunk/g10/misc.c 2005-10-12 20:44:24 UTC (rev 3909) +++ trunk/g10/misc.c 2005-10-14 04:07:13 UTC (rev 3910) @@ -979,7 +979,7 @@ for(i=0;opts[i].name;i++) if(opts[i].help) printf("%s%*s%s\n",opts[i].name, - maxlen+2-strlen(opts[i].name),"",_(opts[i].help)); + maxlen+2-(int)strlen(opts[i].name),"",_(opts[i].help)); g10_exit(0); } From cvs at cvs.gnupg.org Fri Oct 14 17:38:07 2005 From: cvs at cvs.gnupg.org (svn author dshaw) Date: Fri Oct 14 17:08:33 2005 Subject: [svn] GnuPG - r3911 - trunk Message-ID: Author: dshaw Date: 2005-10-14 17:38:05 +0200 (Fri, 14 Oct 2005) New Revision: 3911 Modified: trunk/ChangeLog trunk/NEWS trunk/configure.ac Log: * NEWS: Clarify the cURL keyserver changes, and add a note about gpg-zip. * configure.ac: Remove the backsig configure options since this is all done at runtime now. Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2005-10-14 04:07:13 UTC (rev 3910) +++ trunk/ChangeLog 2005-10-14 15:38:05 UTC (rev 3911) @@ -1,3 +1,11 @@ +2005-10-14 David Shaw + + * NEWS: Clarify the cURL keyserver changes, and add a note about + gpg-zip. + + * configure.ac: Remove the backsig configure options since this is + all done at runtime now. + 2005-10-11 David Shaw * configure.ac: Did some backsig testing with the PGP folks. All Modified: trunk/NEWS =================================================================== --- trunk/NEWS 2005-10-14 04:07:13 UTC (rev 3910) +++ trunk/NEWS 2005-10-14 15:38:05 UTC (rev 3911) @@ -2,13 +2,14 @@ ------------------------------------------------ * If available, cURL-based keyserver helpers are built that can - retrieve keys using any protocol that cURL supports. This - includes HKP as well as all protocols that cURL can handle + retrieve keys using HKP or any protocol that cURL supports (HTTP, HTTPS, FTP, FTPS, etc). If cURL is not available, HKP - and HTTP are still supported using the included code. To force - building the old keyserver helpers, use the configure option - --enable-old-keyserver-helpers. Note that none of this affects - finger or LDAP support, which are unchanged. + and HTTP are still supported using a built-in cURL emulator. To + force building the old pre-cURL keyserver helpers, use the + configure option --enable-old-keyserver-helpers. Note that none + of this affects finger or LDAP support, which are unchanged. + Note also that a future version of GnuPG will remove the old + keyserver helpers altogether. * Implemented Public Key Association (PKA) trust model option. This is an optional trust model on top of the standard ones. It @@ -16,7 +17,10 @@ associate a mail address with an OpenPGP key. See: XXXX for a description. + * Added "gpg-zip", a program to create encrypted archives that can + interoperate with PGP Zip. + Noteworthy changes in version 1.4.2 (2005-07-26) ------------------------------------------------ Modified: trunk/configure.ac =================================================================== --- trunk/configure.ac 2005-10-14 04:07:13 UTC (rev 3910) +++ trunk/configure.ac 2005-10-14 15:38:05 UTC (rev 3911) @@ -129,13 +129,6 @@ gnupg_use_iconv=$enableval, gnupg_use_iconv=yes) AC_MSG_RESULT($gnupg_use_iconv) -AC_MSG_CHECKING([whether to require signing subkeys to have back signatures]) -AC_ARG_ENABLE(backsigs, - AC_HELP_STRING([--enable-backsigs], - [require signing subkeys to have back signatures]), - do_backsigs=$enableval, do_backsigs=no) -AC_MSG_RESULT($do_backsigs) - dnl See if we are disabling any algorithms or features for a smaller dnl binary @@ -757,10 +750,6 @@ AC_DEFINE(USE_GNUPG_ICONV,1,[Define to use the new iconv based code]) fi -if test "$do_backsigs" = no ; then - AC_DEFINE(FAKE_BACKSIGS,1,[Define to fake missing backsigs]) -fi - AM_CONDITIONAL(ENABLE_CARD_SUPPORT, test "$card_support" = yes) AM_CONDITIONAL(ENABLE_AGENT_SUPPORT, test "$agent_support" = yes) From cvs at cvs.gnupg.org Sun Oct 16 10:12:20 2005 From: cvs at cvs.gnupg.org (svn author mo) Date: Sun Oct 16 09:42:32 2005 Subject: [svn] gcry - r1127 - trunk/src Message-ID: Author: mo Date: 2005-10-16 10:12:19 +0200 (Sun, 16 Oct 2005) New Revision: 1127 Modified: trunk/src/ChangeLog trunk/src/g10lib.h Log: src/ChangeLog: 2005-10-16 Moritz Schulte * g10lib.h: Removed G10_I18N_H related check; it seems to be a GnuPG relict (Libgcrypt does not define this symbol anywhere). (FLAG_MODULE_DISABLED): Don't forget parantheses around shifted value. Modified: trunk/src/ChangeLog =================================================================== --- trunk/src/ChangeLog 2005-10-09 14:53:37 UTC (rev 1126) +++ trunk/src/ChangeLog 2005-10-16 08:12:19 UTC (rev 1127) @@ -1,3 +1,10 @@ +2005-10-16 Moritz Schulte + + * g10lib.h: Removed G10_I18N_H related check; it seems to be a + GnuPG relict (Libgcrypt does not define this symbol anywhere). + (FLAG_MODULE_DISABLED): Don't forget parantheses around shifted + value. + 2005-10-09 Moritz Schulte * global.c (gcry_control): Call global_init() after passing thread Modified: trunk/src/g10lib.h =================================================================== --- trunk/src/g10lib.h 2005-10-09 14:53:37 UTC (rev 1126) +++ trunk/src/g10lib.h 2005-10-16 08:12:19 UTC (rev 1127) @@ -1,5 +1,6 @@ /* g10lib.h - internal defintions for libgcrypt - * Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. + * Copyright (C) 1998, 1999, 2000, 2001, 2002, + * 2003, 2005 Free Software Foundation, Inc. * * This header is to be used inside of libgcrypt in place of gcrypt.h. * This way we can better distinguish between internal and external @@ -36,6 +37,10 @@ #include #include "types.h" + + +/* Attribute handling macros. */ + #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 5 ) #define JNLIB_GCC_M_FUNCTION 1 #define JNLIB_GCC_A_NR __attribute__ ((noreturn)) @@ -63,18 +68,18 @@ #define GCC_ATTR_MALLOC #endif -#ifdef G10_I18N_H -#error i18n should not be included here -#endif +/* Gettext macros. */ #define _(a) _gcry_gettext(a) #define N_(a) (a) -void _gcry_check_heap( const void *a ); + -int _gcry_get_debug_flag( unsigned int mask ); +void _gcry_check_heap (const void *a); +int _gcry_get_debug_flag (unsigned int mask); + /*-- gcrypt/misc.c --*/ #ifdef JNLIB_GCC_M_FUNCTION @@ -116,6 +121,7 @@ /*-- cipher/pubkey.c --*/ +/* FIXME: shouldn't this go into mpi.h? */ #ifndef mpi_powm #define mpi_powm(w,b,e,m) gcry_mpi_powm( (w), (b), (e), (m) ) #endif @@ -205,7 +211,7 @@ }; /* Flags for the `flags' member of gcry_module_t. */ -#define FLAG_MODULE_DISABLED 1 << 0 +#define FLAG_MODULE_DISABLED (1 << 0) gcry_err_code_t _gcry_module_add (gcry_module_t *entries, unsigned int id, From cvs at cvs.gnupg.org Sun Oct 16 10:45:41 2005 From: cvs at cvs.gnupg.org (svn author mo) Date: Sun Oct 16 10:16:05 2005 Subject: [svn] gcry - r1128 - trunk/src Message-ID: Author: mo Date: 2005-10-16 10:45:41 +0200 (Sun, 16 Oct 2005) New Revision: 1128 Modified: trunk/src/g10lib.h trunk/src/secmem.h trunk/src/stdmem.h Log: 2005-10-16 Moritz Schulte * g10lib.h: Removed GCC_ATTR_PURE macro definitions, since gcrypt.h does already contain such a macro named _GCRY_GCC_ATTR_PURE, which we can use here as well. Likewise for GCC_ATTR_MALLOC and _GCRY_GCC_ATTR_MALLOC. * stdmem.h: Use _GCRY_GCC_ATTR_MALLOC instead of GCC_ATTR_MALLOC. * secmem.h: Likewise. Modified: trunk/src/g10lib.h =================================================================== --- trunk/src/g10lib.h 2005-10-16 08:12:19 UTC (rev 1127) +++ trunk/src/g10lib.h 2005-10-16 08:45:41 UTC (rev 1128) @@ -55,19 +55,6 @@ #define GCC_ATTR_NORETURN #endif -#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96 ) -#define GCC_ATTR_PURE __attribute__ ((__pure__)) -#else -#define GCC_ATTR_PURE -#endif - -/* (The malloc attribute might be defined prior to 3.2 - I am just not sure) */ -#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2 ) -#define GCC_ATTR_MALLOC __attribute__ ((__malloc__)) -#else -#define GCC_ATTR_MALLOC -#endif - /* Gettext macros. */ #define _(a) _gcry_gettext(a) @@ -142,7 +129,7 @@ char *stpcpy (char *a, const char *b); #endif #ifndef HAVE_STRCASECMP -int strcasecmp (const char *a, const char *b) GCC_ATTR_PURE; +int strcasecmp (const char *a, const char *b) _GCRY_GCC_ATTR_PURE; #endif /* macros used to rename missing functions */ @@ -204,7 +191,8 @@ { struct gcry_module *next; /* List pointers. */ struct gcry_module **prevp; - void *spec; /* The acctual specs. */ + void *spec; /* Pointer to the subsystem-specific + specification structure. */ int flags; /* Associated flags. */ int counter; /* Use counter. */ unsigned int mod_id; /* ID of this module. */ Modified: trunk/src/secmem.h =================================================================== --- trunk/src/secmem.h 2005-10-16 08:12:19 UTC (rev 1127) +++ trunk/src/secmem.h 2005-10-16 08:45:41 UTC (rev 1128) @@ -23,7 +23,7 @@ void _gcry_secmem_init (size_t npool); void _gcry_secmem_term (void); -void *_gcry_secmem_malloc (size_t size) GCC_ATTR_MALLOC; +void *_gcry_secmem_malloc (size_t size) _GCRY_GCC_ATTR_MALLOC; void *_gcry_secmem_realloc (void *a, size_t newsize); void _gcry_secmem_free (void *a); void _gcry_secmem_dump_stats (void); Modified: trunk/src/stdmem.h =================================================================== --- trunk/src/stdmem.h 2005-10-16 08:12:19 UTC (rev 1127) +++ trunk/src/stdmem.h 2005-10-16 08:45:41 UTC (rev 1128) @@ -1,5 +1,5 @@ /* stdmem.h - internal definitions for stdmem - * Copyright (C) 2000, 2002 Free Software Foundation, Inc. + * Copyright (C) 2000, 2002, 2005 Free Software Foundation, Inc. * * This file is part of Libgcrypt. * @@ -23,8 +23,8 @@ void _gcry_private_enable_m_guard(void); -void *_gcry_private_malloc (size_t n) GCC_ATTR_MALLOC; -void *_gcry_private_malloc_secure (size_t n) GCC_ATTR_MALLOC; +void *_gcry_private_malloc (size_t n) _GCRY_GCC_ATTR_MALLOC; +void *_gcry_private_malloc_secure (size_t n) _GCRY_GCC_ATTR_MALLOC; void *_gcry_private_realloc (void *a, size_t n); void _gcry_private_check_heap (const void *a); void _gcry_private_free (void *a); From cvs at cvs.gnupg.org Sun Oct 16 10:46:06 2005 From: cvs at cvs.gnupg.org (svn author mo) Date: Sun Oct 16 10:16:19 2005 Subject: [svn] gcry - r1129 - trunk/src Message-ID: Author: mo Date: 2005-10-16 10:46:06 +0200 (Sun, 16 Oct 2005) New Revision: 1129 Modified: trunk/src/ChangeLog trunk/src/stdmem.c Log: 2005-10-16 Moritz Schulte * stdmem.c: Inserted description of the layered memory management in Libgcrypt. Modified: trunk/src/ChangeLog =================================================================== --- trunk/src/ChangeLog 2005-10-16 08:45:41 UTC (rev 1128) +++ trunk/src/ChangeLog 2005-10-16 08:46:06 UTC (rev 1129) @@ -1,10 +1,22 @@ 2005-10-16 Moritz Schulte + * stdmem.c: Inserted description of the layered memory management + in Libgcrypt. + * g10lib.h: Removed G10_I18N_H related check; it seems to be a GnuPG relict (Libgcrypt does not define this symbol anywhere). (FLAG_MODULE_DISABLED): Don't forget parantheses around shifted value. + + Removed GCC_ATTR_PURE macro definitions, since gcrypt.h does + already contain such a macro named _GCRY_GCC_ATTR_PURE, which we + can use here as well. + Likewise for GCC_ATTR_MALLOC and _GCRY_GCC_ATTR_MALLOC. + + * stdmem.h: Use _GCRY_GCC_ATTR_MALLOC instead of GCC_ATTR_MALLOC. + * secmem.h: Likewise. + 2005-10-09 Moritz Schulte * global.c (gcry_control): Call global_init() after passing thread Modified: trunk/src/stdmem.c =================================================================== --- trunk/src/stdmem.c 2005-10-16 08:45:41 UTC (rev 1128) +++ trunk/src/stdmem.c 2005-10-16 08:46:06 UTC (rev 1129) @@ -1,5 +1,5 @@ /* stdmem.c - private memory allocator - * Copyright (C) 1998, 2000, 2002 Free Software Foundation, Inc. + * Copyright (C) 1998, 2000, 2002, 2005 Free Software Foundation, Inc. * * This file is part of Libgcrypt. * @@ -18,6 +18,33 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ +/* + * Description of the layered memory management in Libgcrypt: + * + * [User] + * | + * | + * \ / + * global.c: [MM entrance points] -----> [user callbacks] + * | | + * | | + * \ / \ / + * + * stdmem.c: [non-secure handlers] [secure handlers] + * + * | | + * | | + * \ / \ / + * + * stdmem.c: [ memory guard ] + * + * | | + * | | + * \ / \ / + * + * libc: [ MM functions ] secmem.c: [ secure MM functions] + */ + #include #include #include @@ -28,6 +55,7 @@ #include "stdmem.h" #include "secmem.h" + #define MAGIC_NOR_BYTE 0x55 #define MAGIC_SEC_BYTE 0xcc From cvs at cvs.gnupg.org Sun Oct 16 11:02:41 2005 From: cvs at cvs.gnupg.org (svn author mo) Date: Sun Oct 16 10:32:54 2005 Subject: [svn] gcry - r1130 - trunk/src Message-ID: Author: mo Date: 2005-10-16 11:02:41 +0200 (Sun, 16 Oct 2005) New Revision: 1130 Modified: trunk/src/ChangeLog trunk/src/global.c Log: 2005-10-16 Moritz Schulte * global.c (global_init): Use gcry_error_t instead of gcry_err_code_t; use goto instead of if constructs. Modified: trunk/src/ChangeLog =================================================================== --- trunk/src/ChangeLog 2005-10-16 08:46:06 UTC (rev 1129) +++ trunk/src/ChangeLog 2005-10-16 09:02:41 UTC (rev 1130) @@ -1,5 +1,8 @@ 2005-10-16 Moritz Schulte + * global.c (global_init): Use gcry_error_t instead of + gcry_err_code_t; use goto instead of if constructs. + * stdmem.c: Inserted description of the layered memory management in Libgcrypt. Modified: trunk/src/global.c =================================================================== --- trunk/src/global.c 2005-10-16 08:46:06 UTC (rev 1129) +++ trunk/src/global.c 2005-10-16 09:02:41 UTC (rev 1130) @@ -58,27 +58,36 @@ static void global_init (void) { - gcry_err_code_t err = GPG_ERR_NO_ERROR; + gcry_error_t err = 0; if (any_init_done) return; any_init_done = 1; err = ath_init (); - if (! err) - err = _gcry_cipher_init (); - if (! err) - err = _gcry_md_init (); - if (! err) - err = _gcry_pk_init (); + if (err) + goto fail; + err = _gcry_cipher_init (); + if (err) + goto fail; + err = _gcry_md_init (); + if (err) + goto fail; + err = _gcry_pk_init (); + if (err) + goto fail; #if 0 - if (! err) - err = _gcry_ac_init (); + /* FIXME? */ + err = _gcry_ac_init (); + if (err) + goto fail; #endif - if (err) - /* FIXME? */ - BUG (); + return; + + fail: + /* FIXME: use `err'? */ + BUG (); } From cvs at cvs.gnupg.org Sun Oct 16 14:12:41 2005 From: cvs at cvs.gnupg.org (svn author mo) Date: Sun Oct 16 13:42:52 2005 Subject: [svn] gcry - r1131 - trunk/doc Message-ID: Author: mo Date: 2005-10-16 14:12:40 +0200 (Sun, 16 Oct 2005) New Revision: 1131 Modified: trunk/doc/ChangeLog trunk/doc/gcrypt.texi Log: doc/ChangeLog: 2005-10-16 Moritz Schulte * gcrypt.texi (Controlling the library): Start documenting the existing control commands. Modified: trunk/doc/ChangeLog =================================================================== --- trunk/doc/ChangeLog 2005-10-16 09:02:41 UTC (rev 1130) +++ trunk/doc/ChangeLog 2005-10-16 12:12:40 UTC (rev 1131) @@ -1,3 +1,8 @@ +2005-10-16 Moritz Schulte + + * gcrypt.texi (Controlling the library): Start documenting the + existing control commands. + 2005-04-11 Moritz Schulte * gcrypt.texi (Available hash algorithms): Add entry for Whirlpool. Modified: trunk/doc/gcrypt.texi =================================================================== --- trunk/doc/gcrypt.texi 2005-10-16 09:02:41 UTC (rev 1130) +++ trunk/doc/gcrypt.texi 2005-10-16 12:12:40 UTC (rev 1131) @@ -490,6 +490,39 @@ @acronym{Libgcrypt} in several ways. Depending on @var{cmd}, more arguments can or have to be provided. +@table @code +@item GCRYCTL_ENABLE_M_GUARD; Arguments: none +This command enables the built-in memory guard. It must not be used to +activate the memory guard after the memory management has already been +used; therefore it can ONLY be used at initializatoin time. Note that +the memory guard is NOT used when the user of the library has set his +own memory management callbacks. + +@item GCRYCTL_ENABLE_QUICK_RANDOM +@item GCRYCTL_DUMP_RANDOM_STATS +@item GCRYCTL_DUMP_MEMORY_STATS +@item GCRYCTL_DUMP_SECMEM_STATS +@item GCRYCTL_DROP_PRIVS +@item GCRYCTL_DISABLE_SECMEM +@item GCRYCTL_INIT_SECMEM +@item GCRYCTL_TERM_SECMEM +@item GCRYCTL_DISABLE_SECMEM_WARN +@item GCRYCTL_SUSPEND_SECMEM_WARN +@item GCRYCTL_RESUME_SECMEM_WARN +@item GCRYCTL_USE_SECURE_RNDPOOL +@item GCRYCTL_SET_RANDOM_SEED_FILE +@item GCRYCTL_UPDATE_RANDOM_SEED_FILE +@item GCRYCTL_SET_VERBOSITY +@item GCRYCTL_SET_DEBUG_FLAGS +@item GCRYCTL_CLEAR_DEBUG_FLAGS +@item GCRYCTL_DISABLE_INTERNAL_LOCKING +@item GCRYCTL_ANY_INITIALIZATION_P +@item GCRYCTL_INITIALIZATION_FINISHED_P +@item GCRYCTL_INITIALIZATION_FINISHED +@item GCRYCTL_SET_THREAD_CBS +@item GCRYCTL_FAST_POOL +@end table + @end deftypefun @node Modules From cvs at cvs.gnupg.org Sun Oct 16 21:38:38 2005 From: cvs at cvs.gnupg.org (svn author marcus) Date: Sun Oct 16 21:08:46 2005 Subject: [svn] gpgme - r1127 - trunk/gpgme Message-ID: Author: marcus Date: 2005-10-16 21:38:32 +0200 (Sun, 16 Oct 2005) New Revision: 1127 Modified: trunk/gpgme/ChangeLog trunk/gpgme/rungpg.c Log: 2005-10-16 Marcus Brinkmann * rungpg.c (gpg_edit): Don't add a key argument if in card edit mode. Modified: trunk/gpgme/ChangeLog =================================================================== --- trunk/gpgme/ChangeLog 2005-10-07 13:34:22 UTC (rev 1126) +++ trunk/gpgme/ChangeLog 2005-10-16 19:38:32 UTC (rev 1127) @@ -1,3 +1,8 @@ +2005-10-16 Marcus Brinkmann + + * rungpg.c (gpg_edit): Don't add a key argument if in card edit + mode. + 2005-10-06 Marcus Brinkmann * Makefile.am (gpgme.dll gpgme.dll.a): Use $(srcdir) for Modified: trunk/gpgme/rungpg.c =================================================================== --- trunk/gpgme/rungpg.c 2005-10-07 13:34:22 UTC (rev 1126) +++ trunk/gpgme/rungpg.c 2005-10-16 19:38:32 UTC (rev 1127) @@ -1356,7 +1356,7 @@ err = add_data (gpg, out, 1, 1); if (!err) err = add_arg (gpg, "--"); - if (!err) + if (!err && type == 0) { const char *s = key->subkeys ? key->subkeys->fpr : NULL; if (!s) From cvs at cvs.gnupg.org Mon Oct 17 19:21:22 2005 From: cvs at cvs.gnupg.org (svn author wk) Date: Mon Oct 17 18:51:25 2005 Subject: [svn] GnuPG - r3912 - in trunk: . doc g10 Message-ID: Author: wk Date: 2005-10-17 19:21:15 +0200 (Mon, 17 Oct 2005) New Revision: 3912 Modified: trunk/NEWS trunk/THANKS trunk/doc/ChangeLog trunk/doc/gpg.texi trunk/doc/gpgv.sgml trunk/doc/gpgv.texi trunk/g10/ChangeLog trunk/g10/export.c Log: exported subkeys are now merged into one output keyblock Modified: trunk/NEWS =================================================================== --- trunk/NEWS 2005-10-14 15:38:05 UTC (rev 3911) +++ trunk/NEWS 2005-10-17 17:21:15 UTC (rev 3912) @@ -17,6 +17,9 @@ associate a mail address with an OpenPGP key. See: XXXX for a description. + * When exporting subkeys, those specified with a key ID or + fingerpint and the '!' suffix are now merged into one keyblock. + * Added "gpg-zip", a program to create encrypted archives that can interoperate with PGP Zip. Modified: trunk/THANKS =================================================================== --- trunk/THANKS 2005-10-14 15:38:05 UTC (rev 3911) +++ trunk/THANKS 2005-10-17 17:21:15 UTC (rev 3912) @@ -145,6 +145,7 @@ Michael Sobolev mss@despair.transas.com Michael Tokarev mjt@tls.msk.ru Nicolas Graner Nicolas.Graner@cri.u-psud.fr +Mike Dowling ML.Dowling at tu-bs.de Mike McEwan mike@lotusland.demon.co.uk Neal H Walfield neal@cs.uml.edu Nelson H. F. Beebe beebe@math.utah.edu Modified: trunk/doc/ChangeLog =================================================================== --- trunk/doc/ChangeLog 2005-10-14 15:38:05 UTC (rev 3911) +++ trunk/doc/ChangeLog 2005-10-17 17:21:15 UTC (rev 3912) @@ -1,3 +1,7 @@ +2005-10-07 Werner Koch + + * gpgv.sgml: Small spelling corrections by Mike Dowling. + 2005-09-21 David Shaw * gpg.sgml: Note that --display-charset is just for display and Modified: trunk/doc/gpg.texi =================================================================== --- trunk/doc/gpg.texi 2005-10-14 15:38:05 UTC (rev 3911) +++ trunk/doc/gpg.texi 2005-10-17 17:21:15 UTC (rev 3912) @@ -322,22 +322,16 @@ are not already included in the preference list. @item setpref @code{string} -Set the list of user ID preferences to @code{string}, this should be a -string similar to the one printed by "pref". Using an empty string -will set the default preference string, using "none" will remove the -preferences. Use "gpg --version" to get a list of available -algorithms. This command just initializes an internal list and does -not change anything unless another command (such as "updpref") which -changes the self-signatures is used. +Set the list of user ID preferences to @code{string} for all (or just +the selected) user IDs. Calling setpref with no arguments sets the +preference list to the default (either built-in or set via +--default-preference-list), and calling setpref with "none" as the +argument sets an empty preference list. Use "gpg --version" to get a +list of available algorithms. Note that while you can change the +preferences on an attribute user ID (aka "photo ID"), GnuPG does not +select keys via attribute user IDs so these preferences will not be +used by GnuPG. -@item updpref -Change the preferences of all user IDs (or just of the selected ones -to the current list of preferences. The timestamp of all affected -self-signatures will be advanced by one second. Note that while you -can change the preferences on an attribute user ID (aka "photo ID"), -GnuPG does not select keys via attribute user IDs so these preferences -will not be used by GnuPG. - @item keyserver Set a preferred keyserver for the specified user ID(s). This allows other users to know where you prefer they get your key from. See @@ -506,6 +500,10 @@ Search the keyserver for the given names. Multiple names given here will be joined together to create the search string for the keyserver. Option --keyserver must be used to give the name of this keyserver. +Keyservers that support different search methods allow using the +syntax specified in "How to specify a user ID" below. Note that +different keyserver types support different search methods. Currently +only LDAP supports them all. @item --update-trustdb Do trust database maintenance. This command iterates over all keys @@ -935,6 +933,9 @@ After import, compact (remove all signatures from) any user IDs from the new key that are not usable. This is the same as running the --edit-key command "clean uids" after import. Defaults to no. + +@item import-clean +Identical to "import-clean-sigs import-clean-uids". @end table @item --export-options @code{parameters} @@ -975,8 +976,8 @@ @item export-reset-subkey-passwd When using the "--export-secret-subkeys" command, this option resets the passphrases for all exported subkeys to empty. This is useful -when the exported subkey is to be used on an unattended amchine where -a passphrase won't make sense. Defaults to no. +when the exported subkey is to be used on an unattended machine where +a passphrase doesn't necessarily make sense. Defaults to no. @end table @item --list-options @code{parameters} @@ -1160,10 +1161,12 @@ @item --display-charset @code{name} Set the name of the native character set. This is used to convert -some informational strings like user IDs to the proper UTF-8 -encoding. If this option is not used, the default character set is -determined from the current locale. A verbosity level of 3 shows the -chosen set. Valid values for @code{name} are: +some informational strings like user IDs to the proper UTF-8 encoding. +Note that this has nothing to do with the character set of data to be +encrypted or signed; GnuPG does not recode user supplied data. If +this option is not used, the default character set is determined from +the current locale. A verbosity level of 3 shows the chosen set. +Valid values for @code{name} are: @table @asis @@ -1231,15 +1234,27 @@ Write special status strings to the file descriptor @code{n}. See the file DETAILS in the documentation for a listing of them. +@item --status-file @code{file} +Same as --status-fd, except the status data is written to file +@code{file}. + @item --logger-fd @code{n} Write log output to file descriptor @code{n} and not to stderr. +@item --logger-file @code{file} +Same as --logger-fd, except the logger data is written to file +@code{file}. + @item --attribute-fd @code{n} Write attribute subpackets to the file descriptor @code{n}. This is most useful for use with --status-fd, since the status messages are needed to separate out the various subpackets from the stream delivered to the file descriptor. +@item --attribute-file @code{file} +Same as --attribute-fd, except the attribute data is written to file +@code{file}. + @item --comment @code{string} @itemx --no-comments Use @code{string} as a comment string in clear text signatures and @@ -1475,6 +1490,17 @@ can only be used if only one passphrase is supplied. Don't use this option if you can avoid it. +@item --passphrase-file @code{file} +Read the passphrase from file @code{file}. This can only be used if +only one passphrase is supplied. Obviously, a passphrase stored in a +file is of questionable security. Don't use this option if you can +avoid it. + +@item --passphrase @code{string} +Use @code{string} as the passphrase. This can only be used if only one +passphrase is supplied. Obviously, this is of very questionable +security. Don't use this option if you can avoid it. + @item --command-fd @code{n} This is a replacement for the deprecated shared-memory IPC mode. If this option is enabled, user input on questions is not expected @@ -1482,6 +1508,10 @@ together with --status-fd. See the file doc/DETAILS in the source distribution for details on how to use it. +@item --command-file @code{file} +Same as --command-fd, except the commands are read out of file +@code{file} + @item --use-agent @itemx --no-use-agent Try to use the GnuPG-Agent. Please note that this agent is still under @@ -1871,10 +1901,9 @@ used when there are no recipient keys to consider (e.g. --symmetric). @item --default-preference-list @code{string} -Set the list of default preferences to @code{string}, this list should -be a string similar to the one printed by the command "pref" in the -edit menu. This affects both key generation and "updpref" in the edit -menu. +Set the list of default preferences to @code{string}. This preference +list is used for new keys and becomes the default for "setpref" in the +edit menu. @item --list-config Display various internal configuration parameters of GnuPG. This @@ -1921,10 +1950,9 @@ Using the email address part which must match exactly. The left angle bracket indicates this email address mode. -@item +Heinrich Heine duesseldorf -All words must match exactly (not case sensitive) but can appear in -any order in the user ID. Words are any sequences of letters, -digits, the underscore and all characters with bit 7 set. +@item @@heinrichh +Match within the part of a user ID. The at sign +indicates this email address mode. @item Heine @itemx *Heine Modified: trunk/doc/gpgv.sgml =================================================================== --- trunk/doc/gpgv.sgml 2005-10-14 15:38:05 UTC (rev 3911) +++ trunk/doc/gpgv.sgml 2005-10-17 17:21:15 UTC (rev 3912) @@ -70,16 +70,16 @@ -This program is a stripped down version of - -v, --verbose -Give more information during processing. If used +Gives more information during processing. If used twice, the input data is listed in detail. @@ -127,8 +127,8 @@ --homedir &ParmDir; Set the name of the home directory to &ParmDir; If this -option is not used it defaults to "~/.gnupg". It does -not make sense to use this in a options file. This +option is not used, it defaults to "~/.gnupg". It does +not make sense to use this in an options file. This also overrides the environment variable "GNUPGHOME". @@ -154,7 +154,7 @@ GnuPG normally checks that the timestamps associated with keys and signatures have plausible values. However, sometimes a signature seems to be older than the key due to clock problems. This option makes these -checks just a warning. +checks just warnings. Modified: trunk/doc/gpgv.texi =================================================================== --- trunk/doc/gpgv.texi 2005-10-14 15:38:05 UTC (rev 3911) +++ trunk/doc/gpgv.texi 2005-10-17 17:21:15 UTC (rev 3912) @@ -22,15 +22,15 @@ @code{gpgv} is the OpenPGP signature checking tool. -This program is a stripped down version of @code{gpg} which is only -able -to check signatures. It is somewhat smaller than the full blown -@code{gpg} and uses a different (and more simple way) to check that -the public keys used to made the signature are trustworth. There is +This program is a stripped down version of @code{gpg} which is able +only +to check signatures. It is somewhat smaller than the fully blown +@code{gpg} and uses a different (and simpler) way to check that +the public keys used to make the signature are trustworthy. There are no options files and only very few options are implemented. -@code{gpgv} assumes that all keys in the keyring are trustworty. -It uses by default a keyring named @file{trustedkeys.gpg} which is +@code{gpgv} assumes that all keys in the keyring are trustworthy. +By default it uses a keyring named @file{trustedkeys.gpg} which is assumed to be in the home directory as defined by GnuPG or set by an option or an environment variable. An option may be used to specify another keyring or even multiple keyrings. @@ -41,7 +41,7 @@ @table @asis @item -v, --verbose -Give more information during processing. If used +Gives more information during processing. If used twice, the input data is listed in detail. @item -q, --quiet @@ -59,8 +59,8 @@ @item --homedir @code{directory} Set the name of the home directory to @code{directory} If this -option is not used it defaults to "~/.gnupg". It does -not make sense to use this in a options file. This +option is not used, it defaults to "~/.gnupg". It does +not make sense to use this in an options file. This also overrides the environment variable "GNUPGHOME". @item --status-fd @code{n} @@ -74,7 +74,7 @@ GnuPG normally checks that the timestamps associated with keys and signatures have plausible values. However, sometimes a signature seems to be older than the key due to clock problems. This option makes these -checks just a warning. +checks just warnings. @end table @chapheading RETURN VALUE Modified: trunk/g10/ChangeLog =================================================================== --- trunk/g10/ChangeLog 2005-10-14 15:38:05 UTC (rev 3911) +++ trunk/g10/ChangeLog 2005-10-17 17:21:15 UTC (rev 3912) @@ -1,3 +1,12 @@ +2005-10-17 Werner Koch + + * export.c (do_export_stream): Factored some code out to ... + (skip_subkey_p): .. new. + (subkey_in_list_p, release_subkey_list): New. + (new_subkey_list_item): New. + (do_export_stream): Export exactly specified subkeys into one + keyblock. + 2005-10-13 David Shaw * keyedit.c (keyedit_menu, menu_backsign): New "backsign" command Modified: trunk/g10/export.c =================================================================== --- trunk/g10/export.c 2005-10-14 15:38:05 UTC (rev 3911) +++ trunk/g10/export.c 2005-10-17 17:21:15 UTC (rev 3912) @@ -37,6 +37,17 @@ #include "i18n.h" #include "trustdb.h" + +/* An object to keep track of subkeys. */ +struct subkey_list_s +{ + struct subkey_list_s *next; + u32 kid[2]; +}; +typedef struct subkey_list_s *subkey_list_t; + + + static int do_export( STRLIST users, int secret, unsigned int options ); static int do_export_stream( IOBUF out, STRLIST users, int secret, KBNODE *keyblock_out, unsigned int options, @@ -77,6 +88,7 @@ return parse_options(str,options,export_opts,noisy); } + /**************** * Export the public keys (to standard out or --output). * Depending on opt.armor the output is armored. @@ -147,6 +159,124 @@ } + +/* Release an entire subkey list. */ +static void +release_subkey_list (subkey_list_t list) +{ + while (list) + { + subkey_list_t tmp = list->next;; + xfree (list); + list = tmp; + } +} + + +/* Returns true if NODE is a subkey and contained in LIST. */ +static int +subkey_in_list_p (subkey_list_t list, KBNODE node) +{ + if (node->pkt->pkttype == PKT_PUBLIC_SUBKEY + || node->pkt->pkttype == PKT_SECRET_SUBKEY ) + { + u32 kid[2]; + + if (node->pkt->pkttype == PKT_PUBLIC_SUBKEY) + keyid_from_pk (node->pkt->pkt.public_key, kid); + else + keyid_from_sk (node->pkt->pkt.secret_key, kid); + + for (; list; list = list->next) + if (list->kid[0] == kid[0] && list->kid[1] == kid[1]) + return 1; + } + return 0; +} + +/* Allocate a new subkey list item from NODE. */ +static subkey_list_t +new_subkey_list_item (KBNODE node) +{ + subkey_list_t list = xcalloc (1, sizeof *list); + + if (node->pkt->pkttype == PKT_PUBLIC_SUBKEY) + keyid_from_pk (node->pkt->pkt.public_key, list->kid); + else if (node->pkt->pkttype == PKT_SECRET_SUBKEY) + keyid_from_sk (node->pkt->pkt.secret_key, list->kid); + + return list; +} + + +/* Helper function to check whether the subkey at NODE actually + matches the description at DESC. The function returns true if the + key under question has been specified by an exact specification + (keyID or fingerprint) and does match the one at NODE. It is + assumed that the packet at NODE is either a public or secret + subkey. */ +static int +exact_subkey_match_p (KEYDB_SEARCH_DESC *desc, KBNODE node) +{ + u32 kid[2]; + byte fpr[MAX_FINGERPRINT_LEN]; + size_t fprlen; + int result = 0; + + switch(desc->mode) + { + case KEYDB_SEARCH_MODE_SHORT_KID: + case KEYDB_SEARCH_MODE_LONG_KID: + if (node->pkt->pkttype == PKT_PUBLIC_SUBKEY) + keyid_from_pk (node->pkt->pkt.public_key, kid); + else + keyid_from_sk (node->pkt->pkt.secret_key, kid); + break; + + case KEYDB_SEARCH_MODE_FPR16: + case KEYDB_SEARCH_MODE_FPR20: + case KEYDB_SEARCH_MODE_FPR: + if (node->pkt->pkttype == PKT_PUBLIC_SUBKEY) + fingerprint_from_pk (node->pkt->pkt.public_key, fpr,&fprlen); + else + fingerprint_from_sk (node->pkt->pkt.secret_key, fpr,&fprlen); + break; + + default: + break; + } + + switch(desc->mode) + { + case KEYDB_SEARCH_MODE_SHORT_KID: + if (desc->u.kid[1] == kid[1]) + result = 1; + break; + + case KEYDB_SEARCH_MODE_LONG_KID: + if (desc->u.kid[0] == kid[0] && desc->u.kid[1] == kid[1]) + result = 1; + break; + + case KEYDB_SEARCH_MODE_FPR16: + if (!memcmp (desc->u.fpr, fpr, 16)) + result = 1; + break; + + case KEYDB_SEARCH_MODE_FPR20: + case KEYDB_SEARCH_MODE_FPR: + if (!memcmp (desc->u.fpr, fpr, 20)) + result = 1; + break; + + default: + break; + } + + return result; +} + + /* If keyblock_out is non-NULL, AND the exit code is zero, then it contains a pointer to the first keyblock found and exported. No other keyblocks are exported. The caller must free it. */ @@ -160,6 +290,7 @@ KBNODE kbctx, node; size_t ndesc, descindex; KEYDB_SEARCH_DESC *desc = NULL; + subkey_list_t subkey_list = NULL; /* Track alreay processed subkeys. */ KEYDB_HANDLE kdbhd; STRLIST sl; u32 keyid[2]; @@ -170,7 +301,7 @@ if (!users) { ndesc = 1; - desc = xmalloc_clear ( ndesc * sizeof *desc); + desc = xcalloc ( ndesc, sizeof *desc ); desc[0].mode = KEYDB_SEARCH_MODE_FIRST; } else { @@ -186,7 +317,7 @@ sl->d, g10_errstr (G10ERR_INV_USER_ID)); } - /* it would be nice to see which of the given users did + /* It would be nice to see which of the given users did actually match one in the keyring. To implement this we need to have a found flag for each entry in desc and to set this we must check all those entries after a match to mark @@ -209,7 +340,7 @@ if (!users) desc[0].mode = KEYDB_SEARCH_MODE_NEXT; - /* read the keyblock */ + /* Read the keyblock. */ rc = keydb_get_keyblock (kdbhd, &keyblock ); if( rc ) { log_error (_("error reading keyblock: %s\n"), g10_errstr(rc) ); @@ -222,7 +353,7 @@ keyid_from_sk(sk,sk_keyid); - /* we can't apply GNU mode 1001 on an unprotected key */ + /* We can't apply GNU mode 1001 on an unprotected key. */ if( secret == 2 && !sk->is_protected ) { log_info(_("key %s: not protected - skipped\n"), @@ -230,7 +361,7 @@ continue; } - /* no v3 keys with GNU mode 1001 */ + /* No v3 keys with GNU mode 1001. */ if( secret == 2 && sk->version == 3 ) { log_info(_("key %s: PGP 2.x style key - skipped\n"), @@ -251,7 +382,7 @@ } else { - /* It's a public key export */ + /* It's a public key export. */ if((options&EXPORT_MINIMAL) && (node=find_kbnode(keyblock,PKT_PUBLIC_KEY))) keyid_from_pk(node->pkt->pkt.public_key,keyid); @@ -260,7 +391,7 @@ clean_uids_from_key(keyblock,opt.verbose); } - /* and write it */ + /* And write it. */ for( kbctx=NULL; (node = walk_kbnode( keyblock, &kbctx, 0 )); ) { if( skip_until_subkey ) { @@ -277,89 +408,59 @@ if( node->pkt->pkttype == PKT_COMMENT ) continue; - /* make sure that ring_trust packets never get exported */ + /* Make sure that ring_trust packets never get exported. */ if (node->pkt->pkttype == PKT_RING_TRUST) continue; /* If exact is set, then we only export what was requested (plus the primary key, if the user didn't specifically - request it) */ + request it). */ if(desc[descindex].exact && (node->pkt->pkttype==PKT_PUBLIC_SUBKEY || node->pkt->pkttype==PKT_SECRET_SUBKEY)) { - u32 kid[2]; - byte fpr[MAX_FINGERPRINT_LEN]; - size_t fprlen; + if (!exact_subkey_match_p (desc+descindex, node)) + { + /* Before skipping this subkey, check whether any + other description wants an exact match on a + subkey and include that subkey into the output + too. Need to add this subkey to a list so that + it won't get processed a second time. + + So the first step here is to check that list and + skip in any case if the key is in that list. - switch(desc[descindex].mode) - { - case KEYDB_SEARCH_MODE_SHORT_KID: - case KEYDB_SEARCH_MODE_LONG_KID: - if(node->pkt->pkttype==PKT_PUBLIC_SUBKEY) - keyid_from_pk(node->pkt->pkt.public_key,kid); - else - keyid_from_sk(node->pkt->pkt.secret_key,kid); - break; + We need this whole mess because the import + function is not able to merge secret keys and + thus it is useless to output them as two + separate keys and have import merge them. */ + if (subkey_in_list_p (subkey_list, node)) + skip_until_subkey = 1; /* Already processed this one. */ + else + { + size_t j; - case KEYDB_SEARCH_MODE_FPR16: - case KEYDB_SEARCH_MODE_FPR20: - case KEYDB_SEARCH_MODE_FPR: - if(node->pkt->pkttype==PKT_PUBLIC_SUBKEY) - fingerprint_from_pk(node->pkt->pkt.public_key, - fpr,&fprlen); - else - fingerprint_from_sk(node->pkt->pkt.secret_key, - fpr,&fprlen); - break; + for (j=0; j < ndesc; j++) + if (j != descindex && desc[j].exact + && exact_subkey_match_p (desc+j, node)) + break; + if (!(j < ndesc)) + skip_until_subkey = 1; /* No other one matching. */ + } + } - default: - break; - } - - switch(desc[descindex].mode) - { - case KEYDB_SEARCH_MODE_SHORT_KID: - if (desc[descindex].u.kid[1] != kid[1]) - skip_until_subkey=1; - break; - case KEYDB_SEARCH_MODE_LONG_KID: - if (desc[descindex].u.kid[0] != kid[0] - || desc[descindex].u.kid[1] != kid[1]) - skip_until_subkey=1; - break; - case KEYDB_SEARCH_MODE_FPR16: - if (memcmp (desc[descindex].u.fpr, fpr, 16)) - skip_until_subkey=1; - break; - case KEYDB_SEARCH_MODE_FPR20: - case KEYDB_SEARCH_MODE_FPR: - if (memcmp (desc[descindex].u.fpr, fpr, 20)) - skip_until_subkey=1; - break; - default: - break; - } - - /* XXX: before skipping a subkey, check whether any - other description wants an exact macth on a subkey - and include that subkey into the output too. Need - to add this subkey to a list so that it won't get - processed a second time. - - So the first step here is to check that list and - skip in any case if the key is in that list. - - We need this whole mess becuase the import fnction - is not able to merge secret key and thus it is not - possible to output them as two keys and have import - merge them. - */ - if(skip_until_subkey) continue; + + /* Mark this one as processed. */ + { + subkey_list_t tmp = new_subkey_list_item (node); + tmp->next = subkey_list; + subkey_list = tmp; + } } + if(node->pkt->pkttype==PKT_USER_ID) { /* Run clean_sigs_from_uid against each uid if @@ -510,6 +611,7 @@ rc = 0; leave: + release_subkey_list (subkey_list); xfree(desc); keydb_release (kdbhd); if(rc || keyblock_out==NULL) From cvs at cvs.gnupg.org Tue Oct 18 19:41:22 2005 From: cvs at cvs.gnupg.org (svn author wk) Date: Tue Oct 18 19:11:19 2005 Subject: [svn] GnuPG - r3913 - in trunk: doc g10 Message-ID: Author: wk Date: 2005-10-18 19:41:20 +0200 (Tue, 18 Oct 2005) New Revision: 3913 Modified: trunk/doc/DETAILS trunk/g10/ChangeLog trunk/g10/card-util.c trunk/g10/cardglue.c trunk/g10/cardglue.h trunk/g10/keygen.c Log: Fixed minor card related bugs and enhanced status messages Modified: trunk/doc/DETAILS =================================================================== --- trunk/doc/DETAILS 2005-10-17 17:21:15 UTC (rev 3912) +++ trunk/doc/DETAILS 2005-10-18 17:41:20 UTC (rev 3913) @@ -330,7 +330,7 @@ NEED_PASSPHRASE_SYM Issued whenever a passphrase for symmetric encryption is needed. - NEED_PASSPHRASE_PIN + NEED_PASSPHRASE_PIN [] Issued whenever a PIN is requested to unlock a card. MISSING_PASSPHRASE @@ -572,10 +572,14 @@ This indicates that a signature subpacket was seen. The format is the same as the "spk" record above. - SC_OP_FAILURE + SC_OP_FAILURE [] An operation on a smartcard definitely failed. Currently there is no indication of the actual error code, but application should be prepared to later accept more arguments. + Defined values for CODE are: + 0 - unspecified error (identically to a missing CODE) + 1 - canceled + 2 - bad PIN SC_OP_SUCCESS A smart card operaion succeeded. This status is only printed Modified: trunk/g10/ChangeLog =================================================================== --- trunk/g10/ChangeLog 2005-10-17 17:21:15 UTC (rev 3912) +++ trunk/g10/ChangeLog 2005-10-18 17:41:20 UTC (rev 3913) @@ -1,3 +1,19 @@ +2005-10-18 Werner Koch + + * cardglue.c (pin_cb): Fixed prompt for repeated PIN. Return + G10ERR_CANCELED and not just -1. + (status_sc_op_failure): New. Use it where we issue that status. + (pin_cb): Append serial number to the need-pin status message. + (agent_scd_change_pin): Add arg SERIALNO. Changed all callers. + (agent_scd_writekey): Ditto. + (agent_scd_setattr): Ditto. + (agent_scd_genkey): Ditto. + (agent_scd_checkpin): Pass serialno to the pin_cb. + + * keygen.c (parse_expire_string): Allow setting the expire + interval using a "seconds=" syntax. This is useful for + debugging. + 2005-10-17 Werner Koch * export.c (do_export_stream): Factored some code out to ... Modified: trunk/g10/card-util.c =================================================================== --- trunk/g10/card-util.c 2005-10-17 17:21:15 UTC (rev 3912) +++ trunk/g10/card-util.c 2005-10-18 17:41:20 UTC (rev 3913) @@ -70,17 +70,16 @@ agent_clear_pin_cache (info.serialno); - agent_release_card_info (&info); - if (opt.batch) { + agent_release_card_info (&info); log_error (_("can't do this in batch mode\n")); return; } if(!allow_admin) { - rc = agent_scd_change_pin (1); + rc = agent_scd_change_pin (1, info.serialno); if (rc) tty_printf ("Error changing the PIN: %s\n", gpg_strerror (rc)); else @@ -109,7 +108,7 @@ rc = 0; if (*answer == '1') { - rc = agent_scd_change_pin (1); + rc = agent_scd_change_pin (1, info.serialno); if (rc) tty_printf ("Error changing the PIN: %s\n", gpg_strerror (rc)); else @@ -120,7 +119,7 @@ } else if (*answer == '2') { - rc = agent_scd_change_pin (101); + rc = agent_scd_change_pin (101, info.serialno); if (rc) tty_printf ("Error unblocking the PIN: %s\n", gpg_strerror (rc)); else @@ -131,7 +130,7 @@ } else if (*answer == '3') { - rc = agent_scd_change_pin (3); + rc = agent_scd_change_pin (3, info.serialno); if (rc) tty_printf ("Error changing the PIN: %s\n", gpg_strerror (rc)); else @@ -145,6 +144,8 @@ break; } } + + agent_release_card_info (&info); } static const char * @@ -561,7 +562,7 @@ return -1; } - rc = agent_scd_setattr ("DISP-NAME", isoname, strlen (isoname) ); + rc = agent_scd_setattr ("DISP-NAME", isoname, strlen (isoname), NULL ); if (rc) log_error ("error setting Name: %s\n", gpg_strerror (rc)); @@ -590,7 +591,7 @@ return -1; } - rc = agent_scd_setattr ("PUBKEY-URL", url, strlen (url) ); + rc = agent_scd_setattr ("PUBKEY-URL", url, strlen (url), NULL ); if (rc) log_error ("error setting URL: %s\n", gpg_strerror (rc)); xfree (url); @@ -706,7 +707,7 @@ return -1; } - rc = agent_scd_setattr ("LOGIN-DATA", data, n ); + rc = agent_scd_setattr ("LOGIN-DATA", data, n, NULL ); if (rc) log_error ("error setting login data: %s\n", gpg_strerror (rc)); xfree (data); @@ -775,7 +776,7 @@ return -1; } - rc = agent_scd_setattr (do_name, data, n ); + rc = agent_scd_setattr (do_name, data, n, NULL ); if (rc) log_error ("error setting private DO: %s\n", gpg_strerror (rc)); xfree (data); @@ -811,7 +812,7 @@ return -1; } - rc = agent_scd_setattr ("DISP-LANG", data, strlen (data) ); + rc = agent_scd_setattr ("DISP-LANG", data, strlen (data), NULL ); if (rc) log_error ("error setting lang: %s\n", gpg_strerror (rc)); xfree (data); @@ -846,7 +847,7 @@ return -1; } - rc = agent_scd_setattr ("DISP-SEX", str, 1 ); + rc = agent_scd_setattr ("DISP-SEX", str, 1, NULL ); if (rc) log_error ("error setting sex: %s\n", gpg_strerror (rc)); xfree (data); @@ -891,7 +892,7 @@ rc = agent_scd_setattr (fprno==1?"CA-FPR-1": fprno==2?"CA-FPR-2": - fprno==3?"CA-FPR-3":"x", fpr, 20 ); + fprno==3?"CA-FPR-3":"x", fpr, 20, NULL ); if (rc) log_error ("error setting cafpr: %s\n", gpg_strerror (rc)); return rc; @@ -916,7 +917,7 @@ newstate = !info.chv1_cached; agent_release_card_info (&info); - rc = agent_scd_setattr ("CHV-STATUS-1", newstate? "\x01":"", 1); + rc = agent_scd_setattr ("CHV-STATUS-1", newstate? "\x01":"", 1, NULL); if (rc) log_error ("error toggling signature PIN flag: %s\n", gpg_strerror (rc)); } @@ -961,7 +962,7 @@ { /* Switch of the forced mode so that during key generation we don't get bothered with PIN queries for each self-signature. */ - rc = agent_scd_setattr ("CHV-STATUS-1", "\x01", 1); + rc = agent_scd_setattr ("CHV-STATUS-1", "\x01", 1, info->serialno); if (rc) { log_error ("error clearing forced signature PIN flag: %s\n", @@ -989,7 +990,7 @@ if (*forced_chv1) { /* Switch back to forced state. */ - rc = agent_scd_setattr ("CHV-STATUS-1", "", 1); + rc = agent_scd_setattr ("CHV-STATUS-1", "", 1, NULL); if (rc) { log_error ("error setting forced signature PIN flag: %s\n", Modified: trunk/g10/cardglue.c =================================================================== --- trunk/g10/cardglue.c 2005-10-17 17:21:15 UTC (rev 3912) +++ trunk/g10/cardglue.c 2005-10-18 17:41:20 UTC (rev 3913) @@ -520,6 +520,20 @@ return cacheid; } + +/* If RC is not 0, write an appropriate status message. */ +static void +status_sc_op_failure (int rc) +{ + if (rc == G10ERR_CANCELED) + write_status_text (STATUS_SC_OP_FAILURE, "1"); + else if (rc == G10ERR_BAD_PASS) + write_status_text (STATUS_SC_OP_FAILURE, "2"); + else if (rc) + write_status (STATUS_SC_OP_FAILURE); +} + + /* Check that the serial number of the current card (as described by APP) matches SERIALNO. If there is no match and we are not in batch mode, present a prompt to insert the desired card. The @@ -880,8 +894,18 @@ again: if (is_status_enabled()) - write_status_text (STATUS_NEED_PASSPHRASE_PIN, - isadmin? "OPENPGP 3" : "OPENPGP 1"); + { + if (parm && parm->sn && *parm->sn) + { + char *buf = xmalloc ( 10 + strlen (parm->sn) + 1); + strcpy (stpcpy (buf, isadmin? "OPENPGP 3 ":"OPENPGP 1 "), parm->sn); + write_status_text (STATUS_NEED_PASSPHRASE_PIN, buf); + xfree (buf); + } + else + write_status_text (STATUS_NEED_PASSPHRASE_PIN, + isadmin? "OPENPGP 3" : "OPENPGP 1"); + } value = ask_passphrase (info, again_text, newpin && isadmin? "passphrase.adminpin.new.ask" : @@ -898,7 +922,7 @@ cacheid = NULL; again_text = NULL; if (!value && canceled) - return -1; + return G10ERR_CANCELED; else if (!value) return G10ERR_GENERAL; @@ -906,16 +930,17 @@ { char *value2; - value2 = ask_passphrase (info, NULL, NULL, + value2 = ask_passphrase (info, NULL, "passphrase.pin.repeat", _("Repeat this PIN: "), - &canceled); - if (!value && canceled) + NULL, + &canceled); + if (!value2 && canceled) { xfree (value); - return -1; + return G10ERR_CANCELED; } - else if (!value) + else if (!value2) { xfree (value); return G10ERR_GENERAL; @@ -940,11 +965,16 @@ /* Send a SETATTR command to the SCdaemon. */ int agent_scd_setattr (const char *name, - const unsigned char *value, size_t valuelen) + const unsigned char *value, size_t valuelen, + const char *serialno) { app_t app; int rc; + struct pincb_parm_s parm; + memset (&parm, 0, sizeof parm); + parm.sn = serialno; + app = current_app? current_app : open_card (); if (!app) return gpg_error (GPG_ERR_CARD); @@ -981,11 +1011,10 @@ } else { - rc = app->fnc.setattr (app, name, pin_cb, NULL, value, valuelen); + rc = app->fnc.setattr (app, name, pin_cb, &parm, value, valuelen); } - if (rc) - write_status (STATUS_SC_OP_FAILURE); + status_sc_op_failure (rc); return rc; } @@ -1003,11 +1032,17 @@ /* Send a WRITEKEY command to the SCdaemon. */ int -agent_scd_writekey (int keyno, const unsigned char *keydata, size_t keydatalen) +agent_scd_writekey (int keyno, const char *serialno, + const unsigned char *keydata, size_t keydatalen) { app_t app; int rc; char line[ASSUAN_LINELENGTH]; + struct pincb_parm_s parm; + + memset (&parm, 0, sizeof parm); + parm.sn = serialno; + app = current_app? current_app : open_card (); if (!app) return gpg_error (GPG_ERR_CARD); @@ -1032,12 +1067,11 @@ snprintf (line, DIM(line)-1, "OPENPGP.%d", keyno); line[DIM(line)-1] = 0; rc = app->fnc.writekey (app, NULL, line, 0x0001, - pin_cb, NULL, + pin_cb, &parm, keydata, keydatalen); } - if (rc) - write_status (STATUS_SC_OP_FAILURE); + status_sc_op_failure (rc); return rc; } @@ -1097,13 +1131,18 @@ /* Send a GENKEY command to the SCdaemon. */ int -agent_scd_genkey (struct agent_card_genkey_s *info, int keyno, int force) +agent_scd_genkey (struct agent_card_genkey_s *info, int keyno, int force, + const char *serialno) { app_t app; char line[ASSUAN_LINELENGTH]; struct ctrl_ctx_s ctrl; int rc; + struct pincb_parm_s parm; + memset (&parm, 0, sizeof parm); + parm.sn = serialno; + app = current_app? current_app : open_card (); if (!app) return gpg_error (GPG_ERR_CARD); @@ -1127,11 +1166,10 @@ ctrl.status_cb_arg = info; rc = app->fnc.genkey (app, &ctrl, line, force? 1:0, - pin_cb, NULL); + pin_cb, &parm); } - if (rc) - write_status (STATUS_SC_OP_FAILURE); + status_sc_op_failure (rc); return rc; } @@ -1213,7 +1251,7 @@ if (rc) { - write_status (STATUS_SC_OP_FAILURE); + status_sc_op_failure (rc); if (!app->assuan_ctx) agent_clear_pin_cache (serialno); } @@ -1287,21 +1325,27 @@ if (rc) { - write_status (STATUS_SC_OP_FAILURE); + status_sc_op_failure (rc); if (!app->assuan_ctx) agent_clear_pin_cache (serialno); } return rc; } -/* Change the PIN of an OpenPGP card or reset the retry counter. */ +/* Change the PIN of an OpenPGP card or reset the retry + counter. SERIALNO may be NULL or a hex string finally passed to the + passphrase callback. */ int -agent_scd_change_pin (int chvno) +agent_scd_change_pin (int chvno, const char *serialno) { app_t app; int reset = 0; int rc; + struct pincb_parm_s parm; + memset (&parm, 0, sizeof parm); + parm.sn = serialno; + reset = (chvno >= 100); chvno %= 100; @@ -1326,11 +1370,10 @@ sprintf (chvnostr, "%d", chvno); rc = app->fnc.change_pin (app, NULL, chvnostr, reset, - pin_cb, NULL); + pin_cb, &parm); } - if (rc) - write_status (STATUS_SC_OP_FAILURE); + status_sc_op_failure (rc); return rc; } @@ -1342,7 +1385,11 @@ { app_t app; int rc; + struct pincb_parm_s parm; + memset (&parm, 0, sizeof parm); + parm.sn = serialnobuf; + app = current_app? current_app : open_card (); if (!app) return gpg_error (GPG_ERR_CARD); @@ -1360,11 +1407,10 @@ } else { - rc = app->fnc.check_pin (app, serialnobuf, pin_cb, NULL); + rc = app->fnc.check_pin (app, serialnobuf, pin_cb, &parm); } - if (rc) - write_status (STATUS_SC_OP_FAILURE); + status_sc_op_failure (rc); return rc; } Modified: trunk/g10/cardglue.h =================================================================== --- trunk/g10/cardglue.h 2005-10-17 17:21:15 UTC (rev 3912) +++ trunk/g10/cardglue.h 2005-10-18 17:41:20 UTC (rev 3913) @@ -82,7 +82,7 @@ #define GPG_ERR_GENERAL G10ERR_GENERAL #define GPG_ERR_BAD_PIN G10ERR_BAD_PASS -#define GPG_ERR_BAD_KEy G10ERR_BAD_KEY +#define GPG_ERR_BAD_KEY G10ERR_BAD_KEY #define GPG_ERR_CARD G10ERR_GENERAL #define GPG_ERR_EEXIST G10ERR_FILE_EXISTS #define GPG_ERR_ENOMEM G10ERR_RESOURCE_LIMIT @@ -175,14 +175,16 @@ /* Send a SETATTR command to the SCdaemon. */ int agent_scd_setattr (const char *name, - const unsigned char *value, size_t valuelen); + const unsigned char *value, size_t valuelen, + const char *serialno); /* Send a WRITEKEY command to the SCdaemon. */ -int agent_scd_writekey (int keyno, +int agent_scd_writekey (int keyno, const char *serialno, const unsigned char *keydata, size_t keydatalen); /* Send a GENKEY command to the SCdaemon. */ -int agent_scd_genkey (struct agent_card_genkey_s *info, int keyno, int force); +int agent_scd_genkey (struct agent_card_genkey_s *info, int keyno, int force, + const char *serialno); /* Send a PKSIGN command to the SCdaemon. */ int agent_scd_pksign (const char *keyid, int hashalgo, @@ -195,7 +197,7 @@ unsigned char **r_buf, size_t *r_buflen); /* Change the PIN of an OpenPGP card or reset the retry counter. */ -int agent_scd_change_pin (int chvno); +int agent_scd_change_pin (int chvno, const char *serialno); /* Send a CHECKPIN command. */ int agent_scd_checkpin (const char *serialnobuf); Modified: trunk/g10/keygen.c =================================================================== --- trunk/g10/keygen.c 2005-10-17 17:21:15 UTC (rev 3912) +++ trunk/g10/keygen.c 2005-10-18 17:41:20 UTC (rev 3913) @@ -1492,6 +1492,8 @@ if( !*string ) seconds = 0; + else if ( !strncmp (string, "seconds=", 8) ) + seconds = atoi (string+8); else if( (abs_date = scan_isodatestr(string)) && abs_date > curtime ) seconds = abs_date - curtime; else if( (mult=check_valid_days(string)) ) @@ -3274,8 +3276,8 @@ assert (algo == PUBKEY_ALGO_RSA); - - rc = agent_scd_genkey (&info, keyno, 1); + /* Fixme: We don't have the serialnumber available, thus passing NULL. */ + rc = agent_scd_genkey (&info, keyno, 1, NULL); /* if (gpg_err_code (rc) == GPG_ERR_EEXIST) */ /* { */ /* tty_printf ("\n"); */ @@ -3550,7 +3552,9 @@ sprintf (numbuf, "%lu:", (unsigned long)strlen (numbuf2)); p = stpcpy (stpcpy (stpcpy (p, numbuf), numbuf2), "))"); - rc = agent_scd_writekey (keyno, sexp, p - sexp); + /* Fixme: Unfortunately we don't have the serialnumber available - + thus we can't pass it down to the agent. */ + rc = agent_scd_writekey (keyno, NULL, sexp, p - sexp); leave: xfree (sexp); From cvs at cvs.gnupg.org Thu Oct 20 14:52:40 2005 From: cvs at cvs.gnupg.org (svn author marcus) Date: Thu Oct 20 14:22:26 2005 Subject: [svn] gpg-error - r146 - in trunk: . src Message-ID: Author: marcus Date: 2005-10-20 14:52:39 +0200 (Thu, 20 Oct 2005) New Revision: 146 Modified: trunk/ChangeLog trunk/configure.ac trunk/src/Makefile.am Log: 2005-10-20 Marcus Brinkmann * configure.ac: Instead checking for windres and dlltool, invoke AC_LIBTOOL_WIN32_DLL and AC_LIBTOOL_RC. * src/Makefile.am [HAVE_W32_SYSTEM]: Use libtool, which simplifies the rules. Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2005-10-02 19:41:37 UTC (rev 145) +++ trunk/ChangeLog 2005-10-20 12:52:39 UTC (rev 146) @@ -1,3 +1,10 @@ +2005-10-20 Marcus Brinkmann + + * configure.ac: Instead checking for windres and dlltool, invoke + AC_LIBTOOL_WIN32_DLL and AC_LIBTOOL_RC. + * src/Makefile.am [HAVE_W32_SYSTEM]: Use libtool, which simplifies + the rules. + 2005-10-02 Marcus Brinkmann * configure.ac: Escape arguments in AC_INIT invocation. Modified: trunk/configure.ac =================================================================== --- trunk/configure.ac 2005-10-02 19:41:37 UTC (rev 145) +++ trunk/configure.ac 2005-10-20 12:52:39 UTC (rev 146) @@ -51,8 +51,8 @@ AC_PROG_CPP AC_PROG_AWK AC_CHECK_TOOL(AR, ar, :) -AC_CHECK_TOOL(DLLTOOL, dlltool, :) -AC_CHECK_TOOL(WINDRES, windres, :) +AC_LIBTOOL_WIN32_DLL +AC_LIBTOOL_RC AC_PROG_LIBTOOL # We need to compile and run a program on the build machine. Modified: trunk/src/Makefile.am =================================================================== --- trunk/src/Makefile.am 2005-10-02 19:41:37 UTC (rev 145) +++ trunk/src/Makefile.am 2005-10-20 12:52:39 UTC (rev 146) @@ -46,11 +46,46 @@ gpg-error.h mkerrcodes mkerrcodes.h \ err-sources-sym.h err-codes-sym.h errnos-sym.h $(tmp_files) -libgpg_error_la_LDFLAGS = -version-info \ - @LIBGPG_ERROR_LT_CURRENT@:@LIBGPG_ERROR_LT_REVISION@:@LIBGPG_ERROR_LT_AGE@ +if HAVE_W32_SYSTEM + +LTRCCOMPILE = $(LIBTOOL) --mode=compile $(RC) \ + `echo $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) | \ + sed -e 's/-I/--include-dir /g;s/-D/--define /g'` + +%.o : %.rc + $(LTRCCOMPILE) -i $< -o $@ + +gpg_error_res = versioninfo.o +gpg_error_res_ldflag = -Wl,$(gpg_error_res) +no_undefined = -no-undefined +export_symbols = -export-symbols $(srcdir)/gpg-error.def + +install-def-file: + $(INSTALL) gpg-error.def $(DESTDIR)$(libdir)/gpg-error-.def + +uninstall-def-file: + -rm $(DESTDIR)$(libdir)/gpg-error.def + +libgpg_error_la_DEPENDENCIES = $(gpg_error_res) gpg-error.def + +else +gpg_error_res = +gpg_error_res_ldflag = +no_undefined = +export_symbols = +install-def-file: +uninstall-def-file: + +endif + + +libgpg_error_la_LDFLAGS = $(gpg_error_res_ldflag) -version-info \ + @LIBGPG_ERROR_LT_CURRENT@:@LIBGPG_ERROR_LT_REVISION@:@LIBGPG_ERROR_LT_AGE@ \ + $(no_undefined) $(export_symbols) + libgpg_error_la_SOURCES = gpg-error.h gettext.h \ - strsource.c strerror.c code-to-errno.c code-from-errno.c + strsource.c strerror.c code-to-errno.c code-from-errno.c libgpg_error_la_LIBADD = @LTLIBINTL@ @@ -103,31 +138,3 @@ $(srcdir)/err-codes.h.in \ $(srcdir)/errnos.in \ $(srcdir)/gpg-error.h.in > $@ - - -# Special code to build a DLL. The current libtool (1.5.6) is not -# able to do this properly; we better use gcc's built in magic. -if HAVE_W32_SYSTEM -all-local: libgpg-error.dll libgpg-error.dll.a - -install-exec-hook: - cp libgpg-error.dll libgpg-error.dll.a $(DESTDIR)$(libdir)/ - cp gpg-error.exe $(DESTDIR)$(bindir)/ - $(STRIP) $(DESTDIR)$(libdir)/libgpg-error.dll - $(STRIP) $(DESTDIR)$(bindir)/gpg-error.exe - -libgpg-error.dll libgpg-error.dll.a: gpg-error.def \ - code-from-errno.o code-to-errno.o strerror.o strsource.o \ - gpg_error-strsource-sym.o gpg_error-strerror-sym.o \ - gpg_error-gpg-error.o versioninfo.o - $(CC) -shared -o libgpg-error.dll gpg-error.def \ - code-from-errno.o code-to-errno.o strerror.o strsource.o \ - versioninfo.o -Wl,--out-implib,libgpg-error.dll.a - $(CC) -o gpg-error.exe gpg_error-strsource-sym.o \ - gpg_error-strerror-sym.o gpg_error-gpg-error.o \ - libgpg-error.dll.a - -.rc.o: - $(WINDRES) `test -f '$<' || echo '$(srcdir)/'`$< $@ - -endif From cvs at cvs.gnupg.org Thu Oct 20 15:05:04 2005 From: cvs at cvs.gnupg.org (svn author marcus) Date: Thu Oct 20 14:34:50 2005 Subject: [svn] gpgme - r1129 - in trunk: . gpgme Message-ID: Author: marcus Date: 2005-10-20 15:05:04 +0200 (Thu, 20 Oct 2005) New Revision: 1129 Modified: trunk/ChangeLog trunk/configure.ac trunk/gpgme/Makefile.am Log: 2005-10-20 Marcus Brinkmann * configure.ac: Instead checking for windres and dlltool, invoke AC_LIBTOOL_WIN32_DLL and AC_LIBTOOL_RC. * src/Makefile.am [HAVE_W32_SYSTEM]: Use libtool, which simplifies the rules. Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2005-10-19 08:23:23 UTC (rev 1128) +++ trunk/ChangeLog 2005-10-20 13:05:04 UTC (rev 1129) @@ -1,3 +1,10 @@ +2005-10-20 Marcus Brinkmann + + * configure.ac: Instead checking for windres and dlltool, invoke + AC_LIBTOOL_WIN32_DLL and AC_LIBTOOL_RC. + * src/Makefile.am [HAVE_W32_SYSTEM]: Use libtool, which simplifies + the rules. + 2005-10-01 Marcus Brinkmann Released 1.1.0. Modified: trunk/configure.ac =================================================================== --- trunk/configure.ac 2005-10-19 08:23:23 UTC (rev 1128) +++ trunk/configure.ac 2005-10-20 13:05:04 UTC (rev 1129) @@ -69,10 +69,7 @@ #endif]) AC_PROG_CC -AC_CHECK_TOOL(DLLTOOL, dlltool, :) -AC_CHECK_TOOL(WINDRES, windres, :) - AC_SUBST(LIBGPGME_LT_CURRENT) AC_SUBST(LIBGPGME_LT_AGE) AC_SUBST(LIBGPGME_LT_REVISION) @@ -88,6 +85,8 @@ # Don't default to build static libs. AC_DISABLE_STATIC +AC_LIBTOOL_WIN32_DLL +AC_LIBTOOL_RC AC_PROG_LIBTOOL # For now we hardcode the use of version scripts. It would be better Modified: trunk/gpgme/Makefile.am =================================================================== --- trunk/gpgme/Makefile.am 2005-10-19 08:23:23 UTC (rev 1128) +++ trunk/gpgme/Makefile.am 2005-10-20 13:05:04 UTC (rev 1129) @@ -89,7 +89,41 @@ AM_CPPFLAGS = $(assuan_cppflags) @GPG_ERROR_CFLAGS@ -libgpgme_la_LDFLAGS = $(libgpgme_version_script_cmd) -version-info \ + +if HAVE_W32_SYSTEM + +LTRCCOMPILE = $(LIBTOOL) --mode=compile $(RC) \ + `echo $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) | \ + sed -e 's/-I/--include-dir /g;s/-D/--define /g'` + +%.o : %.rc + $(LTRCCOMPILE) -i $< -o $@ + +gpgme_res = versioninfo.o +gpgme_res_ldflag = -Wl,$(gpgme_res) +no_undefined = -no-undefined +export_symbols = -export-symbols $(srcdir)/gpgme.def + +install-def-file: + $(INSTALL) gpg-error.def $(DESTDIR)$(libdir)/gpgme.def + +uninstall-def-file: + -rm $(DESTDIR)$(libdir)/gpgme.def + +libgpgme_la_DEPENDENCIES = $(gpgme_res) gpgme.def + +else +gpgme_res = +gpgme_res_ldflag = +no_undefined = +export_symbols = +install-def-file: +uninstall-def-file: + +endif + +libgpgme_la_LDFLAGS = $(gpgme_res_ldflag) $(no_undefined) $(export_symbols) \ + $(libgpgme_version_script_cmd) -version-info \ @LIBGPGME_LT_CURRENT@:@LIBGPGME_LT_REVISION@:@LIBGPGME_LT_AGE@ libgpgme_la_DEPENDENCIES = libgpgme-real.la $(assuan_libobjs) \ @LTLIBOBJS@ $(srcdir)/libgpgme.vers @@ -116,33 +150,6 @@ status-table.h : gpgme.h $(srcdir)/mkstatus < $(srcdir)/gpgme.h > status-table.h -# Special code to build a DLL. The current libtool (1.5.6) is not -# able to do this properly; we better use gcc's built in magic. -if HAVE_W32_SYSTEM - -w32_o_files = ath.o conversion.o data-compat.o data-fd.o \ - data-mem.o data-stream.o data-user.o data.o debug.o \ - decrypt-verify.o decrypt.o delete.o edit.o encrypt-sign.o \ - encrypt.o engine-gpgsm.o engine.o error.o export.o genkey.o \ - get-env.o gpgme.o import.o key.o keylist.o memrchr.o \ - op-support.o passphrase.o progress.o putc_unlocked.o \ - rungpg.o sign.o signers.o trust-item.o trustlist.o \ - ttyname_r.o vasprintf.o verify.o version.o \ - w32-io.o w32-sema.o w32-util.o \ - wait-global.o wait-private.o wait-user.o wait.o - -all-local: gpgme.dll gpgme.dll.a - -install-exec-hook: - cp gpgme.dll gpgme.dll.a $(DESTDIR)$(libdir)/ - $(STRIP) $(DESTDIR)$(libdir)/gpgme.dll - -gpgme.dll gpgme.dll.a: gpgme.def $(w32_o_files) versioninfo.o - $(CC) -shared -o gpgme.dll $(srcdir)/gpgme.def $(w32_o_files) \ - versioninfo.o @GPG_ERROR_LIBS@ -Wl,--out-implib,gpgme.dll.a - - -.rc.o: - $(WINDRES) `test -f '$<' || echo '$(srcdir)/'`$< $@ - -endif +install-data-local: install-def-file + +uninstall-local: uninstall-def-file From cvs at cvs.gnupg.org Thu Oct 20 15:15:59 2005 From: cvs at cvs.gnupg.org (svn author marcus) Date: Thu Oct 20 14:45:45 2005 Subject: [svn] GPGol - r120 - trunk/src Message-ID: Author: marcus Date: 2005-10-20 15:15:59 +0200 (Thu, 20 Oct 2005) New Revision: 120 Added: trunk/src/mapi32.def Modified: trunk/src/ChangeLog trunk/src/Makefile.am Log: 2005-10-20 Marcus Brinkmann * mapi32.def: New file. * Makefile.am (gpgol_DEPENDENCIES): New variable. (libmapi32.a): New target. (gpgol_LDADD): Replace mapi32.dll with "-L . -lmapi32". (clean-local): New target. Modified: trunk/src/ChangeLog =================================================================== --- trunk/src/ChangeLog 2005-10-06 13:51:54 UTC (rev 119) +++ trunk/src/ChangeLog 2005-10-20 13:15:59 UTC (rev 120) @@ -1,3 +1,11 @@ +2005-10-20 Marcus Brinkmann + + * mapi32.def: New file. + * Makefile.am (gpgol_DEPENDENCIES): New variable. + (libmapi32.a): New target. + (gpgol_LDADD): Replace mapi32.dll with "-L . -lmapi32". + (clean-local): New target. + 2005-10-06 Marcus Brinkmann * Makefile.am (gpgol_LDADD): Prefix gpgol.def and mapi32.dll with Modified: trunk/src/Makefile.am =================================================================== --- trunk/src/Makefile.am 2005-10-06 13:51:54 UTC (rev 119) +++ trunk/src/Makefile.am 2005-10-20 13:15:59 UTC (rev 120) @@ -13,7 +13,8 @@ bin_PROGRAMS = gpgol EXTRA_DIST = versioninfo.rc.in gpgol-rsrcs.rc olflange-rsrcs.rc \ - logo.bmp decrypt.bmp encrypt.bmp sign.bmp key_mana.bmp + logo.bmp decrypt.bmp encrypt.bmp sign.bmp key_mana.bmp \ + mapi32.def EXEEXT = .dll AM_CFLAGS = $(GPGME_CFLAGS) -shared @@ -45,17 +46,21 @@ watcher.cpp \ attach.cpp attach.h +# W32API 3.2 comes with an unusable libmapi32.a. We build our own +# version. Note the omission of -k (--kill-at) from the DLLTOOL +# command line. +gpgol_DEPENDENCIES = libmapi32.a + +libmapi32.a: mapi32.def + $(DLLTOOL) --output-lib $@ --def $< + +clean-local: + rm -f libmapi32.a + gpgol_LDADD = $(srcdir)/gpgol.def \ - $(GPGME_LIBS) $(srcdir)/mapi32.dll -lshell32 -lgdi32 -lcomdlg32 + $(GPGME_LIBS) -L . -lmapi32 -lshell32 -lgdi32 -lcomdlg32 resource.o: resource.rc versioninfo.rc gpgol-rsrcs.rc olflange-rsrcs.rc .rc.o: $(WINDRES) -I $(srcdir) -I . `test -f '$<' || echo '$(srcdir)/'`$< $@ - - - - - - - Added: trunk/src/mapi32.def =================================================================== --- trunk/src/mapi32.def 2005-10-06 13:51:54 UTC (rev 119) +++ trunk/src/mapi32.def 2005-10-20 13:15:59 UTC (rev 120) @@ -0,0 +1,164 @@ +LIBRARY MAPI32.DLL +EXPORTS +BuildDisplayTable@40 +CbOfEncoded@4 +CchOfEncoding@4 +ChangeIdleRoutine@28 +CloseIMsgSession@4 +CreateIProp@24 +CreateTable@36 +DeinitMapiUtil@0 +DeregisterIdleRoutine@4 +EnableIdleRoutine@8 +EncodeID@12 +FBadColumnSet@4 +FBadEntryList@4 +FBadProp@4 +FBadPropTag@4 +FBadRestriction@4 +FBadRglpNameID@8 +FBadRglpszA@8 +FBadRglpszW@8 +FBadRow@4 +FBadRowSet@4 +FBadSortOrderSet@4 +FBinFromHex@8 +FDecodeID@12 +FEqualNames@8 +FPropCompareProp@12 +FPropContainsProp@12 +FPropExists@8 +FreePadrlist@4 +FreeProws@4 +FtAdcFt@20 +FtAddFt@16 +FtDivFtBogus@20 +FtMulDw@12 +FtMulDwDw@8 +FtNegFt@8 +FtSubFt@16 +FtgRegisterIdleRoutine@20 +GetAttribIMsgOnIStg@12 +GetTnefStreamCodepage +GetTnefStreamCodepage@12 +HexFromBin@12 +HrAddColumns@16 +HrAddColumnsEx@20 +HrAllocAdviseSink@12 +HrComposeEID@28 +HrComposeMsgID@24 +HrDecomposeEID@28 +HrDecomposeMsgID@24 +HrDispatchNotifications@4 +HrEntryIDFromSz@12 +HrGetOneProp@12 +HrIStorageFromStream@16 +HrQueryAllRows@24 +HrSetOneProp@8 +HrSzFromEntryID@12 +HrThisThreadAdviseSink@8 +HrValidateIPMSubtree@20 +HrValidateParameters@8 +InstallFilterHook@4 +IsBadBoundedStringPtr@8 +LAUNCHWIZARD +LPropCompareProp@8 +LaunchWizard@20 +LpValFindProp@12 +MAPI_NSCP_SynchronizeClient@8 +MAPIAddress@44 +MAPIAdminProfiles +MAPIAdminProfiles@8 +MAPIAllocateBuffer +MAPIAllocateBuffer@8 +MAPIAllocateMore +MAPIAllocateMore@12 +MAPIDeinitIdle@0 +MAPIDeleteMail@20 +MAPIDetails@20 +MAPIFindNext@28 +MAPIFreeBuffer +MAPIFreeBuffer@4 +MAPIGetDefaultMalloc@0 +MAPIGetNetscapeVersion@0 +MAPIInitIdle@4 +MAPIInitialize +MAPIInitialize@4 +MAPILogoff@16 +MAPILogon@24 +MAPILogonEx +MAPILogonEx@20 +MAPIOpenFormMgr +MAPIOpenFormMgr@8 +MAPIOpenLocalFormContainer +MAPIOpenLocalFormContainer@4 +MAPIReadMail@24 +MAPIResolveName@24 +MAPISaveMail@24 +MAPISendDocuments@20 +MAPISendMail +MAPISendMail@20 +MAPIUninitialize +MAPIUninitialize@0 +MNLS_CompareStringW@24 +MNLS_IsBadStringPtrW@8 +MNLS_MultiByteToWideChar@24 +MNLS_WideCharToMultiByte@32 +MNLS_lstrcmpW@8 +MNLS_lstrcpyW@8 +MNLS_lstrlenW@4 +MapStorageSCode@4 +OpenIMsgOnIStg@44 +OpenIMsgSession@12 +OpenStreamOnFile +OpenStreamOnFile@24 +OpenTnefStream +OpenTnefStream@28 +OpenTnefStreamEx +OpenTnefStreamEx@32 +PRProviderInit +PpropFindProp@12 +PropCopyMore@16 +RTFSync +RTFSync@12 +ScBinFromHexBounded@12 +ScCopyNotifications@16 +ScCopyProps@16 +ScCountNotifications@12 +ScCountProps@12 +ScCreateConversationIndex@16 +ScDupPropset@16 +ScGenerateMuid@4 +ScInitMapiUtil@4 +ScLocalPathFromUNC@12 +ScMAPIXFromCMC +ScMAPIXFromSMAPI +ScRelocNotifications@20 +ScRelocProps@20 +ScSplEntry +ScUNCFromLocalPath@12 +SetAttribIMsgOnIStg@16 +SwapPlong@8 +SwapPword@8 +SzFindCh@8 +SzFindLastCh@8 +SzFindSz@8 +UFromSz@4 +UNKOBJ_COFree@8 +UNKOBJ_Free@8 +UNKOBJ_FreeRows@8 +UNKOBJ_ScAllocate@12 +UNKOBJ_ScAllocateMore@16 +UNKOBJ_ScCOAllocate@12 +UNKOBJ_ScCOReallocate@12 +UNKOBJ_ScSzFromIdsAlloc@20 +UlAddRef@4 +UlFromSzHex@4 +UlPropSize@4 +UlRelease@4 +WrapCompressedRTFStream +WrapCompressedRTFStream@12 +WrapProgress@20 +WrapStoreEntryID@24 +__CPPValidateParameters@8 +__ValidateParameters@8 From cvs at cvs.gnupg.org Thu Oct 20 15:32:48 2005 From: cvs at cvs.gnupg.org (svn author marcus) Date: Thu Oct 20 15:02:33 2005 Subject: [svn] gpgme - r1130 - trunk Message-ID: Author: marcus Date: 2005-10-20 15:32:48 +0200 (Thu, 20 Oct 2005) New Revision: 1130 Removed: trunk/w32-dll/ Modified: trunk/ChangeLog Log: 2005-10-20 Marcus Brinkmann * w32-dll/ChangeLog, w32-dll/build-dll, w32-dll/gpgme.def: Remove files. Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2005-10-20 13:05:04 UTC (rev 1129) +++ trunk/ChangeLog 2005-10-20 13:32:48 UTC (rev 1130) @@ -1,5 +1,8 @@ 2005-10-20 Marcus Brinkmann + * w32-dll/ChangeLog, w32-dll/build-dll, w32-dll/gpgme.def: Remove + files. + * configure.ac: Instead checking for windres and dlltool, invoke AC_LIBTOOL_WIN32_DLL and AC_LIBTOOL_RC. * src/Makefile.am [HAVE_W32_SYSTEM]: Use libtool, which simplifies From cvs at cvs.gnupg.org Thu Oct 20 16:32:39 2005 From: cvs at cvs.gnupg.org (svn author marcus) Date: Thu Oct 20 16:02:25 2005 Subject: [svn] dirmngr - r216 - in trunk: . doc Message-ID: Author: marcus Date: 2005-10-20 16:32:39 +0200 (Thu, 20 Oct 2005) New Revision: 216 Modified: trunk/ChangeLog trunk/doc/dirmngr.texi Log: 2005-10-20 Marcus Brinkmann * doc/dirmngr.texi: Fix direntry. Thanks to Rex Dieter. Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2005-09-28 22:08:10 UTC (rev 215) +++ trunk/ChangeLog 2005-10-20 14:32:39 UTC (rev 216) @@ -1,3 +1,7 @@ +2005-10-20 Marcus Brinkmann + + * doc/dirmngr.texi: Fix direntry. Thanks to Rex Dieter. + 2005-09-28 Marcus Brinkmann * configure.ac: Change -Wformat-noliteral to -Wformat-nonliteral. Modified: trunk/doc/dirmngr.texi =================================================================== --- trunk/doc/dirmngr.texi 2005-09-28 22:08:10 UTC (rev 215) +++ trunk/doc/dirmngr.texi 2005-10-20 14:32:39 UTC (rev 216) @@ -19,7 +19,7 @@ Copyright @copyright{} 2002 Klarälvdalens Datakonsult AB -Copyright @copyright{} 2004 g10 Code GmbH +Copyright @copyright{} 2004, 2005 g10 Code GmbH @quotation Permission is granted to copy, distribute and/or modify this document @@ -32,8 +32,8 @@ @dircategory GNU Utilities @direntry -* dirmngr: (gnupg). X.509 CRL and OCSP server. -* dirmngr-client: (gnupg). X.509 CRL and OCSP client. +* dirmngr: (dirmngr). X.509 CRL and OCSP server. +* dirmngr-client: (dirmngr). X.509 CRL and OCSP client. @end direntry @c @@ -874,7 +874,7 @@ @itemize @item Using DirMngr, 2002, Steffen Hansen, Klarälvdalens Datakonsult AB. -@item Using DirMngr, 2004, Werner Koch, g10 Code GmbH. +@item Using DirMngr, 2004, 2005 Werner Koch, g10 Code GmbH. @end itemize From cvs at cvs.gnupg.org Thu Oct 20 21:21:30 2005 From: cvs at cvs.gnupg.org (svn author marcus) Date: Thu Oct 20 20:51:14 2005 Subject: [svn] gpgme - r1131 - trunk/gpgme Message-ID: Author: marcus Date: 2005-10-20 21:21:30 +0200 (Thu, 20 Oct 2005) New Revision: 1131 Modified: trunk/gpgme/ChangeLog trunk/gpgme/Makefile.am Log: 2005-10-20 Marcus Brinkmann * Makefile.am: Build versioninfo.lo, not versioninfo.o. Also, fix the whole mess. Modified: trunk/gpgme/ChangeLog =================================================================== --- trunk/gpgme/ChangeLog 2005-10-20 13:32:48 UTC (rev 1130) +++ trunk/gpgme/ChangeLog 2005-10-20 19:21:30 UTC (rev 1131) @@ -1,3 +1,8 @@ +2005-10-20 Marcus Brinkmann + + * Makefile.am: Build versioninfo.lo, not versioninfo.o. Also, fix + the whole mess. + 2005-10-16 Marcus Brinkmann * rungpg.c (gpg_edit): Don't add a key argument if in card edit Modified: trunk/gpgme/Makefile.am =================================================================== --- trunk/gpgme/Makefile.am 2005-10-20 13:32:48 UTC (rev 1130) +++ trunk/gpgme/Makefile.am 2005-10-20 19:21:30 UTC (rev 1131) @@ -96,21 +96,21 @@ `echo $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) | \ sed -e 's/-I/--include-dir /g;s/-D/--define /g'` -%.o : %.rc +%.lo : %.rc $(LTRCCOMPILE) -i $< -o $@ -gpgme_res = versioninfo.o -gpgme_res_ldflag = -Wl,$(gpgme_res) +gpgme_res = versioninfo.lo +gpgme_res_ldflag = -Wl,.libs/versioninfo.o no_undefined = -no-undefined export_symbols = -export-symbols $(srcdir)/gpgme.def install-def-file: - $(INSTALL) gpg-error.def $(DESTDIR)$(libdir)/gpgme.def + $(INSTALL) $(srcdir)/gpgme.def $(DESTDIR)$(libdir)/gpgme.def uninstall-def-file: -rm $(DESTDIR)$(libdir)/gpgme.def -libgpgme_la_DEPENDENCIES = $(gpgme_res) gpgme.def +gpgme_deps = $(gpgme_res) gpgme.def else gpgme_res = @@ -120,13 +120,14 @@ install-def-file: uninstall-def-file: +gpgme_deps = endif libgpgme_la_LDFLAGS = $(gpgme_res_ldflag) $(no_undefined) $(export_symbols) \ $(libgpgme_version_script_cmd) -version-info \ @LIBGPGME_LT_CURRENT@:@LIBGPGME_LT_REVISION@:@LIBGPGME_LT_AGE@ libgpgme_la_DEPENDENCIES = libgpgme-real.la $(assuan_libobjs) \ - @LTLIBOBJS@ $(srcdir)/libgpgme.vers + @LTLIBOBJS@ $(srcdir)/libgpgme.vers $(gpgme_deps) libgpgme_la_LIBADD = libgpgme-real.la $(assuan_libobjs) @LTLIBOBJS@ \ @GPG_ERROR_LIBS@ From cvs at cvs.gnupg.org Fri Oct 21 15:24:48 2005 From: cvs at cvs.gnupg.org (svn author marcus) Date: Fri Oct 21 14:54:28 2005 Subject: [svn] GPGol - r121 - in trunk: . m4 src Message-ID: Author: marcus Date: 2005-10-21 15:24:47 +0200 (Fri, 21 Oct 2005) New Revision: 121 Added: trunk/m4/gpg-error.m4 Modified: trunk/ChangeLog trunk/configure.ac trunk/src/ChangeLog trunk/src/Makefile.am Log: 2005-10-21 Marcus Brinkmann * m4/gpg-error.m4: New file. * configure.ac: Also check for gpg-error. src/ 2005-10-21 Marcus Brinkmann * Makefile.am (libgpgme.a, libgpgme.a): New targets. (gpgol_DEPENDENCIES): Add libgpgme.a and libgpg-error.a. (clean-local): Likewise. (gpgol_LDADD): Link to these local versions statically. Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2005-10-20 13:15:59 UTC (rev 120) +++ trunk/ChangeLog 2005-10-21 13:24:47 UTC (rev 121) @@ -1,3 +1,8 @@ +2005-10-21 Marcus Brinkmann + + * m4/gpg-error.m4: New file. + * configure.ac: Also check for gpg-error. + 2005-10-06 Marcus Brinkmann * configure.ac: Change AC_CONFIG_SRCDIR argument to src/gpgol.def. Modified: trunk/configure.ac =================================================================== --- trunk/configure.ac 2005-10-20 13:15:59 UTC (rev 120) +++ trunk/configure.ac 2005-10-21 13:24:47 UTC (rev 121) @@ -133,9 +133,9 @@ AM_PATH_GPGME("$NEED_GPGME_API:$NEED_GPGME_VERSION", have_gpgme=yes,have_gpgme=no) +AM_PATH_GPG_ERROR(0.5,, AC_MSG_ERROR([libgpg-error was not found])) - # Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS(string.h unistd.h langinfo.h termio.h locale.h) Added: trunk/m4/gpg-error.m4 =================================================================== --- trunk/m4/gpg-error.m4 2005-10-20 13:15:59 UTC (rev 120) +++ trunk/m4/gpg-error.m4 2005-10-21 13:24:47 UTC (rev 121) @@ -0,0 +1,65 @@ +# gpg-error.m4 - autoconf macro to detect libgpg-error. +# Copyright (C) 2002, 2003, 2004 g10 Code GmbH +# +# This file is free software; as a special exception the author gives +# unlimited permission to copy and/or distribute it, with or without +# modifications, as long as this notice is preserved. +# +# This file is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +dnl AM_PATH_GPG_ERROR([MINIMUM-VERSION, +dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]]) +dnl Test for libgpg-error and define GPG_ERROR_CFLAGS and GPG_ERROR_LIBS +dnl +AC_DEFUN([AM_PATH_GPG_ERROR], +[ AC_ARG_WITH(gpg-error-prefix, + AC_HELP_STRING([--with-gpg-error-prefix=PFX], + [prefix where GPG Error is installed (optional)]), + gpg_error_config_prefix="$withval", gpg_error_config_prefix="") + if test x$gpg_error_config_prefix != x ; then + if test x${GPG_ERROR_CONFIG+set} != xset ; then + GPG_ERROR_CONFIG=$gpg_error_config_prefix/bin/gpg-error-config + fi + fi + + AC_PATH_PROG(GPG_ERROR_CONFIG, gpg-error-config, no) + min_gpg_error_version=ifelse([$1], ,0.0,$1) + AC_MSG_CHECKING(for GPG Error - version >= $min_gpg_error_version) + ok=no + if test "$GPG_ERROR_CONFIG" != "no" ; then + req_major=`echo $min_gpg_error_version | \ + sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\1/'` + req_minor=`echo $min_gpg_error_version | \ + sed 's/\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` + gpg_error_config_version=`$GPG_ERROR_CONFIG $gpg_error_config_args --version` + major=`echo $gpg_error_config_version | \ + sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` + minor=`echo $gpg_error_config_version | \ + sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'` + if test "$major" -gt "$req_major"; then + ok=yes + else + if test "$major" -eq "$req_major"; then + if test "$minor" -ge "$req_minor"; then + ok=yes + fi + fi + fi + fi + if test $ok = yes; then + GPG_ERROR_CFLAGS=`$GPG_ERROR_CONFIG $gpg_error_config_args --cflags` + GPG_ERROR_LIBS=`$GPG_ERROR_CONFIG $gpg_error_config_args --libs` + AC_MSG_RESULT(yes) + ifelse([$2], , :, [$2]) + else + GPG_ERROR_CFLAGS="" + GPG_ERROR_LIBS="" + AC_MSG_RESULT(no) + ifelse([$3], , :, [$3]) + fi + AC_SUBST(GPG_ERROR_CFLAGS) + AC_SUBST(GPG_ERROR_LIBS) +]) + Modified: trunk/src/ChangeLog =================================================================== --- trunk/src/ChangeLog 2005-10-20 13:15:59 UTC (rev 120) +++ trunk/src/ChangeLog 2005-10-21 13:24:47 UTC (rev 121) @@ -1,3 +1,10 @@ +2005-10-21 Marcus Brinkmann + + * Makefile.am (libgpgme.a, libgpgme.a): New targets. + (gpgol_DEPENDENCIES): Add libgpgme.a and libgpg-error.a. + (clean-local): Likewise. + (gpgol_LDADD): Link to these local versions statically. + 2005-10-20 Marcus Brinkmann * mapi32.def: New file. @@ -8,6 +15,10 @@ 2005-10-06 Marcus Brinkmann + * Makefile.am (gpgol_DEPENDENCIES): New variable. + (libmapi32.a): New target. + (gpgol_LDADD): Replace mapi32.dll with "-L . -lmapi32". + * Makefile.am (gpgol_LDADD): Prefix gpgol.def and mapi32.dll with $(srcdir). Modified: trunk/src/Makefile.am =================================================================== --- trunk/src/Makefile.am 2005-10-20 13:15:59 UTC (rev 120) +++ trunk/src/Makefile.am 2005-10-21 13:24:47 UTC (rev 121) @@ -49,16 +49,22 @@ # W32API 3.2 comes with an unusable libmapi32.a. We build our own # version. Note the omission of -k (--kill-at) from the DLLTOOL # command line. -gpgol_DEPENDENCIES = libmapi32.a +gpgol_DEPENDENCIES = libmapi32.a libgpgme.a libgpg-error.a libmapi32.a: mapi32.def $(DLLTOOL) --output-lib $@ --def $< +libgpgme.a: + ln -s $(shell $(GPGME_CONFIG) --prefix)/lib/libgpgme.a + +libgpg-error.a: + ln -s $(shell $(GPG_ERROR_CONFIG) --prefix)/lib/libgpg-error.a + clean-local: - rm -f libmapi32.a + rm -f libmapi32.a libgpgme.a libgpg-error.a gpgol_LDADD = $(srcdir)/gpgol.def \ - $(GPGME_LIBS) -L . -lmapi32 -lshell32 -lgdi32 -lcomdlg32 + -L . -lgpgme -lgpg-error -lmapi32 -lshell32 -lgdi32 -lcomdlg32 resource.o: resource.rc versioninfo.rc gpgol-rsrcs.rc olflange-rsrcs.rc From cvs at cvs.gnupg.org Fri Oct 21 17:03:19 2005 From: cvs at cvs.gnupg.org (svn author dshaw) Date: Fri Oct 21 16:33:03 2005 Subject: [svn] GnuPG - r3914 - trunk/m4 Message-ID: Author: dshaw Date: 2005-10-21 17:03:18 +0200 (Fri, 21 Oct 2005) New Revision: 3914 Modified: trunk/m4/ChangeLog trunk/m4/readline.m4 Log: * readline.m4: Check for rl_completion_func_t and rl_completion_matches. Modified: trunk/m4/ChangeLog =================================================================== --- trunk/m4/ChangeLog 2005-10-18 17:41:20 UTC (rev 3913) +++ trunk/m4/ChangeLog 2005-10-21 15:03:18 UTC (rev 3914) @@ -1,3 +1,8 @@ +2005-10-21 David Shaw + + * readline.m4: Check for rl_completion_func_t and + rl_completion_matches. + 2005-08-05 David Shaw * ldap.m4: If a PATH is given to --with-ldap, bias directory Modified: trunk/m4/readline.m4 =================================================================== --- trunk/m4/readline.m4 2005-10-18 17:41:20 UTC (rev 3913) +++ trunk/m4/readline.m4 2005-10-21 15:03:18 UTC (rev 3914) @@ -1,5 +1,5 @@ dnl Check for readline and dependencies -dnl Copyright (C) 2004 Free Software Foundation, Inc. +dnl Copyright (C) 2004, 2005 Free Software Foundation, Inc. dnl dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General @@ -35,10 +35,12 @@ #include #include ],[ +rl_completion_func_t *completer; add_history("foobar"); rl_catch_signals=0; rl_inhibit_completion=0; rl_attempted_completion_function=NULL; +rl_completion_matches(NULL,NULL); ]),_found_readline=yes,_found_readline=no) AC_MSG_RESULT([$_found_readline]) From cvs at cvs.gnupg.org Fri Oct 21 18:18:08 2005 From: cvs at cvs.gnupg.org (svn author wk) Date: Fri Oct 21 17:47:47 2005 Subject: [svn] gpgme - r1132 - trunk/gpgme Message-ID: Author: wk Date: 2005-10-21 18:18:08 +0200 (Fri, 21 Oct 2005) New Revision: 1132 Modified: trunk/gpgme/Makefile.am Log: fixed c+p error and a typo Modified: trunk/gpgme/Makefile.am =================================================================== --- trunk/gpgme/Makefile.am 2005-10-20 19:21:30 UTC (rev 1131) +++ trunk/gpgme/Makefile.am 2005-10-21 16:18:08 UTC (rev 1132) @@ -101,6 +101,7 @@ gpgme_res = versioninfo.lo gpgme_res_ldflag = -Wl,.libs/versioninfo.o + no_undefined = -no-undefined export_symbols = -export-symbols $(srcdir)/gpgme.def @@ -152,5 +153,5 @@ $(srcdir)/mkstatus < $(srcdir)/gpgme.h > status-table.h install-data-local: install-def-file - + uninstall-local: uninstall-def-file From cvs at cvs.gnupg.org Sat Oct 22 14:39:28 2005 From: cvs at cvs.gnupg.org (svn author marcus) Date: Sat Oct 22 14:09:02 2005 Subject: [svn] GPGol - r122 - trunk/src Message-ID: Author: marcus Date: 2005-10-22 14:39:27 +0200 (Sat, 22 Oct 2005) New Revision: 122 Modified: trunk/src/Makefile.am Log: Add comment about the static library situation. Modified: trunk/src/Makefile.am =================================================================== --- trunk/src/Makefile.am 2005-10-21 13:24:47 UTC (rev 121) +++ trunk/src/Makefile.am 2005-10-22 12:39:27 UTC (rev 122) @@ -48,7 +48,10 @@ # W32API 3.2 comes with an unusable libmapi32.a. We build our own # version. Note the omission of -k (--kill-at) from the DLLTOOL -# command line. +# command line. We also create our own virtual copies to the _static_ +# versions of GPGME and gpg-error, because we want to link to them +# statically, and not dynamically (otherwise Outlook would not find +# them). gpgol_DEPENDENCIES = libmapi32.a libgpgme.a libgpg-error.a libmapi32.a: mapi32.def From cvs at cvs.gnupg.org Sun Oct 23 22:01:05 2005 From: cvs at cvs.gnupg.org (svn author marcus) Date: Sun Oct 23 21:30:32 2005 Subject: [svn] gpg-error - r147 - in trunk: . src Message-ID: Author: marcus Date: 2005-10-23 22:01:04 +0200 (Sun, 23 Oct 2005) New Revision: 147 Added: trunk/src/init.c Modified: trunk/ChangeLog trunk/NEWS trunk/src/Makefile.am trunk/src/gpg-error.c trunk/src/gpg-error.def trunk/src/gpg-error.h.in Log: 2005-10-23 Marcus Brinkmann * src/Makefile.am (libgpg_error_la_SOURCES): Add init.c. * src/init.c: New file. * src/gpg-error.h.in (gpg_error_init): New function. * src/gpg-error.def: Add gpg_err_init. * src/gpg-error.c: Remove SIMPLE_GETTEXT stuff. (i18n_init): Don't bind text domain. (main): Call gpg_err_init. Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2005-10-20 12:52:39 UTC (rev 146) +++ trunk/ChangeLog 2005-10-23 20:01:04 UTC (rev 147) @@ -1,3 +1,13 @@ +2005-10-23 Marcus Brinkmann + + * src/Makefile.am (libgpg_error_la_SOURCES): Add init.c. + * src/init.c: New file. + * src/gpg-error.h.in (gpg_error_init): New function. + * src/gpg-error.def: Add gpg_err_init. + * src/gpg-error.c: Remove SIMPLE_GETTEXT stuff. + (i18n_init): Don't bind text domain. + (main): Call gpg_err_init. + 2005-10-20 Marcus Brinkmann * configure.ac: Instead checking for windres and dlltool, invoke Modified: trunk/NEWS =================================================================== --- trunk/NEWS 2005-10-20 12:52:39 UTC (rev 146) +++ trunk/NEWS 2005-10-23 20:01:04 UTC (rev 147) @@ -1,6 +1,9 @@ Noteworthy changes in version 1.2 (unreleased) ---------------------------------------------- + * New function gpg_err_init, which binds the locale directory to + the text domain. + * "./autogen.sh --build-w32" does now also build a DLL for W32. Translations are not yet provided for this platform. @@ -15,6 +18,7 @@ GPG_ERR_UNKNOWN_EXTN NEW GPG_ERR_UNKNOWN_CRIT_EXTN NEW GPG_ERR_LOCKED NEW +gpg_err_init NEW ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Noteworthy changes in version 1.1 (2005-06-20) Modified: trunk/src/Makefile.am =================================================================== --- trunk/src/Makefile.am 2005-10-20 12:52:39 UTC (rev 146) +++ trunk/src/Makefile.am 2005-10-23 20:01:04 UTC (rev 147) @@ -85,12 +85,11 @@ $(no_undefined) $(export_symbols) libgpg_error_la_SOURCES = gpg-error.h gettext.h \ - strsource.c strerror.c code-to-errno.c code-from-errno.c - + init.c strsource.c strerror.c code-to-errno.c code-from-errno.c +libgpg_error_la_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\" libgpg_error_la_LIBADD = @LTLIBINTL@ gpg_error_SOURCES = strsource-sym.c strerror-sym.c gpg-error.c -gpg_error_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\" gpg_error_LDADD = ./libgpg-error.la err-sources.h: Makefile mkstrtable.awk err-sources.h.in Modified: trunk/src/gpg-error.c =================================================================== --- trunk/src/gpg-error.c 2005-10-20 12:52:39 UTC (rev 146) +++ trunk/src/gpg-error.c 2005-10-23 20:01:04 UTC (rev 147) @@ -29,28 +29,21 @@ #include #include -#ifdef USE_SIMPLE_GETTEXT - int set_gettext_file( const char *filename ); - const char *gettext( const char *msgid ); +#ifdef HAVE_LOCALE_H +# include +#endif +#ifdef ENABLE_NLS +# include # define _(a) gettext (a) -# define N_(a) (a) -#else -# ifdef HAVE_LOCALE_H -# include -# endif -# ifdef ENABLE_NLS -# include -# define _(a) gettext (a) -# ifdef gettext_noop -# define N_(a) gettext_noop (a) -# else -# define N_(a) (a) -# endif +# ifdef gettext_noop +# define N_(a) gettext_noop (a) # else -# define _(a) (a) # define N_(a) (a) # endif -#endif /*!USE_SIMPLE_GETTEXT*/ +#else +# define _(a) (a) +# define N_(a) (a) +#endif #include @@ -249,22 +242,21 @@ static void -i18n_init(void) +i18n_init (void) { -#ifdef USE_SIMPLE_GETTEXT - set_gettext_file (PACKAGE); -#else -# ifdef ENABLE_NLS -# ifdef HAVE_LC_MESSAGES +#ifdef ENABLE_NLS +# ifdef HAVE_LC_MESSAGES setlocale (LC_TIME, ""); setlocale (LC_MESSAGES, ""); -# else +# else setlocale (LC_ALL, "" ); -# endif - bindtextdomain (PACKAGE, LOCALEDIR); - textdomain (PACKAGE); # endif #endif + + /* We have the same text domain as the library. Thus, we don't need + to bind our text domain to our locale directory (this is done by + gpg_err_init). We just need to set our text domain. */ + textdomain (PACKAGE); } @@ -273,9 +265,10 @@ { int i = 1; - /* Setup I18N. */ - i18n_init(); + gpg_err_init (); + i18n_init (); + if (argc == 1) { fprintf (stderr, _("Usage: %s GPG-ERROR [...]\n"), argv[0]); Modified: trunk/src/gpg-error.def =================================================================== --- trunk/src/gpg-error.def 2005-10-20 12:52:39 UTC (rev 146) +++ trunk/src/gpg-error.def 2005-10-23 20:01:04 UTC (rev 147) @@ -5,4 +5,4 @@ gpg_strsource @3 gpg_err_code_from_errno @4 gpg_err_code_to_errno @5 - + gpg_err_init @6 Modified: trunk/src/gpg-error.h.in =================================================================== --- trunk/src/gpg-error.h.in 2005-10-20 12:52:39 UTC (rev 146) +++ trunk/src/gpg-error.h.in 2005-10-23 20:01:04 UTC (rev 147) @@ -114,6 +114,12 @@ #define GPG_ERR_SOURCE_SHIFT 24 +/* Initialization function. */ + +/* Initialize the library. This function should be run early. */ +gpg_error_t gpg_err_init (void); + + /* Constructor and accessor functions. */ /* Construct an error value from an error code and source. Within a @@ -209,4 +215,5 @@ } #endif + #endif /* GPG_ERROR_H */ Added: trunk/src/init.c =================================================================== --- trunk/src/init.c 2005-10-20 12:52:39 UTC (rev 146) +++ trunk/src/init.c 2005-10-23 20:01:04 UTC (rev 147) @@ -0,0 +1,224 @@ +/* init.c - Initialize the GnuPG error library. + Copyright (C) 2005 g10 Code GmbH + + This file is part of libgpg-error. + + libgpg-error 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. + + libgpg-error 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 libgpg-error; if not, write to the Free + Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. */ + +#if HAVE_CONFIG_H +#include +#endif + +#include +#include +#include +#include + +#include + +#include "gettext.h" + + +/* Locale directory support. */ + +#if HAVE_W32_SYSTEM +/* The implementation follows below. */ +static char *get_locale_dir (void); +static void drop_locale_dir (char *locale_dir); +#else +#define get_locale_dir() LOCALEDIR +#define drop_locale_dir(dir) +#endif + + +/* Initialize the library. This function should be run early. */ +gpg_error_t +gpg_err_init (void) +{ + char *locale_dir; + + /* We only have to bind our locale directory to our text domain. */ + + locale_dir = get_locale_dir (); + if (locale_dir) + { + bindtextdomain (PACKAGE, locale_dir); + drop_locale_dir (locale_dir); + } + + return 0; +} + + + +#ifdef HAVE_W32_SYSTEM + +#include + +static HKEY +get_root_key(const char *root) +{ + HKEY root_key; + + if( !root ) + root_key = HKEY_CURRENT_USER; + else if( !strcmp( root, "HKEY_CLASSES_ROOT" ) ) + root_key = HKEY_CLASSES_ROOT; + else if( !strcmp( root, "HKEY_CURRENT_USER" ) ) + root_key = HKEY_CURRENT_USER; + else if( !strcmp( root, "HKEY_LOCAL_MACHINE" ) ) + root_key = HKEY_LOCAL_MACHINE; + else if( !strcmp( root, "HKEY_USERS" ) ) + root_key = HKEY_USERS; + else if( !strcmp( root, "HKEY_PERFORMANCE_DATA" ) ) + root_key = HKEY_PERFORMANCE_DATA; + else if( !strcmp( root, "HKEY_CURRENT_CONFIG" ) ) + root_key = HKEY_CURRENT_CONFIG; + else + return NULL; + return root_key; +} + +/**************** + * Return a string from the Win32 Registry or NULL in case of + * error. Caller must release the return value. A NULL for root + * is an alias for HKEY_CURRENT_USER, HKEY_LOCAL_MACHINE in turn. + * NOTE: The value is allocated with a plain malloc() - use free() and not + * the usual xfree()!!! + */ +static char * +read_w32_registry_string( const char *root, const char *dir, const char *name ) +{ + HKEY root_key, key_handle; + DWORD n1, nbytes, type; + char *result = NULL; + + if ( !(root_key = get_root_key(root) ) ) + return NULL; + + if( RegOpenKeyEx( root_key, dir, 0, KEY_READ, &key_handle ) ) + { + if (root) + return NULL; /* no need for a RegClose, so return direct */ + /* It seems to be common practise to fall back to HKLM. */ + if (RegOpenKeyEx (HKEY_LOCAL_MACHINE, dir, 0, KEY_READ, &key_handle) ) + return NULL; /* still no need for a RegClose, so return direct */ + } + + nbytes = 1; + if( RegQueryValueEx( key_handle, name, 0, NULL, NULL, &nbytes ) ) { + if (root) + goto leave; + /* Try to fallback to HKLM also vor a missing value. */ + RegCloseKey (key_handle); + if (RegOpenKeyEx (HKEY_LOCAL_MACHINE, dir, 0, KEY_READ, &key_handle) ) + return NULL; /* Nope. */ + if (RegQueryValueEx( key_handle, name, 0, NULL, NULL, &nbytes)) + goto leave; + } + result = malloc( (n1=nbytes+1) ); + if( !result ) + goto leave; + if( RegQueryValueEx( key_handle, name, 0, &type, result, &n1 ) ) { + free(result); result = NULL; + goto leave; + } + result[nbytes] = 0; /* make sure it is really a string */ + if (type == REG_EXPAND_SZ && strchr (result, '%')) { + char *tmp; + + n1 += 1000; + tmp = malloc (n1+1); + if (!tmp) + goto leave; + nbytes = ExpandEnvironmentStrings (result, tmp, n1); + if (nbytes && nbytes > n1) { + free (tmp); + n1 = nbytes; + tmp = malloc (n1 + 1); + if (!tmp) + goto leave; + nbytes = ExpandEnvironmentStrings (result, tmp, n1); + if (nbytes && nbytes > n1) { + free (tmp); /* oops - truncated, better don't expand at all */ + goto leave; + } + tmp[nbytes] = 0; + free (result); + result = tmp; + } + else if (nbytes) { /* okay, reduce the length */ + tmp[nbytes] = 0; + free (result); + result = malloc (strlen (tmp)+1); + if (!result) + result = tmp; + else { + strcpy (result, tmp); + free (tmp); + } + } + else { /* error - don't expand */ + free (tmp); + } + } + + leave: + RegCloseKey( key_handle ); + return result; +} + + +#define REGKEY "Software\\GNU\\GnuPG" + +static char * +get_locale_dir (void) +{ + char *instdir; + char *p; + char *dname; + + instdir = read_w32_registry_string ("HKEY_LOCAL_MACHINE", REGKEY, + "Install Directory"); + if (!instdir) + return; + + /* Build the key: "/share/locale". */ +#define SLDIR "\\share\\locale" + dname = malloc (strlen (instdir) + strlen (SLDIR) + 1); + if (!dname) + { + free (instdir); + return; + } + p = dname; + strcpy (p, instdir); + p += strlen (instdir); + strcpy (p, SLDIR); + + free (instdir); + + return dname; +} + + +static void +drop_locale_dir (char *locale_dir) +{ + free (locale_dir); +} + +#endif /* HAVE_W32_SYSTEM */ From cvs at cvs.gnupg.org Mon Oct 24 11:25:31 2005 From: cvs at cvs.gnupg.org (svn author wk) Date: Mon Oct 24 10:54:56 2005 Subject: [svn] assuan - r194 - in trunk: . doc src Message-ID: Author: wk Date: 2005-10-24 11:25:25 +0200 (Mon, 24 Oct 2005) New Revision: 194 Added: trunk/COPYING.LESSER trunk/README.SVN Removed: trunk/README.CVS Modified: trunk/ChangeLog trunk/Makefile.am trunk/NEWS trunk/README trunk/configure.ac trunk/doc/Makefile.am trunk/doc/assuan.texi trunk/doc/gpl.texi trunk/doc/lgpl.texi trunk/doc/mdate-sh trunk/src/ChangeLog trunk/src/Makefile.am trunk/src/assuan-buffer.c trunk/src/assuan-client.c trunk/src/assuan-connect.c trunk/src/assuan-defs.h trunk/src/assuan-domain-connect.c trunk/src/assuan-domain-server.c trunk/src/assuan-handler.c trunk/src/assuan-inquire.c trunk/src/assuan-io.c trunk/src/assuan-listen.c trunk/src/assuan-logging.c trunk/src/assuan-pipe-connect.c trunk/src/assuan-pipe-server.c trunk/src/assuan-socket-connect.c trunk/src/assuan-socket-server.c trunk/src/assuan-socket.c trunk/src/assuan-util.c trunk/src/assuan.h trunk/src/funopen.c trunk/src/isascii.c trunk/src/memrchr.c trunk/src/mkerrors trunk/src/putc_unlocked.c trunk/src/setenv.c trunk/src/stpcpy.c Log: Fixed and clarified copyright notices Added: trunk/COPYING.LESSER =================================================================== --- trunk/COPYING.LESSER 2005-10-08 00:25:12 UTC (rev 193) +++ trunk/COPYING.LESSER 2005-10-24 09:25:25 UTC (rev 194) @@ -0,0 +1,504 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This library 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. + + This library 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 library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! + + Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2005-10-08 00:25:12 UTC (rev 193) +++ trunk/ChangeLog 2005-10-24 09:25:25 UTC (rev 194) @@ -1,3 +1,9 @@ +2005-10-24 Werner Koch + + * COPYING.LESSER: Added. + * README.CVS: Renamed to .. + * README.SVN: .. this. + 2005-10-08 Marcus Brinkmann * configure.ac: Check for socket library and add it to Modified: trunk/Makefile.am =================================================================== --- trunk/Makefile.am 2005-10-08 00:25:12 UTC (rev 193) +++ trunk/Makefile.am 2005-10-24 09:25:25 UTC (rev 194) @@ -1,5 +1,6 @@ SUBDIRS = src doc ACLOCAL_AMFLAGS = -I m4 +AUTOMAKE_OPTIONS = dist-bzip2 -EXTRA_DIST = config.rpath config.rpath autogen.sh README.CVS +EXTRA_DIST = config.rpath config.rpath autogen.sh README.SVN Modified: trunk/NEWS =================================================================== --- trunk/NEWS 2005-10-08 00:25:12 UTC (rev 193) +++ trunk/NEWS 2005-10-24 09:25:25 UTC (rev 194) @@ -4,7 +4,9 @@ * Internal cleanups to make inclusion of the code into libraries easier. + * Made clear that the software is under the LGPL. + Noteworthy changes in version 0.6.10 (2005-06-20) ------------------------------------------------- Modified: trunk/README =================================================================== --- trunk/README 2005-10-08 00:25:12 UTC (rev 193) +++ trunk/README 2005-10-24 09:25:25 UTC (rev 194) @@ -8,4 +8,8 @@ It is currently not intended to be used as a shared library. +See COPYING.LESSER on how to share, modify and distribute the +software itself and COPYING for the documentation. + + Deleted: trunk/README.CVS Copied: trunk/README.SVN (from rev 193, trunk/README.CVS) =================================================================== --- trunk/README.CVS 2005-10-08 00:25:12 UTC (rev 193) +++ trunk/README.SVN 2005-10-24 09:25:25 UTC (rev 194) @@ -0,0 +1,51 @@ +If you are building from Subversion, run the script + +./autogen.sh + +first, to make sure that you have all the necessary maintainer tools +are installed and to build the actual configuration files. Then run + +./configure --enable-maintainer-mode + +followed by the usual make. + +If autogen.sh complains about insufficient versions of the required +tools, or the tools are not installed, you may use environment +variables to override the default tool names: + + AUTOMAKE_SUFFIX is used as a suffix for all tools from the automake + package. For example + AUTOMAKE_SUFFIX="-1.7" ./autogen.sh + uses "automake-1.7" and "aclocal-1.7. + AUTOMAKE_PREFIX is used as a prefix for all tools from the automake + page and may be combined with AUTOMAKE_SUFFIX. e.g.: + AUTOMAKE_PREFIX=/usr/foo/bin ./autogen.sh + uses "automake" and "aclocal" in the /usr/foo/bin + directory. + AUTOCONF_SUFFIX is used as a suffix for all tools from the automake + package + AUTOCONF_PREFIX is used as a prefix for all tools from the automake + package + GETTEXT_SUFFIX is used as a suffix for all tools from the gettext + package + GETTEXT_PREFIX is used as a prefix for all tools from the gettext + package + +It is also possible to use the variable name AUTOMAKE, AUTOCONF, +ACLOCAL, AUTOHEADER, GETTEXT and MSGMERGE to directly specify the name +of the programs to run. It is however better to use the suffix and +prefix forms as described above because that does not require +knowledge about the actual tools used by autgen.sh. + + +Please don't use autopoint, libtoolize or autoreconf unless you are +the current maintainer and want to update the standard configuration +files. All those files should be in the repository and only updated +manually if the maintainer decides that newer versions are required. +The maintainer should also make sure that the required version of +automake et al. are properly indicated at the top of configure.ac and +take care to copy the files and not merely use symlinks. + + + + Modified: trunk/configure.ac =================================================================== --- trunk/configure.ac 2005-10-08 00:25:12 UTC (rev 193) +++ trunk/configure.ac 2005-10-24 09:25:25 UTC (rev 194) @@ -15,7 +15,7 @@ # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA # Process this file with autoconf to produce a configure script. AC_PREREQ(2.59) Modified: trunk/doc/Makefile.am =================================================================== --- trunk/doc/Makefile.am 2005-10-08 00:25:12 UTC (rev 193) +++ trunk/doc/Makefile.am 2005-10-24 09:25:25 UTC (rev 194) @@ -15,7 +15,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA ## Process this file with automake to produce Makefile.in Modified: trunk/doc/assuan.texi =================================================================== --- trunk/doc/assuan.texi 2005-10-08 00:25:12 UTC (rev 193) +++ trunk/doc/assuan.texi 2005-10-24 09:25:25 UTC (rev 194) @@ -66,8 +66,8 @@ @cite{The `Developing with Assuan' Manual}, for Version @value{VERSION}. @sp 1 Published by the Free Software Foundation@* -59 Temple Place - Suite 330@* -Boston, MA 02111-1307 USA +51 Franklin Street, Fifth Floor@* +Boston, MA 02110-1301 USA @sp 1 @copyrightnotice{} @sp 1 Modified: trunk/doc/gpl.texi =================================================================== --- trunk/doc/gpl.texi 2005-10-08 00:25:12 UTC (rev 193) +++ trunk/doc/gpl.texi 2005-10-24 09:25:25 UTC (rev 194) @@ -6,7 +6,7 @@ @display Copyright @copyright{} 1989, 1991 Free Software Foundation, Inc. -59 Temple Place -- Suite 330, Boston, MA 02111-1307, USA +59 Temple Place -- Suite 330, Boston, MA 02110-1301, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. @@ -352,7 +352,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., -59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. +59 Temple Place, Suite 330, Boston, MA 02110-1301, USA. @end smallexample Also add information on how to contact you by electronic and paper mail. Modified: trunk/doc/lgpl.texi =================================================================== --- trunk/doc/lgpl.texi 2005-10-08 00:25:12 UTC (rev 193) +++ trunk/doc/lgpl.texi 2005-10-24 09:25:25 UTC (rev 194) @@ -6,7 +6,7 @@ @display Copyright @copyright{} 1991, 1999 Free Software Foundation, Inc. -59 Temple Place -- Suite 330, Boston, MA 02111-1307, USA +59 Temple Place -- Suite 330, Boston, MA 02110-1301, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. @@ -544,7 +544,7 @@ You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software -Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02110-1301, USA. @end smallexample Modified: trunk/doc/mdate-sh =================================================================== --- trunk/doc/mdate-sh 2005-10-08 00:25:12 UTC (rev 193) +++ trunk/doc/mdate-sh 2005-10-24 09:25:25 UTC (rev 194) @@ -18,7 +18,7 @@ # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a Modified: trunk/src/ChangeLog =================================================================== --- trunk/src/ChangeLog 2005-10-08 00:25:12 UTC (rev 193) +++ trunk/src/ChangeLog 2005-10-24 09:25:25 UTC (rev 194) @@ -1,3 +1,10 @@ +2005-10-24 Werner Koch + + * putc_unlocked.c, memrchr.c, isascii.c, funopen.c: Changed + distribution terms to LGPL. This are small and trivial files so + there are no obstacles of doing so. + * assuan-socket.c: Likewise, the stated GPL was not intended. + 2005-10-08 Marcus Brinkmann * assuan-defs.h (setenv, unsetenv, clearenv) [!HAVE_SETENV]: Modified: trunk/src/Makefile.am =================================================================== --- trunk/src/Makefile.am 2005-10-08 00:25:12 UTC (rev 193) +++ trunk/src/Makefile.am 2005-10-24 09:25:25 UTC (rev 194) @@ -15,7 +15,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA ## Process this file with automake to produce Makefile.in Modified: trunk/src/assuan-buffer.c =================================================================== --- trunk/src/assuan-buffer.c 2005-10-08 00:25:12 UTC (rev 193) +++ trunk/src/assuan-buffer.c 2005-10-24 09:25:25 UTC (rev 194) @@ -15,7 +15,8 @@ * * You should have received a copy of the GNU Lesser General Public * License along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + * USA. */ #include Modified: trunk/src/assuan-client.c =================================================================== --- trunk/src/assuan-client.c 2005-10-08 00:25:12 UTC (rev 193) +++ trunk/src/assuan-client.c 2005-10-24 09:25:25 UTC (rev 194) @@ -15,7 +15,8 @@ * * You should have received a copy of the GNU Lesser General Public * License along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + * USA. */ #include Modified: trunk/src/assuan-connect.c =================================================================== --- trunk/src/assuan-connect.c 2005-10-08 00:25:12 UTC (rev 193) +++ trunk/src/assuan-connect.c 2005-10-24 09:25:25 UTC (rev 194) @@ -15,7 +15,8 @@ * * You should have received a copy of the GNU Lesser General Public * License along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + * USA. */ #ifdef HAVE_CONFIG_H Modified: trunk/src/assuan-defs.h =================================================================== --- trunk/src/assuan-defs.h 2005-10-08 00:25:12 UTC (rev 193) +++ trunk/src/assuan-defs.h 2005-10-24 09:25:25 UTC (rev 194) @@ -15,7 +15,8 @@ * * You should have received a copy of the GNU Lesser General Public * License along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + * USA. */ #ifndef ASSUAN_DEFS_H Modified: trunk/src/assuan-domain-connect.c =================================================================== --- trunk/src/assuan-domain-connect.c 2005-10-08 00:25:12 UTC (rev 193) +++ trunk/src/assuan-domain-connect.c 2005-10-24 09:25:25 UTC (rev 194) @@ -15,7 +15,8 @@ * * You should have received a copy of the GNU Lesser General Public * License along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + * USA. */ #ifdef HAVE_CONFIG_H Modified: trunk/src/assuan-domain-server.c =================================================================== --- trunk/src/assuan-domain-server.c 2005-10-08 00:25:12 UTC (rev 193) +++ trunk/src/assuan-domain-server.c 2005-10-24 09:25:25 UTC (rev 194) @@ -15,7 +15,8 @@ * * You should have received a copy of the GNU Lesser General Public * License along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + * USA. */ #ifdef HAVE_CONFIG_H Modified: trunk/src/assuan-handler.c =================================================================== --- trunk/src/assuan-handler.c 2005-10-08 00:25:12 UTC (rev 193) +++ trunk/src/assuan-handler.c 2005-10-24 09:25:25 UTC (rev 194) @@ -15,7 +15,8 @@ * * You should have received a copy of the GNU Lesser General Public * License along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + * USA. */ #include Modified: trunk/src/assuan-inquire.c =================================================================== --- trunk/src/assuan-inquire.c 2005-10-08 00:25:12 UTC (rev 193) +++ trunk/src/assuan-inquire.c 2005-10-24 09:25:25 UTC (rev 194) @@ -15,7 +15,8 @@ * * You should have received a copy of the GNU Lesser General Public * License along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + * USA. */ #include Modified: trunk/src/assuan-io.c =================================================================== --- trunk/src/assuan-io.c 2005-10-08 00:25:12 UTC (rev 193) +++ trunk/src/assuan-io.c 2005-10-24 09:25:25 UTC (rev 194) @@ -15,7 +15,8 @@ * * You should have received a copy of the GNU Lesser General Public * License along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + * USA. */ #ifdef HAVE_CONFIG_H Modified: trunk/src/assuan-listen.c =================================================================== --- trunk/src/assuan-listen.c 2005-10-08 00:25:12 UTC (rev 193) +++ trunk/src/assuan-listen.c 2005-10-24 09:25:25 UTC (rev 194) @@ -15,7 +15,8 @@ * * You should have received a copy of the GNU Lesser General Public * License along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + * USA. */ #include Modified: trunk/src/assuan-logging.c =================================================================== --- trunk/src/assuan-logging.c 2005-10-08 00:25:12 UTC (rev 193) +++ trunk/src/assuan-logging.c 2005-10-24 09:25:25 UTC (rev 194) @@ -15,7 +15,8 @@ * * You should have received a copy of the GNU Lesser General Public * License along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + * USA. */ #ifdef HAVE_CONFIG_H Modified: trunk/src/assuan-pipe-connect.c =================================================================== --- trunk/src/assuan-pipe-connect.c 2005-10-08 00:25:12 UTC (rev 193) +++ trunk/src/assuan-pipe-connect.c 2005-10-24 09:25:25 UTC (rev 194) @@ -15,7 +15,8 @@ * * You should have received a copy of the GNU Lesser General Public * License along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + * USA. */ #ifdef HAVE_CONFIG_H Modified: trunk/src/assuan-pipe-server.c =================================================================== --- trunk/src/assuan-pipe-server.c 2005-10-08 00:25:12 UTC (rev 193) +++ trunk/src/assuan-pipe-server.c 2005-10-24 09:25:25 UTC (rev 194) @@ -15,7 +15,8 @@ * * You should have received a copy of the GNU Lesser General Public * License along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + * USA. */ #include Modified: trunk/src/assuan-socket-connect.c =================================================================== --- trunk/src/assuan-socket-connect.c 2005-10-08 00:25:12 UTC (rev 193) +++ trunk/src/assuan-socket-connect.c 2005-10-24 09:25:25 UTC (rev 194) @@ -15,7 +15,8 @@ * * You should have received a copy of the GNU Lesser General Public * License along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + * USA. */ #include Modified: trunk/src/assuan-socket-server.c =================================================================== --- trunk/src/assuan-socket-server.c 2005-10-08 00:25:12 UTC (rev 193) +++ trunk/src/assuan-socket-server.c 2005-10-24 09:25:25 UTC (rev 194) @@ -15,7 +15,8 @@ * * You should have received a copy of the GNU Lesser General Public * License along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + * USA. */ #include Modified: trunk/src/assuan-socket.c =================================================================== --- trunk/src/assuan-socket.c 2005-10-08 00:25:12 UTC (rev 193) +++ trunk/src/assuan-socket.c 2005-10-24 09:25:25 UTC (rev 194) @@ -1,22 +1,24 @@ /* assuan-socket.c - * Copyright (C) 2004 Free Software Foundation, Inc. + * Copyright (C) 2004, 2005 Free Software Foundation, Inc. * - * This file is part of GnuPG. + * This file is part of Assuan. * - * 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 2 of the License, or - * (at your option) any later version. + * Assuan 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. * - * GnuPG 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. + * Assuan 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 General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + * USA. */ + #include #include #ifdef HAVE_W32_SYSTEM Modified: trunk/src/assuan-util.c =================================================================== --- trunk/src/assuan-util.c 2005-10-08 00:25:12 UTC (rev 193) +++ trunk/src/assuan-util.c 2005-10-24 09:25:25 UTC (rev 194) @@ -15,7 +15,8 @@ * * You should have received a copy of the GNU Lesser General Public * License along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + * USA. */ #include Modified: trunk/src/assuan.h =================================================================== --- trunk/src/assuan.h 2005-10-08 00:25:12 UTC (rev 193) +++ trunk/src/assuan.h 2005-10-24 09:25:25 UTC (rev 194) @@ -15,7 +15,8 @@ * * You should have received a copy of the GNU Lesser General Public * License along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + * USA. */ #ifndef ASSUAN_H Modified: trunk/src/funopen.c =================================================================== --- trunk/src/funopen.c 2005-10-08 00:25:12 UTC (rev 193) +++ trunk/src/funopen.c 2005-10-24 09:25:25 UTC (rev 194) @@ -1,21 +1,22 @@ /* funopen.c - Replacement for funopen. - * Copyright (C) 2003 Free Software Foundation, Inc. + * Copyright (C) 2003, 2005 Free Software Foundation, Inc. * - * This file is part of GnuPG. + * This file is part of Assuan. * - * 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 2 of the License, or - * (at your option) any later version. + * Assuan 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. * - * GnuPG 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. + * Assuan 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 General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + * USA. */ #ifdef HAVE_CONFIG_H @@ -54,7 +55,7 @@ io.seek = seekfn; io.close = closefn; - return fopencookie (cookie, + return fopencookie (cookie, readfn ? ( writefn ? "rw" : "r" ) : ( writefn ? "w" : ""), io); } Modified: trunk/src/isascii.c =================================================================== --- trunk/src/isascii.c 2005-10-08 00:25:12 UTC (rev 193) +++ trunk/src/isascii.c 2005-10-24 09:25:25 UTC (rev 194) @@ -1,21 +1,22 @@ /* isascii.c - Replacement for isascii. - * Copyright (C) 2002 Free Software Foundation, Inc. + * Copyright (C) 2002, 2005 Free Software Foundation, Inc. * - * This file is part of GnuPG. + * This file is part of Assuan. * - * 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 2 of the License, or - * (at your option) any later version. + * Assuan 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. * - * GnuPG 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. + * Assuan 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 General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + * USA. */ #ifdef HAVE_CONFIG_H Modified: trunk/src/memrchr.c =================================================================== --- trunk/src/memrchr.c 2005-10-08 00:25:12 UTC (rev 193) +++ trunk/src/memrchr.c 2005-10-24 09:25:25 UTC (rev 194) @@ -1,21 +1,22 @@ /* memrchr.c - Replacement for memrchr. - * Copyright (C) 2002, 2004 Free Software Foundation, Inc. + * Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc. * - * This file is part of GnuPG. + * This file is part of Assuan. * - * 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 2 of the License, or - * (at your option) any later version. + * Assuan 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. * - * GnuPG 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. + * Assuan 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 General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA + * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, + * USA. */ #ifdef HAVE_CONFIG_H Modified: trunk/src/mkerrors =================================================================== --- trunk/src/mkerrors 2005-10-08 00:25:12 UTC (rev 193) +++ trunk/src/mkerrors 2005-10-24 09:25:25 UTC (rev 194) @@ -17,7 +17,7 @@ # # You should have received a copy of the GNU Lesser General Public # License along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA cat < Modified: trunk/src/stpcpy.c =================================================================== --- trunk/src/stpcpy.c 2005-10-08 00:25:12 UTC (rev 193) +++ trunk/src/stpcpy.c 2005-10-24 09:25:25 UTC (rev 194) @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU C Library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ + 02110-1301 USA. */ #ifdef HAVE_CONFIG_H # include From cvs at cvs.gnupg.org Mon Oct 24 11:54:00 2005 From: cvs at cvs.gnupg.org (svn author marcus) Date: Mon Oct 24 11:23:23 2005 Subject: [svn] gpgme - r1133 - trunk/gpgme Message-ID: Author: marcus Date: 2005-10-24 11:53:59 +0200 (Mon, 24 Oct 2005) New Revision: 1133 Modified: trunk/gpgme/ChangeLog trunk/gpgme/w32-io.c Log: 2005-10-24 Marcus Brinkmann * w32-io.c (_gpgme_io_spawn): Don't minimize window, hide it. Modified: trunk/gpgme/ChangeLog =================================================================== --- trunk/gpgme/ChangeLog 2005-10-21 16:18:08 UTC (rev 1132) +++ trunk/gpgme/ChangeLog 2005-10-24 09:53:59 UTC (rev 1133) @@ -1,3 +1,7 @@ +2005-10-24 Marcus Brinkmann + + * w32-io.c (_gpgme_io_spawn): Don't minimize window, hide it. + 2005-10-20 Marcus Brinkmann * Makefile.am: Build versioninfo.lo, not versioninfo.o. Also, fix Modified: trunk/gpgme/w32-io.c =================================================================== --- trunk/gpgme/w32-io.c 2005-10-21 16:18:08 UTC (rev 1132) +++ trunk/gpgme/w32-io.c 2005-10-24 09:53:59 UTC (rev 1133) @@ -843,7 +843,7 @@ memset (&si, 0, sizeof si); si.cb = sizeof (si); si.dwFlags = STARTF_USESTDHANDLES | STARTF_USESHOWWINDOW; - si.wShowWindow = debug_me? SW_SHOW : SW_MINIMIZE; + si.wShowWindow = debug_me? SW_SHOW : SW_HIDE; si.hStdInput = GetStdHandle (STD_INPUT_HANDLE); si.hStdOutput = GetStdHandle (STD_OUTPUT_HANDLE); si.hStdError = GetStdHandle (STD_ERROR_HANDLE); From cvs at cvs.gnupg.org Tue Oct 25 20:23:00 2005 From: cvs at cvs.gnupg.org (svn author marcus) Date: Tue Oct 25 19:52:16 2005 Subject: [svn] gpg-error - r148 - in trunk: . src Message-ID: Author: marcus Date: 2005-10-25 20:22:59 +0200 (Tue, 25 Oct 2005) New Revision: 148 Added: trunk/src/w32-gettext.c trunk/src/w32-gettext.h Modified: trunk/ChangeLog trunk/NEWS trunk/src/Makefile.am trunk/src/gettext.h trunk/src/gpg-error.c trunk/src/gpg-error.h.in Log: 2005-10-25 Marcus Brinkmann * src/Makefile.am (arch_sources): New variable. (libgpg_error_la_SOURCES): Add $(arch_sources). * src/gettext.h [HAVE_W32_SYSTEM]: Include w32-gettext.h. * src/w32-gettext.h: New file. * src/w32-gettext.c: New file. * src/gpg-error.h.in: Check for gcc's constructor attribute. Use it for gpg_err_init. (GPG_ERR_INITIALIZED): Define if constructor is available. * src/gpg-error.c (main) [GPG_ERR_INITIALIZED]: Don't invoke gpg_err_init. (i18n_init): Call bindtextdomain as well. Now that gpg-error has its own gettext implementation, we can't rely on it anymore. Also, repeat all the w32 stuff for fetching the registry. Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2005-10-23 20:01:04 UTC (rev 147) +++ trunk/ChangeLog 2005-10-25 18:22:59 UTC (rev 148) @@ -1,3 +1,19 @@ +2005-10-25 Marcus Brinkmann + + * src/Makefile.am (arch_sources): New variable. + (libgpg_error_la_SOURCES): Add $(arch_sources). + * src/gettext.h [HAVE_W32_SYSTEM]: Include w32-gettext.h. + * src/w32-gettext.h: New file. + * src/w32-gettext.c: New file. + * src/gpg-error.h.in: Check for gcc's constructor attribute. + Use it for gpg_err_init. + (GPG_ERR_INITIALIZED): Define if constructor is available. + * src/gpg-error.c (main) [GPG_ERR_INITIALIZED]: Don't invoke + gpg_err_init. + (i18n_init): Call bindtextdomain as well. Now that gpg-error has + its own gettext implementation, we can't rely on it anymore. + Also, repeat all the w32 stuff for fetching the registry. + 2005-10-23 Marcus Brinkmann * src/Makefile.am (libgpg_error_la_SOURCES): Add init.c. Modified: trunk/NEWS =================================================================== --- trunk/NEWS 2005-10-23 20:01:04 UTC (rev 147) +++ trunk/NEWS 2005-10-25 18:22:59 UTC (rev 148) @@ -2,7 +2,10 @@ ---------------------------------------------- * New function gpg_err_init, which binds the locale directory to - the text domain. + the text domain. This function is a constructor on GCC targets, + so it does not need to be called explicitely. The header file + defines GPG_ERR_INITIALIZED in this case. This is experimental for + now. * "./autogen.sh --build-w32" does now also build a DLL for W32. Translations are not yet provided for this platform. @@ -19,6 +22,7 @@ GPG_ERR_UNKNOWN_CRIT_EXTN NEW GPG_ERR_LOCKED NEW gpg_err_init NEW +GPG_ERR_INITIALIZED NEW ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Noteworthy changes in version 1.1 (2005-06-20) Modified: trunk/src/Makefile.am =================================================================== --- trunk/src/Makefile.am 2005-10-23 20:01:04 UTC (rev 147) +++ trunk/src/Makefile.am 2005-10-25 18:22:59 UTC (rev 148) @@ -48,6 +48,7 @@ if HAVE_W32_SYSTEM +arch_sources = w32-gettext.h w32-gettext.c LTRCCOMPILE = $(LIBTOOL) --mode=compile $(RC) \ `echo $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) | \ @@ -68,8 +69,10 @@ -rm $(DESTDIR)$(libdir)/gpg-error.def libgpg_error_la_DEPENDENCIES = $(gpg_error_res) gpg-error.def +intllibs = else +arch_sources = gpg_error_res = gpg_error_res_ldflag = no_undefined = @@ -77,6 +80,8 @@ install-def-file: uninstall-def-file: +intllibs = @LTLIBINTL@ + endif @@ -84,13 +89,14 @@ @LIBGPG_ERROR_LT_CURRENT@:@LIBGPG_ERROR_LT_REVISION@:@LIBGPG_ERROR_LT_AGE@ \ $(no_undefined) $(export_symbols) -libgpg_error_la_SOURCES = gpg-error.h gettext.h \ +libgpg_error_la_SOURCES = gpg-error.h gettext.h $(arch_sources) \ init.c strsource.c strerror.c code-to-errno.c code-from-errno.c + libgpg_error_la_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\" -libgpg_error_la_LIBADD = @LTLIBINTL@ +libgpg_error_la_LIBADD = $(intllibs) gpg_error_SOURCES = strsource-sym.c strerror-sym.c gpg-error.c -gpg_error_LDADD = ./libgpg-error.la +gpg_error_LDADD = ./libgpg-error.la @LTLIBINTL@ err-sources.h: Makefile mkstrtable.awk err-sources.h.in $(AWK) -f $(srcdir)/mkstrtable.awk -v textidx=3 \ Modified: trunk/src/gettext.h =================================================================== --- trunk/src/gettext.h 2005-10-23 20:01:04 UTC (rev 147) +++ trunk/src/gettext.h 2005-10-25 18:22:59 UTC (rev 148) @@ -22,8 +22,14 @@ /* NLS can be disabled through the configure --disable-nls option. */ #if ENABLE_NLS +#if HAVE_W32_SYSTEM +/* Redirect the gettext calls to an internal implementation on W32 + targets. */ +# include "w32-gettext.h" +#else /* Get declarations of GNU message catalog functions. */ # include +#endif #else Modified: trunk/src/gpg-error.c =================================================================== --- trunk/src/gpg-error.c 2005-10-23 20:01:04 UTC (rev 147) +++ trunk/src/gpg-error.c 2005-10-25 18:22:59 UTC (rev 148) @@ -48,6 +48,201 @@ #include +#if HAVE_W32_SYSTEM +/* The implementation follows below. */ +static char *get_locale_dir (void); +static void drop_locale_dir (char *locale_dir); +#else +#define get_locale_dir() LOCALEDIR +#define drop_locale_dir(dir) +#endif + +static void +i18n_init (void) +{ + char *locale_dir; + +#ifdef ENABLE_NLS +# ifdef HAVE_LC_MESSAGES + setlocale (LC_TIME, ""); + setlocale (LC_MESSAGES, ""); +# else + setlocale (LC_ALL, "" ); +# endif +#endif + + locale_dir = get_locale_dir (); + if (locale_dir) + { + bindtextdomain (PACKAGE, locale_dir); + drop_locale_dir (locale_dir); + } + textdomain (PACKAGE); + + return 0; +} + + +#ifdef HAVE_W32_SYSTEM + +#include + +static HKEY +get_root_key(const char *root) +{ + HKEY root_key; + + if( !root ) + root_key = HKEY_CURRENT_USER; + else if( !strcmp( root, "HKEY_CLASSES_ROOT" ) ) + root_key = HKEY_CLASSES_ROOT; + else if( !strcmp( root, "HKEY_CURRENT_USER" ) ) + root_key = HKEY_CURRENT_USER; + else if( !strcmp( root, "HKEY_LOCAL_MACHINE" ) ) + root_key = HKEY_LOCAL_MACHINE; + else if( !strcmp( root, "HKEY_USERS" ) ) + root_key = HKEY_USERS; + else if( !strcmp( root, "HKEY_PERFORMANCE_DATA" ) ) + root_key = HKEY_PERFORMANCE_DATA; + else if( !strcmp( root, "HKEY_CURRENT_CONFIG" ) ) + root_key = HKEY_CURRENT_CONFIG; + else + return NULL; + return root_key; +} + +/**************** + * Return a string from the Win32 Registry or NULL in case of + * error. Caller must release the return value. A NULL for root + * is an alias for HKEY_CURRENT_USER, HKEY_LOCAL_MACHINE in turn. + * NOTE: The value is allocated with a plain malloc() - use free() and not + * the usual xfree()!!! + */ +static char * +read_w32_registry_string( const char *root, const char *dir, const char *name ) +{ + HKEY root_key, key_handle; + DWORD n1, nbytes, type; + char *result = NULL; + + if ( !(root_key = get_root_key(root) ) ) + return NULL; + + if( RegOpenKeyEx( root_key, dir, 0, KEY_READ, &key_handle ) ) + { + if (root) + return NULL; /* no need for a RegClose, so return direct */ + /* It seems to be common practise to fall back to HKLM. */ + if (RegOpenKeyEx (HKEY_LOCAL_MACHINE, dir, 0, KEY_READ, &key_handle) ) + return NULL; /* still no need for a RegClose, so return direct */ + } + + nbytes = 1; + if( RegQueryValueEx( key_handle, name, 0, NULL, NULL, &nbytes ) ) { + if (root) + goto leave; + /* Try to fallback to HKLM also vor a missing value. */ + RegCloseKey (key_handle); + if (RegOpenKeyEx (HKEY_LOCAL_MACHINE, dir, 0, KEY_READ, &key_handle) ) + return NULL; /* Nope. */ + if (RegQueryValueEx( key_handle, name, 0, NULL, NULL, &nbytes)) + goto leave; + } + result = malloc( (n1=nbytes+1) ); + if( !result ) + goto leave; + if( RegQueryValueEx( key_handle, name, 0, &type, result, &n1 ) ) { + free(result); result = NULL; + goto leave; + } + result[nbytes] = 0; /* make sure it is really a string */ + if (type == REG_EXPAND_SZ && strchr (result, '%')) { + char *tmp; + + n1 += 1000; + tmp = malloc (n1+1); + if (!tmp) + goto leave; + nbytes = ExpandEnvironmentStrings (result, tmp, n1); + if (nbytes && nbytes > n1) { + free (tmp); + n1 = nbytes; + tmp = malloc (n1 + 1); + if (!tmp) + goto leave; + nbytes = ExpandEnvironmentStrings (result, tmp, n1); + if (nbytes && nbytes > n1) { + free (tmp); /* oops - truncated, better don't expand at all */ + goto leave; + } + tmp[nbytes] = 0; + free (result); + result = tmp; + } + else if (nbytes) { /* okay, reduce the length */ + tmp[nbytes] = 0; + free (result); + result = malloc (strlen (tmp)+1); + if (!result) + result = tmp; + else { + strcpy (result, tmp); + free (tmp); + } + } + else { /* error - don't expand */ + free (tmp); + } + } + + leave: + RegCloseKey( key_handle ); + return result; +} + + +#define REGKEY "Software\\GNU\\GnuPG" + +static char * +get_locale_dir (void) +{ + char *instdir; + char *p; + char *dname; + + instdir = read_w32_registry_string ("HKEY_LOCAL_MACHINE", REGKEY, + "Install Directory"); + if (!instdir) + return; + + /* Build the key: "/share/locale". */ +#define SLDIR "\\share\\locale" + dname = malloc (strlen (instdir) + strlen (SLDIR) + 1); + if (!dname) + { + free (instdir); + return; + } + p = dname; + strcpy (p, instdir); + p += strlen (instdir); + strcpy (p, SLDIR); + + free (instdir); + + return dname; +} + + +static void +drop_locale_dir (char *locale_dir) +{ + free (locale_dir); +} + +#endif /* HAVE_W32_SYSTEM */ + + const char *gpg_strerror_sym (gpg_error_t err); const char *gpg_strsource_sym (gpg_error_t err); @@ -89,7 +284,9 @@ for (src = 0; src < GPG_ERR_SOURCE_DIM; src++) { - const char *src_sym = gpg_strsource_sym (src << GPG_ERR_SOURCE_SHIFT); + const char *src_sym; + + src_sym = gpg_strsource_sym (src << GPG_ERR_SOURCE_SHIFT); if (src_sym && !strcasecmp (str, src_sym + sizeof (src_prefix) - 1)) { *err |= src << GPG_ERR_SOURCE_SHIFT; @@ -241,31 +438,14 @@ -static void -i18n_init (void) -{ -#ifdef ENABLE_NLS -# ifdef HAVE_LC_MESSAGES - setlocale (LC_TIME, ""); - setlocale (LC_MESSAGES, ""); -# else - setlocale (LC_ALL, "" ); -# endif -#endif - - /* We have the same text domain as the library. Thus, we don't need - to bind our text domain to our locale directory (this is done by - gpg_err_init). We just need to set our text domain. */ - textdomain (PACKAGE); -} - - int main (int argc, char *argv[]) { int i = 1; +#ifndef GPG_ERR_INITIALIZED gpg_err_init (); +#endif i18n_init (); Modified: trunk/src/gpg-error.h.in =================================================================== --- trunk/src/gpg-error.h.in 2005-10-23 20:01:04 UTC (rev 147) +++ trunk/src/gpg-error.h.in 2005-10-25 18:22:59 UTC (rev 148) @@ -114,11 +114,36 @@ #define GPG_ERR_SOURCE_SHIFT 24 +/* GCC feature test. */ +#undef _GPG_ERR_HAVE_CONSTRUCTOR +#if __GNUC__ +#define _GPG_ERR_GCC_VERSION (__GNUC__ * 10000 \ + + __GNUC_MINOR__ * 100 \ + + __GNUC_PATCHLEVEL__) + +#if _GPG_ERR_GCC_VERSION > 30100 +#define _GPG_ERR_CONSTRUCTOR __attribute__ ((__constructor__)) +#define _GPG_ERR_HAVE_CONSTRUCTOR +#endif +#endif + +#ifndef _GPG_ERR_CONSTRUCTOR +#define _GPG_ERR_CONSTRUCTOR +#endif + + /* Initialization function. */ /* Initialize the library. This function should be run early. */ -gpg_error_t gpg_err_init (void); +gpg_error_t gpg_err_init (void) _GPG_ERR_CONSTRUCTOR; +/* If this is defined, the library is already initialized by the + constructor and does not need to be initialized explicitely. */ +#undef GPG_ERR_INITIALIZED +#ifdef _GPG_ERR_HAVE_CONSTRUCTOR +#define GPG_ERR_INITIALIZED 1 +#endif + /* Constructor and accessor functions. */ Added: trunk/src/w32-gettext.c =================================================================== --- trunk/src/w32-gettext.c 2005-10-23 20:01:04 UTC (rev 147) +++ trunk/src/w32-gettext.c 2005-10-25 18:22:59 UTC (rev 148) @@ -0,0 +1,1648 @@ +/* w32-gettext.h - A simple gettext implementation for Windows targets. + Copyright (C) 1995,1996,1997,1999,2005 Free Software Foundation, Inc. + Copyright (C) 2005 g10 Code GmbH + + This file is part of libgpg-error. + + libgpg-error 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. + + libgpg-error 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 libgpg-error; if not, write to the Free + Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. */ + +#if HAVE_CONFIG_H +#include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "gettext.h" + + +/* localname.c from gettext. */ + +/* Edit: Added a "static" to _nl_locale_name. Note that the category + argument is ignored on w32. */ + +/* Determine the current selected locale. + Copyright (C) 1995-1999, 2000-2003 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU Library General Public License as published + by the Free Software Foundation; either version 2, 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 Library General Public + License along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, + USA. */ + +/* Written by Ulrich Drepper , 1995. */ +/* Win32 code written by Tor Lillqvist . */ + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include +#include + +#if defined _WIN32 || defined __WIN32__ +# undef WIN32 /* avoid warning on mingw32 */ +# define WIN32 +#endif + +#ifdef WIN32 +# define WIN32_LEAN_AND_MEAN +# include +/* List of language codes, sorted by value: + 0x01 LANG_ARABIC + 0x02 LANG_BULGARIAN + 0x03 LANG_CATALAN + 0x04 LANG_CHINESE + 0x05 LANG_CZECH + 0x06 LANG_DANISH + 0x07 LANG_GERMAN + 0x08 LANG_GREEK + 0x09 LANG_ENGLISH + 0x0a LANG_SPANISH + 0x0b LANG_FINNISH + 0x0c LANG_FRENCH + 0x0d LANG_HEBREW + 0x0e LANG_HUNGARIAN + 0x0f LANG_ICELANDIC + 0x10 LANG_ITALIAN + 0x11 LANG_JAPANESE + 0x12 LANG_KOREAN + 0x13 LANG_DUTCH + 0x14 LANG_NORWEGIAN + 0x15 LANG_POLISH + 0x16 LANG_PORTUGUESE + 0x17 LANG_RHAETO_ROMANCE + 0x18 LANG_ROMANIAN + 0x19 LANG_RUSSIAN + 0x1a LANG_CROATIAN == LANG_SERBIAN + 0x1b LANG_SLOVAK + 0x1c LANG_ALBANIAN + 0x1d LANG_SWEDISH + 0x1e LANG_THAI + 0x1f LANG_TURKISH + 0x20 LANG_URDU + 0x21 LANG_INDONESIAN + 0x22 LANG_UKRAINIAN + 0x23 LANG_BELARUSIAN + 0x24 LANG_SLOVENIAN + 0x25 LANG_ESTONIAN + 0x26 LANG_LATVIAN + 0x27 LANG_LITHUANIAN + 0x28 LANG_TAJIK + 0x29 LANG_FARSI + 0x2a LANG_VIETNAMESE + 0x2b LANG_ARMENIAN + 0x2c LANG_AZERI + 0x2d LANG_BASQUE + 0x2e LANG_SORBIAN + 0x2f LANG_MACEDONIAN + 0x30 LANG_SUTU + 0x31 LANG_TSONGA + 0x32 LANG_TSWANA + 0x33 LANG_VENDA + 0x34 LANG_XHOSA + 0x35 LANG_ZULU + 0x36 LANG_AFRIKAANS + 0x37 LANG_GEORGIAN + 0x38 LANG_FAEROESE + 0x39 LANG_HINDI + 0x3a LANG_MALTESE + 0x3b LANG_SAAMI + 0x3c LANG_GAELIC + 0x3d LANG_YIDDISH + 0x3e LANG_MALAY + 0x3f LANG_KAZAK + 0x40 LANG_KYRGYZ + 0x41 LANG_SWAHILI + 0x42 LANG_TURKMEN + 0x43 LANG_UZBEK + 0x44 LANG_TATAR + 0x45 LANG_BENGALI + 0x46 LANG_PUNJABI + 0x47 LANG_GUJARATI + 0x48 LANG_ORIYA + 0x49 LANG_TAMIL + 0x4a LANG_TELUGU + 0x4b LANG_KANNADA + 0x4c LANG_MALAYALAM + 0x4d LANG_ASSAMESE + 0x4e LANG_MARATHI + 0x4f LANG_SANSKRIT + 0x50 LANG_MONGOLIAN + 0x51 LANG_TIBETAN + 0x52 LANG_WELSH + 0x53 LANG_CAMBODIAN + 0x54 LANG_LAO + 0x55 LANG_BURMESE + 0x56 LANG_GALICIAN + 0x57 LANG_KONKANI + 0x58 LANG_MANIPURI + 0x59 LANG_SINDHI + 0x5a LANG_SYRIAC + 0x5b LANG_SINHALESE + 0x5c LANG_CHEROKEE + 0x5d LANG_INUKTITUT + 0x5e LANG_AMHARIC + 0x5f LANG_TAMAZIGHT + 0x60 LANG_KASHMIRI + 0x61 LANG_NEPALI + 0x62 LANG_FRISIAN + 0x63 LANG_PASHTO + 0x64 LANG_TAGALOG + 0x65 LANG_DIVEHI + 0x66 LANG_EDO + 0x67 LANG_FULFULDE + 0x68 LANG_HAUSA + 0x69 LANG_IBIBIO + 0x6a LANG_YORUBA + 0x70 LANG_IGBO + 0x71 LANG_KANURI + 0x72 LANG_OROMO + 0x73 LANG_TIGRINYA + 0x74 LANG_GUARANI + 0x75 LANG_HAWAIIAN + 0x76 LANG_LATIN + 0x77 LANG_SOMALI + 0x78 LANG_YI + 0x79 LANG_PAPIAMENTU +*/ +/* Mingw headers don't have latest language and sublanguage codes. */ +# ifndef LANG_AFRIKAANS +# define LANG_AFRIKAANS 0x36 +# endif +# ifndef LANG_ALBANIAN +# define LANG_ALBANIAN 0x1c +# endif +# ifndef LANG_AMHARIC +# define LANG_AMHARIC 0x5e +# endif +# ifndef LANG_ARABIC +# define LANG_ARABIC 0x01 +# endif +# ifndef LANG_ARMENIAN +# define LANG_ARMENIAN 0x2b +# endif +# ifndef LANG_ASSAMESE +# define LANG_ASSAMESE 0x4d +# endif +# ifndef LANG_AZERI +# define LANG_AZERI 0x2c +# endif +# ifndef LANG_BASQUE +# define LANG_BASQUE 0x2d +# endif +# ifndef LANG_BELARUSIAN +# define LANG_BELARUSIAN 0x23 +# endif +# ifndef LANG_BENGALI +# define LANG_BENGALI 0x45 +# endif +# ifndef LANG_BURMESE +# define LANG_BURMESE 0x55 +# endif +# ifndef LANG_CAMBODIAN +# define LANG_CAMBODIAN 0x53 +# endif +# ifndef LANG_CATALAN +# define LANG_CATALAN 0x03 +# endif +# ifndef LANG_CHEROKEE +# define LANG_CHEROKEE 0x5c +# endif +# ifndef LANG_DIVEHI +# define LANG_DIVEHI 0x65 +# endif +# ifndef LANG_EDO +# define LANG_EDO 0x66 +# endif +# ifndef LANG_ESTONIAN +# define LANG_ESTONIAN 0x25 +# endif +# ifndef LANG_FAEROESE +# define LANG_FAEROESE 0x38 +# endif +# ifndef LANG_FARSI +# define LANG_FARSI 0x29 +# endif +# ifndef LANG_FRISIAN +# define LANG_FRISIAN 0x62 +# endif +# ifndef LANG_FULFULDE +# define LANG_FULFULDE 0x67 +# endif +# ifndef LANG_GAELIC +# define LANG_GAELIC 0x3c +# endif +# ifndef LANG_GALICIAN +# define LANG_GALICIAN 0x56 +# endif +# ifndef LANG_GEORGIAN +# define LANG_GEORGIAN 0x37 +# endif +# ifndef LANG_GUARANI +# define LANG_GUARANI 0x74 +# endif +# ifndef LANG_GUJARATI +# define LANG_GUJARATI 0x47 +# endif +# ifndef LANG_HAUSA +# define LANG_HAUSA 0x68 +# endif +# ifndef LANG_HAWAIIAN +# define LANG_HAWAIIAN 0x75 +# endif +# ifndef LANG_HEBREW +# define LANG_HEBREW 0x0d +# endif +# ifndef LANG_HINDI +# define LANG_HINDI 0x39 +# endif +# ifndef LANG_IBIBIO +# define LANG_IBIBIO 0x69 +# endif +# ifndef LANG_IGBO +# define LANG_IGBO 0x70 +# endif +# ifndef LANG_INDONESIAN +# define LANG_INDONESIAN 0x21 +# endif +# ifndef LANG_INUKTITUT +# define LANG_INUKTITUT 0x5d +# endif +# ifndef LANG_KANNADA +# define LANG_KANNADA 0x4b +# endif +# ifndef LANG_KANURI +# define LANG_KANURI 0x71 +# endif +# ifndef LANG_KASHMIRI +# define LANG_KASHMIRI 0x60 +# endif +# ifndef LANG_KAZAK +# define LANG_KAZAK 0x3f +# endif +# ifndef LANG_KONKANI +# define LANG_KONKANI 0x57 +# endif +# ifndef LANG_KYRGYZ +# define LANG_KYRGYZ 0x40 +# endif +# ifndef LANG_LAO +# define LANG_LAO 0x54 +# endif +# ifndef LANG_LATIN +# define LANG_LATIN 0x76 +# endif +# ifndef LANG_LATVIAN +# define LANG_LATVIAN 0x26 +# endif +# ifndef LANG_LITHUANIAN +# define LANG_LITHUANIAN 0x27 +# endif +# ifndef LANG_MACEDONIAN +# define LANG_MACEDONIAN 0x2f +# endif +# ifndef LANG_MALAY +# define LANG_MALAY 0x3e +# endif +# ifndef LANG_MALAYALAM +# define LANG_MALAYALAM 0x4c +# endif +# ifndef LANG_MALTESE +# define LANG_MALTESE 0x3a +# endif +# ifndef LANG_MANIPURI +# define LANG_MANIPURI 0x58 +# endif +# ifndef LANG_MARATHI +# define LANG_MARATHI 0x4e +# endif +# ifndef LANG_MONGOLIAN +# define LANG_MONGOLIAN 0x50 +# endif +# ifndef LANG_NEPALI +# define LANG_NEPALI 0x61 +# endif +# ifndef LANG_ORIYA +# define LANG_ORIYA 0x48 +# endif +# ifndef LANG_OROMO +# define LANG_OROMO 0x72 +# endif +# ifndef LANG_PAPIAMENTU +# define LANG_PAPIAMENTU 0x79 +# endif +# ifndef LANG_PASHTO +# define LANG_PASHTO 0x63 +# endif +# ifndef LANG_PUNJABI +# define LANG_PUNJABI 0x46 +# endif +# ifndef LANG_RHAETO_ROMANCE +# define LANG_RHAETO_ROMANCE 0x17 +# endif +# ifndef LANG_SAAMI +# define LANG_SAAMI 0x3b +# endif +# ifndef LANG_SANSKRIT +# define LANG_SANSKRIT 0x4f +# endif +# ifndef LANG_SERBIAN +# define LANG_SERBIAN 0x1a +# endif +# ifndef LANG_SINDHI +# define LANG_SINDHI 0x59 +# endif +# ifndef LANG_SINHALESE +# define LANG_SINHALESE 0x5b +# endif +# ifndef LANG_SLOVAK +# define LANG_SLOVAK 0x1b +# endif +# ifndef LANG_SOMALI +# define LANG_SOMALI 0x77 +# endif +# ifndef LANG_SORBIAN +# define LANG_SORBIAN 0x2e +# endif +# ifndef LANG_SUTU +# define LANG_SUTU 0x30 +# endif +# ifndef LANG_SWAHILI +# define LANG_SWAHILI 0x41 +# endif +# ifndef LANG_SYRIAC +# define LANG_SYRIAC 0x5a +# endif +# ifndef LANG_TAGALOG +# define LANG_TAGALOG 0x64 +# endif +# ifndef LANG_TAJIK +# define LANG_TAJIK 0x28 +# endif +# ifndef LANG_TAMAZIGHT +# define LANG_TAMAZIGHT 0x5f +# endif +# ifndef LANG_TAMIL +# define LANG_TAMIL 0x49 +# endif +# ifndef LANG_TATAR +# define LANG_TATAR 0x44 +# endif +# ifndef LANG_TELUGU +# define LANG_TELUGU 0x4a +# endif +# ifndef LANG_THAI +# define LANG_THAI 0x1e +# endif +# ifndef LANG_TIBETAN +# define LANG_TIBETAN 0x51 +# endif +# ifndef LANG_TIGRINYA +# define LANG_TIGRINYA 0x73 +# endif +# ifndef LANG_TSONGA +# define LANG_TSONGA 0x31 +# endif +# ifndef LANG_TSWANA +# define LANG_TSWANA 0x32 +# endif +# ifndef LANG_TURKMEN +# define LANG_TURKMEN 0x42 +# endif +# ifndef LANG_UKRAINIAN +# define LANG_UKRAINIAN 0x22 +# endif +# ifndef LANG_URDU +# define LANG_URDU 0x20 +# endif +# ifndef LANG_UZBEK +# define LANG_UZBEK 0x43 +# endif +# ifndef LANG_VENDA +# define LANG_VENDA 0x33 +# endif +# ifndef LANG_VIETNAMESE +# define LANG_VIETNAMESE 0x2a +# endif +# ifndef LANG_WELSH +# define LANG_WELSH 0x52 +# endif +# ifndef LANG_XHOSA +# define LANG_XHOSA 0x34 +# endif +# ifndef LANG_YI +# define LANG_YI 0x78 +# endif +# ifndef LANG_YIDDISH +# define LANG_YIDDISH 0x3d +# endif +# ifndef LANG_YORUBA +# define LANG_YORUBA 0x6a +# endif +# ifndef LANG_ZULU +# define LANG_ZULU 0x35 +# endif +# ifndef SUBLANG_ARABIC_SAUDI_ARABIA +# define SUBLANG_ARABIC_SAUDI_ARABIA 0x01 +# endif +# ifndef SUBLANG_ARABIC_IRAQ +# define SUBLANG_ARABIC_IRAQ 0x02 +# endif +# ifndef SUBLANG_ARABIC_EGYPT +# define SUBLANG_ARABIC_EGYPT 0x03 +# endif +# ifndef SUBLANG_ARABIC_LIBYA +# define SUBLANG_ARABIC_LIBYA 0x04 +# endif +# ifndef SUBLANG_ARABIC_ALGERIA +# define SUBLANG_ARABIC_ALGERIA 0x05 +# endif +# ifndef SUBLANG_ARABIC_MOROCCO +# define SUBLANG_ARABIC_MOROCCO 0x06 +# endif +# ifndef SUBLANG_ARABIC_TUNISIA +# define SUBLANG_ARABIC_TUNISIA 0x07 +# endif +# ifndef SUBLANG_ARABIC_OMAN +# define SUBLANG_ARABIC_OMAN 0x08 +# endif +# ifndef SUBLANG_ARABIC_YEMEN +# define SUBLANG_ARABIC_YEMEN 0x09 +# endif +# ifndef SUBLANG_ARABIC_SYRIA +# define SUBLANG_ARABIC_SYRIA 0x0a +# endif +# ifndef SUBLANG_ARABIC_JORDAN +# define SUBLANG_ARABIC_JORDAN 0x0b +# endif +# ifndef SUBLANG_ARABIC_LEBANON +# define SUBLANG_ARABIC_LEBANON 0x0c +# endif +# ifndef SUBLANG_ARABIC_KUWAIT +# define SUBLANG_ARABIC_KUWAIT 0x0d +# endif +# ifndef SUBLANG_ARABIC_UAE +# define SUBLANG_ARABIC_UAE 0x0e +# endif +# ifndef SUBLANG_ARABIC_BAHRAIN +# define SUBLANG_ARABIC_BAHRAIN 0x0f +# endif +# ifndef SUBLANG_ARABIC_QATAR +# define SUBLANG_ARABIC_QATAR 0x10 +# endif +# ifndef SUBLANG_AZERI_LATIN +# define SUBLANG_AZERI_LATIN 0x01 +# endif +# ifndef SUBLANG_AZERI_CYRILLIC +# define SUBLANG_AZERI_CYRILLIC 0x02 +# endif +# ifndef SUBLANG_BENGALI_INDIA +# define SUBLANG_BENGALI_INDIA 0x00 +# endif +# ifndef SUBLANG_BENGALI_BANGLADESH +# define SUBLANG_BENGALI_BANGLADESH 0x01 +# endif +# ifndef SUBLANG_CHINESE_MACAU +# define SUBLANG_CHINESE_MACAU 0x05 +# endif +# ifndef SUBLANG_ENGLISH_SOUTH_AFRICA +# define SUBLANG_ENGLISH_SOUTH_AFRICA 0x07 +# endif +# ifndef SUBLANG_ENGLISH_JAMAICA +# define SUBLANG_ENGLISH_JAMAICA 0x08 +# endif +# ifndef SUBLANG_ENGLISH_CARIBBEAN +# define SUBLANG_ENGLISH_CARIBBEAN 0x09 +# endif +# ifndef SUBLANG_ENGLISH_BELIZE +# define SUBLANG_ENGLISH_BELIZE 0x0a +# endif +# ifndef SUBLANG_ENGLISH_TRINIDAD +# define SUBLANG_ENGLISH_TRINIDAD 0x0b +# endif +# ifndef SUBLANG_ENGLISH_ZIMBABWE +# define SUBLANG_ENGLISH_ZIMBABWE 0x0c +# endif +# ifndef SUBLANG_ENGLISH_PHILIPPINES +# define SUBLANG_ENGLISH_PHILIPPINES 0x0d +# endif +# ifndef SUBLANG_ENGLISH_INDONESIA +# define SUBLANG_ENGLISH_INDONESIA 0x0e +# endif +# ifndef SUBLANG_ENGLISH_HONGKONG +# define SUBLANG_ENGLISH_HONGKONG 0x0f +# endif +# ifndef SUBLANG_ENGLISH_INDIA +# define SUBLANG_ENGLISH_INDIA 0x10 +# endif +# ifndef SUBLANG_ENGLISH_MALAYSIA +# define SUBLANG_ENGLISH_MALAYSIA 0x11 +# endif +# ifndef SUBLANG_ENGLISH_SINGAPORE +# define SUBLANG_ENGLISH_SINGAPORE 0x12 +# endif +# ifndef SUBLANG_FRENCH_LUXEMBOURG +# define SUBLANG_FRENCH_LUXEMBOURG 0x05 +# endif +# ifndef SUBLANG_FRENCH_MONACO +# define SUBLANG_FRENCH_MONACO 0x06 +# endif +# ifndef SUBLANG_FRENCH_WESTINDIES +# define SUBLANG_FRENCH_WESTINDIES 0x07 +# endif +# ifndef SUBLANG_FRENCH_REUNION +# define SUBLANG_FRENCH_REUNION 0x08 +# endif +# ifndef SUBLANG_FRENCH_CONGO +# define SUBLANG_FRENCH_CONGO 0x09 +# endif +# ifndef SUBLANG_FRENCH_SENEGAL +# define SUBLANG_FRENCH_SENEGAL 0x0a +# endif +# ifndef SUBLANG_FRENCH_CAMEROON +# define SUBLANG_FRENCH_CAMEROON 0x0b +# endif +# ifndef SUBLANG_FRENCH_COTEDIVOIRE +# define SUBLANG_FRENCH_COTEDIVOIRE 0x0c +# endif +# ifndef SUBLANG_FRENCH_MALI +# define SUBLANG_FRENCH_MALI 0x0d +# endif +# ifndef SUBLANG_FRENCH_MOROCCO +# define SUBLANG_FRENCH_MOROCCO 0x0e +# endif +# ifndef SUBLANG_FRENCH_HAITI +# define SUBLANG_FRENCH_HAITI 0x0f +# endif +# ifndef SUBLANG_GERMAN_LUXEMBOURG +# define SUBLANG_GERMAN_LUXEMBOURG 0x04 +# endif +# ifndef SUBLANG_GERMAN_LIECHTENSTEIN +# define SUBLANG_GERMAN_LIECHTENSTEIN 0x05 +# endif +# ifndef SUBLANG_KASHMIRI_INDIA +# define SUBLANG_KASHMIRI_INDIA 0x02 +# endif +# ifndef SUBLANG_MALAY_MALAYSIA +# define SUBLANG_MALAY_MALAYSIA 0x01 +# endif +# ifndef SUBLANG_MALAY_BRUNEI_DARUSSALAM +# define SUBLANG_MALAY_BRUNEI_DARUSSALAM 0x02 +# endif +# ifndef SUBLANG_NEPALI_INDIA +# define SUBLANG_NEPALI_INDIA 0x02 +# endif +# ifndef SUBLANG_PUNJABI_INDIA +# define SUBLANG_PUNJABI_INDIA 0x00 +# endif +# ifndef SUBLANG_PUNJABI_PAKISTAN +# define SUBLANG_PUNJABI_PAKISTAN 0x01 +# endif +# ifndef SUBLANG_ROMANIAN_ROMANIA +# define SUBLANG_ROMANIAN_ROMANIA 0x00 +# endif +# ifndef SUBLANG_ROMANIAN_MOLDOVA +# define SUBLANG_ROMANIAN_MOLDOVA 0x01 +# endif +# ifndef SUBLANG_SERBIAN_LATIN +# define SUBLANG_SERBIAN_LATIN 0x02 +# endif +# ifndef SUBLANG_SERBIAN_CYRILLIC +# define SUBLANG_SERBIAN_CYRILLIC 0x03 +# endif +# ifndef SUBLANG_SINDHI_INDIA +# define SUBLANG_SINDHI_INDIA 0x00 +# endif +# ifndef SUBLANG_SINDHI_PAKISTAN +# define SUBLANG_SINDHI_PAKISTAN 0x01 +# endif +# ifndef SUBLANG_SPANISH_GUATEMALA +# define SUBLANG_SPANISH_GUATEMALA 0x04 +# endif +# ifndef SUBLANG_SPANISH_COSTA_RICA +# define SUBLANG_SPANISH_COSTA_RICA 0x05 +# endif +# ifndef SUBLANG_SPANISH_PANAMA +# define SUBLANG_SPANISH_PANAMA 0x06 +# endif +# ifndef SUBLANG_SPANISH_DOMINICAN_REPUBLIC +# define SUBLANG_SPANISH_DOMINICAN_REPUBLIC 0x07 +# endif +# ifndef SUBLANG_SPANISH_VENEZUELA +# define SUBLANG_SPANISH_VENEZUELA 0x08 +# endif +# ifndef SUBLANG_SPANISH_COLOMBIA +# define SUBLANG_SPANISH_COLOMBIA 0x09 +# endif +# ifndef SUBLANG_SPANISH_PERU +# define SUBLANG_SPANISH_PERU 0x0a +# endif +# ifndef SUBLANG_SPANISH_ARGENTINA +# define SUBLANG_SPANISH_ARGENTINA 0x0b +# endif +# ifndef SUBLANG_SPANISH_ECUADOR +# define SUBLANG_SPANISH_ECUADOR 0x0c +# endif +# ifndef SUBLANG_SPANISH_CHILE +# define SUBLANG_SPANISH_CHILE 0x0d +# endif +# ifndef SUBLANG_SPANISH_URUGUAY +# define SUBLANG_SPANISH_URUGUAY 0x0e +# endif +# ifndef SUBLANG_SPANISH_PARAGUAY +# define SUBLANG_SPANISH_PARAGUAY 0x0f +# endif +# ifndef SUBLANG_SPANISH_BOLIVIA +# define SUBLANG_SPANISH_BOLIVIA 0x10 +# endif +# ifndef SUBLANG_SPANISH_EL_SALVADOR +# define SUBLANG_SPANISH_EL_SALVADOR 0x11 +# endif +# ifndef SUBLANG_SPANISH_HONDURAS +# define SUBLANG_SPANISH_HONDURAS 0x12 +# endif +# ifndef SUBLANG_SPANISH_NICARAGUA +# define SUBLANG_SPANISH_NICARAGUA 0x13 +# endif +# ifndef SUBLANG_SPANISH_PUERTO_RICO +# define SUBLANG_SPANISH_PUERTO_RICO 0x14 +# endif +# ifndef SUBLANG_SWEDISH_FINLAND +# define SUBLANG_SWEDISH_FINLAND 0x02 +# endif +# ifndef SUBLANG_TAMAZIGHT_ARABIC +# define SUBLANG_TAMAZIGHT_ARABIC 0x01 +# endif +# ifndef SUBLANG_TAMAZIGHT_LATIN +# define SUBLANG_TAMAZIGHT_LATIN 0x02 +# endif +# ifndef SUBLANG_TIGRINYA_ETHIOPIA +# define SUBLANG_TIGRINYA_ETHIOPIA 0x00 +# endif +# ifndef SUBLANG_TIGRINYA_ERITREA +# define SUBLANG_TIGRINYA_ERITREA 0x01 +# endif +# ifndef SUBLANG_URDU_PAKISTAN +# define SUBLANG_URDU_PAKISTAN 0x01 +# endif +# ifndef SUBLANG_URDU_INDIA +# define SUBLANG_URDU_INDIA 0x02 +# endif +# ifndef SUBLANG_UZBEK_LATIN +# define SUBLANG_UZBEK_LATIN 0x01 +# endif +# ifndef SUBLANG_UZBEK_CYRILLIC +# define SUBLANG_UZBEK_CYRILLIC 0x02 +# endif +#endif + +/* XPG3 defines the result of 'setlocale (category, NULL)' as: + "Directs 'setlocale()' to query 'category' and return the current + setting of 'local'." + However it does not specify the exact format. Neither do SUSV2 and + ISO C 99. So we can use this feature only on selected systems (e.g. + those using GNU C Library). */ +#if defined _LIBC || (defined __GNU_LIBRARY__ && __GNU_LIBRARY__ >= 2) +# define HAVE_LOCALE_NULL +#endif + +/* Determine the current locale's name, and canonicalize it into XPG syntax + language[_territory[.codeset]][@modifier] + The codeset part in the result is not reliable; the locale_charset() + should be used for codeset information instead. + The result must not be freed; it is statically allocated. */ + +static const char * +_nl_locale_name (int category, const char *categoryname) +{ + const char *retval; + +#ifndef WIN32 + + /* Use the POSIX methods of looking to 'LC_ALL', 'LC_xxx', and 'LANG'. + On some systems this can be done by the 'setlocale' function itself. */ +# if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES && defined HAVE_LOCALE_NULL + retval = setlocale (category, NULL); +# else + /* Setting of LC_ALL overwrites all other. */ + retval = getenv ("LC_ALL"); + if (retval == NULL || retval[0] == '\0') + { + /* Next comes the name of the desired category. */ + retval = getenv (categoryname); + if (retval == NULL || retval[0] == '\0') + { + /* Last possibility is the LANG environment variable. */ + retval = getenv ("LANG"); + if (retval == NULL || retval[0] == '\0') + /* We use C as the default domain. POSIX says this is + implementation defined. */ + retval = "C"; + } + } +# endif + + return retval; + +#else /* WIN32 */ + + /* Return an XPG style locale name language[_territory][@modifier]. + Don't even bother determining the codeset; it's not useful in this + context, because message catalogs are not specific to a single + codeset. */ + + LCID lcid; + LANGID langid; + int primary, sub; + + /* Let the user override the system settings through environment + variables, as on POSIX systems. */ + retval = getenv ("LC_ALL"); + if (retval != NULL && retval[0] != '\0') + return retval; + retval = getenv (categoryname); + if (retval != NULL && retval[0] != '\0') + return retval; + retval = getenv ("LANG"); + if (retval != NULL && retval[0] != '\0') + return retval; + + /* Use native Win32 API locale ID. */ + lcid = GetThreadLocale (); + + /* Strip off the sorting rules, keep only the language part. */ + langid = LANGIDFROMLCID (lcid); + + /* Split into language and territory part. */ + primary = PRIMARYLANGID (langid); + sub = SUBLANGID (langid); + + /* Dispatch on language. + See also http://www.unicode.org/unicode/onlinedat/languages.html . + For details about languages, see http://www.ethnologue.com/ . */ + switch (primary) + { + case LANG_AFRIKAANS: return "af_ZA"; + case LANG_ALBANIAN: return "sq_AL"; + case LANG_AMHARIC: return "am_ET"; + case LANG_ARABIC: + switch (sub) + { + case SUBLANG_ARABIC_SAUDI_ARABIA: return "ar_SA"; + case SUBLANG_ARABIC_IRAQ: return "ar_IQ"; + case SUBLANG_ARABIC_EGYPT: return "ar_EG"; + case SUBLANG_ARABIC_LIBYA: return "ar_LY"; + case SUBLANG_ARABIC_ALGERIA: return "ar_DZ"; + case SUBLANG_ARABIC_MOROCCO: return "ar_MA"; + case SUBLANG_ARABIC_TUNISIA: return "ar_TN"; + case SUBLANG_ARABIC_OMAN: return "ar_OM"; + case SUBLANG_ARABIC_YEMEN: return "ar_YE"; + case SUBLANG_ARABIC_SYRIA: return "ar_SY"; + case SUBLANG_ARABIC_JORDAN: return "ar_JO"; + case SUBLANG_ARABIC_LEBANON: return "ar_LB"; + case SUBLANG_ARABIC_KUWAIT: return "ar_KW"; + case SUBLANG_ARABIC_UAE: return "ar_AE"; + case SUBLANG_ARABIC_BAHRAIN: return "ar_BH"; + case SUBLANG_ARABIC_QATAR: return "ar_QA"; + } + return "ar"; + case LANG_ARMENIAN: return "hy_AM"; + case LANG_ASSAMESE: return "as_IN"; + case LANG_AZERI: + switch (sub) + { + /* FIXME: Adjust this when Azerbaijani locales appear on Unix. */ + case SUBLANG_AZERI_LATIN: return "az_AZ@latin"; + case SUBLANG_AZERI_CYRILLIC: return "az_AZ@cyrillic"; + } + return "az"; + case LANG_BASQUE: + return "eu"; /* Ambiguous: could be "eu_ES" or "eu_FR". */ + case LANG_BELARUSIAN: return "be_BY"; + case LANG_BENGALI: + switch (sub) + { + case SUBLANG_BENGALI_INDIA: return "bn_IN"; + case SUBLANG_BENGALI_BANGLADESH: return "bn_BD"; + } + return "bn"; + case LANG_BULGARIAN: return "bg_BG"; + case LANG_BURMESE: return "my_MM"; + case LANG_CAMBODIAN: return "km_KH"; + case LANG_CATALAN: return "ca_ES"; + case LANG_CHEROKEE: return "chr_US"; + case LANG_CHINESE: + switch (sub) + { + case SUBLANG_CHINESE_TRADITIONAL: return "zh_TW"; + case SUBLANG_CHINESE_SIMPLIFIED: return "zh_CN"; + case SUBLANG_CHINESE_HONGKONG: return "zh_HK"; + case SUBLANG_CHINESE_SINGAPORE: return "zh_SG"; + case SUBLANG_CHINESE_MACAU: return "zh_MO"; + } + return "zh"; + case LANG_CROATIAN: /* LANG_CROATIAN == LANG_SERBIAN + * What used to be called Serbo-Croatian + * should really now be two separate + * languages because of political reasons. + * (Says tml, who knows nothing about Serbian + * or Croatian.) + * (I can feel those flames coming already.) + */ + switch (sub) + { + case SUBLANG_DEFAULT: return "hr_HR"; + case SUBLANG_SERBIAN_LATIN: return "sr_CS"; + case SUBLANG_SERBIAN_CYRILLIC: return "sr_CS@cyrillic"; + } + return "hr"; + case LANG_CZECH: return "cs_CZ"; + case LANG_DANISH: return "da_DK"; + case LANG_DIVEHI: return "div_MV"; + case LANG_DUTCH: + switch (sub) + { + case SUBLANG_DUTCH: return "nl_NL"; + case SUBLANG_DUTCH_BELGIAN: /* FLEMISH, VLAAMS */ return "nl_BE"; + } + return "nl"; + case LANG_EDO: return "bin_NG"; + case LANG_ENGLISH: + switch (sub) + { + /* SUBLANG_ENGLISH_US == SUBLANG_DEFAULT. Heh. I thought + * English was the language spoken in England. + * Oh well. + */ + case SUBLANG_ENGLISH_US: return "en_US"; + case SUBLANG_ENGLISH_UK: return "en_GB"; + case SUBLANG_ENGLISH_AUS: return "en_AU"; + case SUBLANG_ENGLISH_CAN: return "en_CA"; + case SUBLANG_ENGLISH_NZ: return "en_NZ"; + case SUBLANG_ENGLISH_EIRE: return "en_IE"; + case SUBLANG_ENGLISH_SOUTH_AFRICA: return "en_ZA"; + case SUBLANG_ENGLISH_JAMAICA: return "en_JM"; + case SUBLANG_ENGLISH_CARIBBEAN: return "en_GD"; /* Grenada? */ + case SUBLANG_ENGLISH_BELIZE: return "en_BZ"; + case SUBLANG_ENGLISH_TRINIDAD: return "en_TT"; + case SUBLANG_ENGLISH_ZIMBABWE: return "en_ZW"; + case SUBLANG_ENGLISH_PHILIPPINES: return "en_PH"; + case SUBLANG_ENGLISH_INDONESIA: return "en_ID"; + case SUBLANG_ENGLISH_HONGKONG: return "en_HK"; + case SUBLANG_ENGLISH_INDIA: return "en_IN"; + case SUBLANG_ENGLISH_MALAYSIA: return "en_MY"; + case SUBLANG_ENGLISH_SINGAPORE: return "en_SG"; + } + return "en"; + case LANG_ESTONIAN: return "et_EE"; + case LANG_FAEROESE: return "fo_FO"; + case LANG_FARSI: return "fa_IR"; + case LANG_FINNISH: return "fi_FI"; + case LANG_FRENCH: + switch (sub) + { + case SUBLANG_FRENCH: return "fr_FR"; + case SUBLANG_FRENCH_BELGIAN: /* WALLOON */ return "fr_BE"; + case SUBLANG_FRENCH_CANADIAN: return "fr_CA"; + case SUBLANG_FRENCH_SWISS: return "fr_CH"; + case SUBLANG_FRENCH_LUXEMBOURG: return "fr_LU"; + case SUBLANG_FRENCH_MONACO: return "fr_MC"; + case SUBLANG_FRENCH_WESTINDIES: return "fr"; /* Caribbean? */ + case SUBLANG_FRENCH_REUNION: return "fr_RE"; + case SUBLANG_FRENCH_CONGO: return "fr_CG"; + case SUBLANG_FRENCH_SENEGAL: return "fr_SN"; + case SUBLANG_FRENCH_CAMEROON: return "fr_CM"; + case SUBLANG_FRENCH_COTEDIVOIRE: return "fr_CI"; + case SUBLANG_FRENCH_MALI: return "fr_ML"; + case SUBLANG_FRENCH_MOROCCO: return "fr_MA"; + case SUBLANG_FRENCH_HAITI: return "fr_HT"; + } + return "fr"; + case LANG_FRISIAN: return "fy_NL"; + case LANG_FULFULDE: return "ful_NG"; + case LANG_GAELIC: + switch (sub) + { + case 0x01: /* SCOTTISH */ return "gd_GB"; + case 0x02: /* IRISH */ return "ga_IE"; + } + return "C"; + case LANG_GALICIAN: return "gl_ES"; + case LANG_GEORGIAN: return "ka_GE"; + case LANG_GERMAN: + switch (sub) + { + case SUBLANG_GERMAN: return "de_DE"; + case SUBLANG_GERMAN_SWISS: return "de_CH"; + case SUBLANG_GERMAN_AUSTRIAN: return "de_AT"; + case SUBLANG_GERMAN_LUXEMBOURG: return "de_LU"; + case SUBLANG_GERMAN_LIECHTENSTEIN: return "de_LI"; + } + return "de"; + case LANG_GREEK: return "el_GR"; + case LANG_GUARANI: return "gn_PY"; + case LANG_GUJARATI: return "gu_IN"; + case LANG_HAUSA: return "ha_NG"; + case LANG_HAWAIIAN: + /* FIXME: Do they mean Hawaiian ("haw_US", 1000 speakers) + or Hawaii Creole English ("cpe_US", 600000 speakers)? */ + return "cpe_US"; + case LANG_HEBREW: return "he_IL"; + case LANG_HINDI: return "hi_IN"; + case LANG_HUNGARIAN: return "hu_HU"; + case LANG_IBIBIO: return "nic_NG"; + case LANG_ICELANDIC: return "is_IS"; + case LANG_IGBO: return "ibo_NG"; + case LANG_INDONESIAN: return "id_ID"; + case LANG_INUKTITUT: return "iu_CA"; + case LANG_ITALIAN: + switch (sub) + { + case SUBLANG_ITALIAN: return "it_IT"; + case SUBLANG_ITALIAN_SWISS: return "it_CH"; + } + return "it"; + case LANG_JAPANESE: return "ja_JP"; + case LANG_KANNADA: return "kn_IN"; + case LANG_KANURI: return "kau_NG"; + case LANG_KASHMIRI: + switch (sub) + { + case SUBLANG_DEFAULT: return "ks_PK"; + case SUBLANG_KASHMIRI_INDIA: return "ks_IN"; + } + return "ks"; + case LANG_KAZAK: return "kk_KZ"; + case LANG_KONKANI: + /* FIXME: Adjust this when such locales appear on Unix. */ + return "kok_IN"; + case LANG_KOREAN: return "ko_KR"; + case LANG_KYRGYZ: return "ky_KG"; + case LANG_LAO: return "lo_LA"; + case LANG_LATIN: return "la_VA"; + case LANG_LATVIAN: return "lv_LV"; + case LANG_LITHUANIAN: return "lt_LT"; + case LANG_MACEDONIAN: return "mk_MK"; + case LANG_MALAY: + switch (sub) + { + case SUBLANG_MALAY_MALAYSIA: return "ms_MY"; + case SUBLANG_MALAY_BRUNEI_DARUSSALAM: return "ms_BN"; + } + return "ms"; + case LANG_MALAYALAM: return "ml_IN"; + case LANG_MALTESE: return "mt_MT"; + case LANG_MANIPURI: + /* FIXME: Adjust this when such locales appear on Unix. */ + return "mni_IN"; + case LANG_MARATHI: return "mr_IN"; + case LANG_MONGOLIAN: + return "mn"; /* Ambiguous: could be "mn_CN" or "mn_MN". */ + case LANG_NEPALI: + switch (sub) + { + case SUBLANG_DEFAULT: return "ne_NP"; + case SUBLANG_NEPALI_INDIA: return "ne_IN"; + } + return "ne"; + case LANG_NORWEGIAN: + switch (sub) + { + case SUBLANG_NORWEGIAN_BOKMAL: return "no_NO"; + case SUBLANG_NORWEGIAN_NYNORSK: return "nn_NO"; + } + return "no"; + case LANG_ORIYA: return "or_IN"; + case LANG_OROMO: return "om_ET"; + case LANG_PAPIAMENTU: return "pap_AN"; + case LANG_PASHTO: + return "ps"; /* Ambiguous: could be "ps_PK" or "ps_AF". */ + case LANG_POLISH: return "pl_PL"; + case LANG_PORTUGUESE: + switch (sub) + { + case SUBLANG_PORTUGUESE: return "pt_PT"; + /* Hmm. SUBLANG_PORTUGUESE_BRAZILIAN == SUBLANG_DEFAULT. + Same phenomenon as SUBLANG_ENGLISH_US == SUBLANG_DEFAULT. */ + case SUBLANG_PORTUGUESE_BRAZILIAN: return "pt_BR"; + } + return "pt"; + case LANG_PUNJABI: + switch (sub) + { + case SUBLANG_PUNJABI_INDIA: return "pa_IN"; /* Gurmukhi script */ + case SUBLANG_PUNJABI_PAKISTAN: return "pa_PK"; /* Arabic script */ + } + return "pa"; + case LANG_RHAETO_ROMANCE: return "rm_CH"; + case LANG_ROMANIAN: + switch (sub) + { + case SUBLANG_ROMANIAN_ROMANIA: return "ro_RO"; + case SUBLANG_ROMANIAN_MOLDOVA: return "ro_MD"; + } + return "ro"; + case LANG_RUSSIAN: + return "ru"; /* Ambiguous: could be "ru_RU" or "ru_UA" or "ru_MD". */ + case LANG_SAAMI: /* actually Northern Sami */ return "se_NO"; + case LANG_SANSKRIT: return "sa_IN"; + case LANG_SINDHI: + switch (sub) + { + case SUBLANG_SINDHI_INDIA: return "sd_IN"; + case SUBLANG_SINDHI_PAKISTAN: return "sd_PK"; + } + return "sd"; + case LANG_SINHALESE: return "si_LK"; + case LANG_SLOVAK: return "sk_SK"; + case LANG_SLOVENIAN: return "sl_SI"; + case LANG_SOMALI: return "so_SO"; + case LANG_SORBIAN: + /* FIXME: Adjust this when such locales appear on Unix. */ + return "wen_DE"; + case LANG_SPANISH: + switch (sub) + { + case SUBLANG_SPANISH: return "es_ES"; + case SUBLANG_SPANISH_MEXICAN: return "es_MX"; + case SUBLANG_SPANISH_MODERN: + return "es_ES@modern"; /* not seen on Unix */ + case SUBLANG_SPANISH_GUATEMALA: return "es_GT"; + case SUBLANG_SPANISH_COSTA_RICA: return "es_CR"; + case SUBLANG_SPANISH_PANAMA: return "es_PA"; + case SUBLANG_SPANISH_DOMINICAN_REPUBLIC: return "es_DO"; + case SUBLANG_SPANISH_VENEZUELA: return "es_VE"; + case SUBLANG_SPANISH_COLOMBIA: return "es_CO"; + case SUBLANG_SPANISH_PERU: return "es_PE"; + case SUBLANG_SPANISH_ARGENTINA: return "es_AR"; + case SUBLANG_SPANISH_ECUADOR: return "es_EC"; + case SUBLANG_SPANISH_CHILE: return "es_CL"; + case SUBLANG_SPANISH_URUGUAY: return "es_UY"; + case SUBLANG_SPANISH_PARAGUAY: return "es_PY"; + case SUBLANG_SPANISH_BOLIVIA: return "es_BO"; + case SUBLANG_SPANISH_EL_SALVADOR: return "es_SV"; + case SUBLANG_SPANISH_HONDURAS: return "es_HN"; + case SUBLANG_SPANISH_NICARAGUA: return "es_NI"; + case SUBLANG_SPANISH_PUERTO_RICO: return "es_PR"; + } + return "es"; + case LANG_SUTU: return "bnt_TZ"; /* or "st_LS" or "nso_ZA"? */ + case LANG_SWAHILI: return "sw_KE"; + case LANG_SWEDISH: + switch (sub) + { + case SUBLANG_DEFAULT: return "sv_SE"; + case SUBLANG_SWEDISH_FINLAND: return "sv_FI"; + } + return "sv"; + case LANG_SYRIAC: return "syr_TR"; /* An extinct language. */ + case LANG_TAGALOG: return "tl_PH"; + case LANG_TAJIK: return "tg_TJ"; + case LANG_TAMAZIGHT: + switch (sub) + { + /* FIXME: Adjust this when Tamazight locales appear on Unix. */ + case SUBLANG_TAMAZIGHT_ARABIC: return "ber_MA@arabic"; + case SUBLANG_TAMAZIGHT_LATIN: return "ber_MA@latin"; + } + return "ber_MA"; + case LANG_TAMIL: + return "ta"; /* Ambiguous: could be "ta_IN" or "ta_LK" or "ta_SG". */ + case LANG_TATAR: return "tt_RU"; + case LANG_TELUGU: return "te_IN"; + case LANG_THAI: return "th_TH"; + case LANG_TIBETAN: return "bo_CN"; + case LANG_TIGRINYA: + switch (sub) + { + case SUBLANG_TIGRINYA_ETHIOPIA: return "ti_ET"; + case SUBLANG_TIGRINYA_ERITREA: return "ti_ER"; + } + return "ti"; + case LANG_TSONGA: return "ts_ZA"; + case LANG_TSWANA: return "tn_BW"; + case LANG_TURKISH: return "tr_TR"; + case LANG_TURKMEN: return "tk_TM"; + case LANG_UKRAINIAN: return "uk_UA"; + case LANG_URDU: + switch (sub) + { + case SUBLANG_URDU_PAKISTAN: return "ur_PK"; + case SUBLANG_URDU_INDIA: return "ur_IN"; + } + return "ur"; + case LANG_UZBEK: + switch (sub) + { + case SUBLANG_UZBEK_LATIN: return "uz_UZ"; + case SUBLANG_UZBEK_CYRILLIC: return "uz_UZ@cyrillic"; + } + return "uz"; + case LANG_VENDA: + /* FIXME: It's not clear whether Venda has the ISO 639-2 two-letter code + "ve" or not. + http://www.loc.gov/standards/iso639-2/englangn.html has it, but + http://lcweb.loc.gov/standards/iso639-2/codechanges.html doesn't, */ + return "ven_ZA"; /* or "ve_ZA"? */ + case LANG_VIETNAMESE: return "vi_VN"; + case LANG_WELSH: return "cy_GB"; + case LANG_XHOSA: return "xh_ZA"; + case LANG_YI: return "sit_CN"; + case LANG_YIDDISH: return "yi_IL"; + case LANG_YORUBA: return "yo_NG"; + case LANG_ZULU: return "zu_ZA"; + default: return "C"; + } + +#endif +} + +/* localname.c from gettext END. */ + +/* Support functions. */ + +typedef uint32_t u32; +typedef unsigned long ulong; + +static __inline__ u32 +do_swap_u32 (u32 i) +{ + return (i << 24) | ((i & 0xff00) << 8) | ((i >> 8) & 0xff00) | (i >> 24); +} + +#define SWAPIT(flag, data) ((flag) ? do_swap_u32(data) : (data)) + + +/* We assume to have `unsigned long int' value with at least 32 bits. */ +#define HASHWORDBITS 32 + +/* The so called `hashpjw' function by P.J. Weinberger + [see Aho/Sethi/Ullman, COMPILERS: Principles, Techniques and Tools, + 1986, 1987 Bell Telephone Laboratories, Inc.] */ + +static __inline__ ulong +hash_string( const char *str_param ) +{ + unsigned long int hval, g; + const char *str = str_param; + + hval = 0; + while (*str != '\0') + { + hval <<= 4; + hval += (unsigned long int) *str++; + g = hval & ((unsigned long int) 0xf << (HASHWORDBITS - 4)); + if (g != 0) + { + hval ^= g >> (HASHWORDBITS - 8); + hval ^= g; + } + } + return hval; +} + + +/* Generic message catalog and gettext stuff. */ + +/* The magic number of the GNU message catalog format. */ +#define MAGIC 0x950412de +#define MAGIC_SWAPPED 0xde120495 + +/* Revision number of the currently used .mo (binary) file format. */ +#define MO_REVISION_NUMBER 0 + +/* Header for binary .mo file format. */ +struct mo_file_header +{ + /* The magic number. */ + u32 magic; + /* The revision number of the file format. */ + u32 revision; + /* The number of strings pairs. */ + u32 nstrings; + /* Offset of table with start offsets of original strings. */ + u32 orig_tab_offset; + /* Offset of table with start offsets of translation strings. */ + u32 trans_tab_offset; + /* Size of hashing table. */ + u32 hash_tab_size; + /* Offset of first hashing entry. */ + u32 hash_tab_offset; +}; + +struct string_desc +{ + /* Length of addressed string. */ + u32 length; + /* Offset of string in file. */ + u32 offset; +}; + + +struct overflow_space_s +{ + struct overflow_space_s *next; + u32 idx; + char d[1]; +}; + +struct loaded_domain +{ + char *data; + int must_swap; + u32 nstrings; + char *mapped; /* 0 = not yet mapped, 1 = mapped, + 2 = mapped to + overflow space */ + struct overflow_space_s *overflow_space; + struct string_desc *orig_tab; + struct string_desc *trans_tab; + u32 hash_size; + u32 *hash_tab; +}; + + +/* Free the domain data. */ +static void +free_domain (struct loaded_domain *domain) +{ + struct overflow_space_s *os, *os2; + free (domain->data); + free (domain->mapped); + for (os = domain->overflow_space; os; os = os2) + { + os2 = os->next; + free (os); + } + free (domain); +} + + +/* The gettext implementation; support functions. */ +static struct loaded_domain * +load_domain (const char *filename) +{ + FILE *fp; + size_t size; + struct stat st; + struct mo_file_header *data = NULL; + struct loaded_domain *domain = NULL; + size_t to_read; + char *read_ptr; + + fp = fopen (filename, "rb"); + if (!fp) + return NULL; + + /* Determine the file size. */ + if (fstat (fileno (fp), &st) + || (size = (size_t) st.st_size) != st.st_size + || size < sizeof (struct mo_file_header)) + { + fclose (fp); + return NULL; + } + + data = malloc (size); + if (!data) + { + fclose (fp); + return NULL; + } + + to_read = size; + read_ptr = (char *) data; + do + { + long int nb = fread (read_ptr, 1, to_read, fp); + if (nb < to_read) + { + fclose (fp); + free (data); + return NULL; + } + read_ptr += nb; + to_read -= nb; + } + while (to_read > 0); + fclose (fp); + + /* Using the magic number we can test whether it really is a message + catalog file. */ + if (data->magic != MAGIC && data->magic != MAGIC_SWAPPED) + { + /* The magic number is wrong: not a message catalog file. */ + free (data); + return NULL; + } + + domain = calloc (1, sizeof *domain); + if (!domain) + { + free (data); + return NULL; + } + domain->data = (char *) data; + domain->must_swap = data->magic != MAGIC; + + /* Fill in the information about the available tables. */ + switch (SWAPIT (domain->must_swap, data->revision)) + { + case 0: + domain->nstrings = SWAPIT (domain->must_swap, data->nstrings); + domain->orig_tab = (struct string_desc *) + ((char *) data + SWAPIT (domain->must_swap, data->orig_tab_offset)); + domain->trans_tab = (struct string_desc *) + ((char *) data + SWAPIT (domain->must_swap, data->trans_tab_offset)); + domain->hash_size = SWAPIT (domain->must_swap, data->hash_tab_size); + domain->hash_tab = (u32 *) + ((char *) data + SWAPIT (domain->must_swap, data->hash_tab_offset)); + break; + + default: + /* This is an invalid revision. */ + free (data); + free (domain); + return NULL; + } + + /* Allocate an array to keep track of code page mappings. */ + domain->mapped = calloc (1, domain->nstrings); + if (!domain->mapped) + { + free (data); + free (domain); + return NULL; + } + + return domain; +} + + +char * +utf8_to_native (const char *string, size_t length, int delim) +{ + /* FIXME */ + return strdup (string); +} + +static const char* +get_string (struct loaded_domain *domain, u32 idx) +{ + struct overflow_space_s *os; + char *p; + + p = domain->data + SWAPIT (domain->must_swap, domain->trans_tab[idx].offset); + if (!domain->mapped[idx]) + { + size_t plen, buflen; + char *buf; + + domain->mapped[idx] = 1; + + plen = strlen (p); + buf = utf8_to_native (p, plen, -1); + buflen = strlen (buf); + if (buflen <= plen) + strcpy (p, buf); + else + { + /* There is not enough space for the translation - store it + in the overflow_space else and mark that in the mapped + array. Because we expect that this won't happen too + often, we use a simple linked list. */ + os = malloc (sizeof *os + buflen); + if (os) + { + os->idx = idx; + strcpy (os->d, buf); + os->next = domain->overflow_space; + domain->overflow_space = os; + p = os->d; + } + else + p = "ERROR in GETTEXT MALLOC"; + } + free (buf); + } + else if (domain->mapped[idx] == 2) + { + /* We need to get the string from the overflow_space. */ + for (os=domain->overflow_space; os; os = os->next) + if (os->idx == idx) + return (const char*) os->d; + p = "ERROR in GETTEXT\n"; + } + return (const char*) p; +} + + + +/* The domain we use. We only support one domain at this point. This + is why this implementation can not be shared. Bindtextdomain and + dgettext will simply cheat and always use this one domain. */ +static struct loaded_domain *the_domain; + + +/* Specify that the DOMAINNAME message catalog will be found + in DIRNAME rather than in the system locale data base. */ +char * +bindtextdomain (const char *domainname, const char *dirname) +{ + struct loaded_domain *domain = NULL; + const char *catval_full; + char *catval; + char *fname; + + /* DOMAINNAME is ignored. We only support one domain. */ + + /* DIRNAME is "$INSTALLDIR\share\locale". */ + + /* First found out the category value. */ + catval = NULL; + catval_full = _nl_locale_name (LC_MESSAGES, "LC_MESSAGES"); + + /* Normally, we would have to loop over all returned locales, and + search for the right file. See gettext intl/dcigettext.c for all + the gory details. Here, we only support the basic category, and + ignore everything else. */ + if (catval_full) + { + char *p; + + catval = malloc (strlen (catval_full) + 1); + if (catval) + { + strcpy (catval, catval_full); + p = strchr (catval, '_'); + if (p) + *p = '\0'; + } + } + if (!catval) + return NULL; + + /* Now build the filename string. The complete filename is this: + DIRNAME + \ + CATVAL + \LC_MESSAGES\ + DOMAINNAME + .mo */ + { + int len = strlen (dirname) + 1 + strlen (catval) + 13 + + strlen (domainname) + 3 + 1; + char *p; + + fname = malloc (len); + if (!fname) + { + free (catval); + return; + } + + p = fname; + strcpy (p, dirname); + p += strlen (dirname); + *(p++) = '\\'; + strcpy (p, catval); + p += strlen (catval); + strcpy (p, "\\LC_MESSAGES\\"); + p += 13; + strcpy (p, domainname); + p += strlen (domainname); + strcpy (p, ".mo"); + } + + domain = load_domain (fname); + free (catval); + free (fname); + + /* We should not be invoked twice, but this is how you would do + it if it happened. */ + if (the_domain) + free_domain (the_domain); + the_domain = domain; + return dirname; +} + + +const char * +gettext (const char *msgid) +{ + struct loaded_domain *domain; + size_t act = 0; + size_t top, bottom; + + if (!(domain = the_domain)) + goto not_found; + + /* Locate the MSGID and its translation. */ + if (domain->hash_size > 2 && domain->hash_tab) + { + /* Use the hashing table. */ + u32 len = strlen (msgid); + u32 hash_val = hash_string (msgid); + u32 idx = hash_val % domain->hash_size; + u32 incr = 1 + (hash_val % (domain->hash_size - 2)); + u32 nstr = SWAPIT (domain->must_swap, domain->hash_tab[idx]); + + if (!nstr) + /* Hash table entry is empty. */ + goto not_found; + + if (SWAPIT (domain->must_swap, + domain->orig_tab[nstr - 1].length) == len + && !strcmp (msgid, + domain->data + + SWAPIT (domain->must_swap, + domain->orig_tab[nstr - 1].offset))) + return get_string (domain, nstr - 1); + + for(;;) + { + if (idx >= domain->hash_size - incr) + idx -= domain->hash_size - incr; + else + idx += incr; + + nstr = SWAPIT (domain->must_swap, domain->hash_tab[idx]); + if (!nstr) + /* Hash table entry is empty. */ + goto not_found; + + if (SWAPIT (domain->must_swap, + domain->orig_tab[nstr - 1].length) == len + && !strcmp (msgid, + domain->data + + SWAPIT (domain->must_swap, + domain->orig_tab[nstr - 1].offset))) + return get_string (domain, nstr-1); + } + /* NOTREACHED */ + } + + /* Now we try the default method: binary search in the sorted array + of messages. */ + bottom = 0; + top = domain->nstrings; + while (bottom < top) + { + int cmp_val; + + act = (bottom + top) / 2; + cmp_val = strcmp(msgid, domain->data + + SWAPIT (domain->must_swap, + domain->orig_tab[act].offset)); + if (cmp_val < 0) + top = act; + else if (cmp_val > 0) + bottom = act + 1; + else + return get_string (domain, act); + } + + not_found: + return msgid; +} + + +char * +textdomain (const char *domainname) +{ + /* For now, support only one domain. */ + return domainname; +} + +char * +dgettext (const char *domainname, const char *msgid) +{ + /* For now, support only one domain. */ + return gettext (msgid); +} Added: trunk/src/w32-gettext.h =================================================================== --- trunk/src/w32-gettext.h 2005-10-23 20:01:04 UTC (rev 147) +++ trunk/src/w32-gettext.h 2005-10-25 18:22:59 UTC (rev 148) @@ -0,0 +1,54 @@ +/* w32-gettext.h - A simple gettext implementation for Windows targets. + Copyright (C) 2005 g10 Code GmbH + + This file is part of libgpg-error. + + libgpg-error 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. + + libgpg-error 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 libgpg-error; if not, write to the Free + Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. */ + +#if ENABLE_NLS + +#include +#if !defined LC_MESSAGES && !(defined __LOCALE_H || (defined _LOCALE_H && defined __sun)) +# define LC_MESSAGES 1729 +#endif + +/* If we build on w32, we will use our own simple gettext + implementation. For now, this is not a drop in replacement, so we + must cheat a bit and redirect all calls to the external gettext to + an internal implementation. We try to be as little invasive as + possible, so that the refactorization of the code occurs at logical + interfaces. + + Note that this function intimately knows the various definitions in + the target libintl.h and the local gettext.h file, from which it is + included. */ + +#define bindtextdomain _gpg_err_bindtextdomain +#define textdomain _gpg_err_textdomain +#define dgettext _gpg_err_dgettext +#define gettext _gpg_err_gettext + +/* Specify that the DOMAINNAME message catalog will be found + in DIRNAME rather than in the system locale data base. */ +char *bindtextdomain (const char *domainname, const char *dirname); + +const char *gettext (const char *msgid); + +char *textdomain (const char *domainname); + +char *libintl_dgettext (const char *domainname, const char *msgid); + +#endif /* ENABLE_NLS */ From cvs at cvs.gnupg.org Tue Oct 25 20:25:45 2005 From: cvs at cvs.gnupg.org (svn author marcus) Date: Tue Oct 25 19:55:00 2005 Subject: [svn] gpg-error - r149 - in trunk: . src Message-ID: Author: marcus Date: 2005-10-25 20:25:45 +0200 (Tue, 25 Oct 2005) New Revision: 149 Modified: trunk/ChangeLog trunk/src/Makefile.am trunk/src/gpg-error.c Log: 2005-10-25 Marcus Brinkmann * src/Makefile.am (gpg_error_CPPFLAGS): New variable. * src/gpg-error.c (i18n_init): Don't return anything. Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2005-10-25 18:22:59 UTC (rev 148) +++ trunk/ChangeLog 2005-10-25 18:25:45 UTC (rev 149) @@ -1,5 +1,8 @@ 2005-10-25 Marcus Brinkmann + * src/Makefile.am (gpg_error_CPPFLAGS): New variable. + * src/gpg-error.c (i18n_init): Don't return anything. + * src/Makefile.am (arch_sources): New variable. (libgpg_error_la_SOURCES): Add $(arch_sources). * src/gettext.h [HAVE_W32_SYSTEM]: Include w32-gettext.h. Modified: trunk/src/Makefile.am =================================================================== --- trunk/src/Makefile.am 2005-10-25 18:22:59 UTC (rev 148) +++ trunk/src/Makefile.am 2005-10-25 18:25:45 UTC (rev 149) @@ -96,6 +96,7 @@ libgpg_error_la_LIBADD = $(intllibs) gpg_error_SOURCES = strsource-sym.c strerror-sym.c gpg-error.c +gpg_error_CPPFLAGS = -DLOCALEDIR=\"$(localedir)\" gpg_error_LDADD = ./libgpg-error.la @LTLIBINTL@ err-sources.h: Makefile mkstrtable.awk err-sources.h.in Modified: trunk/src/gpg-error.c =================================================================== --- trunk/src/gpg-error.c 2005-10-25 18:22:59 UTC (rev 148) +++ trunk/src/gpg-error.c 2005-10-25 18:25:45 UTC (rev 149) @@ -78,8 +78,6 @@ drop_locale_dir (locale_dir); } textdomain (PACKAGE); - - return 0; } From cvs at cvs.gnupg.org Tue Oct 25 21:18:13 2005 From: cvs at cvs.gnupg.org (svn author marcus) Date: Tue Oct 25 20:47:28 2005 Subject: [svn] gpg-error - r150 - in trunk: . src Message-ID: Author: marcus Date: 2005-10-25 21:18:13 +0200 (Tue, 25 Oct 2005) New Revision: 150 Modified: trunk/ChangeLog trunk/src/w32-gettext.c Log: 2005-10-25 Marcus Brinkmann * src/w32-gettext.c (get_string): Remove extra arguments to utf8_to_native_invocation. (utf8_to_wchar, wchar_to_native): New function. (utf8_to_native): Rewritten. Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2005-10-25 18:25:45 UTC (rev 149) +++ trunk/ChangeLog 2005-10-25 19:18:13 UTC (rev 150) @@ -1,5 +1,10 @@ 2005-10-25 Marcus Brinkmann + * src/w32-gettext.c (get_string): Remove extra arguments to + utf8_to_native_invocation. + (utf8_to_wchar, wchar_to_native): New function. + (utf8_to_native): Rewritten. + * src/Makefile.am (gpg_error_CPPFLAGS): New variable. * src/gpg-error.c (i18n_init): Don't return anything. Modified: trunk/src/w32-gettext.c =================================================================== --- trunk/src/w32-gettext.c 2005-10-25 18:25:45 UTC (rev 149) +++ trunk/src/w32-gettext.c 2005-10-25 19:18:13 UTC (rev 150) @@ -1410,13 +1410,81 @@ } +/* Return a malloced string encoded in UTF-8 from the wide char input + string STRING. Caller must free this value. On failure returns + NULL; caller may use GetLastError to get the actual error number. + The result of calling this function with STRING set to NULL is not + defined. */ char * -utf8_to_native (const char *string, size_t length, int delim) +wchar_to_native (const wchar_t *string) { - /* FIXME */ - return strdup (string); + int n; + char *result; + + n = WideCharToMultiByte (CP_ACP, 0, string, -1, NULL, 0, NULL, NULL); + if (n < 0) + return NULL; + + result = malloc (n+1); + if (!result) + return NULL; + + n = WideCharToMultiByte (CP_ACP, 0, string, -1, result, n, NULL, NULL); + if (n < 0) + { + free (result); + return NULL; + } + return result; } + +/* Return a malloced wide char string from an UTF-8 encoded input + string STRING. Caller must free this value. On failure returns + NULL; caller may use GetLastError to get the actual error number. + The result of calling this function with STRING set to NULL is not + defined. */ +wchar_t * +utf8_to_wchar (const char *string) +{ + int n; + wchar_t *result; + + n = MultiByteToWideChar (CP_UTF8, 0, string, -1, NULL, 0); + if (n < 0) + return NULL; + + result = malloc ((n+1) * sizeof *result); + if (!result) + return NULL; + + n = MultiByteToWideChar (CP_UTF8, 0, string, -1, result, n); + if (n < 0) + { + free (result); + return NULL; + } + return result; +} + + +char * +utf8_to_native (const char *string) +{ + wchar_t *wstring; + char *result; + + wstring = utf8_to_wchar (string); + if (!wstring) + return NULL; + + result = wchar_to_native (wstring); + free (wstring); + + return result; +} + + static const char* get_string (struct loaded_domain *domain, u32 idx) { @@ -1432,7 +1500,7 @@ domain->mapped[idx] = 1; plen = strlen (p); - buf = utf8_to_native (p, plen, -1); + buf = utf8_to_native (p); buflen = strlen (buf); if (buflen <= plen) strcpy (p, buf); From cvs at cvs.gnupg.org Tue Oct 25 21:53:48 2005 From: cvs at cvs.gnupg.org (svn author marcus) Date: Tue Oct 25 21:23:06 2005 Subject: [svn] gpg-error - r151 - trunk/src Message-ID: Author: marcus Date: 2005-10-25 21:53:48 +0200 (Tue, 25 Oct 2005) New Revision: 151 Modified: trunk/src/w32-gettext.c Log: Fix last change. Modified: trunk/src/w32-gettext.c =================================================================== --- trunk/src/w32-gettext.c 2005-10-25 19:18:13 UTC (rev 150) +++ trunk/src/w32-gettext.c 2005-10-25 19:53:48 UTC (rev 151) @@ -1415,7 +1415,7 @@ NULL; caller may use GetLastError to get the actual error number. The result of calling this function with STRING set to NULL is not defined. */ -char * +static char * wchar_to_native (const wchar_t *string) { int n; @@ -1444,7 +1444,7 @@ NULL; caller may use GetLastError to get the actual error number. The result of calling this function with STRING set to NULL is not defined. */ -wchar_t * +static wchar_t * utf8_to_wchar (const char *string) { int n; @@ -1468,7 +1468,7 @@ } -char * +static char * utf8_to_native (const char *string) { wchar_t *wstring; From cvs at cvs.gnupg.org Wed Oct 26 12:48:48 2005 From: cvs at cvs.gnupg.org (svn author wk) Date: Wed Oct 26 12:17:59 2005 Subject: [svn] gpg-error - r152 - in trunk: . po Message-ID: Author: wk Date: 2005-10-26 12:48:47 +0200 (Wed, 26 Oct 2005) New Revision: 152 Modified: trunk/ChangeLog trunk/Makefile.am trunk/po/de.po trunk/po/fr.po trunk/po/libgpg-error.pot trunk/po/pl.po trunk/po/ro.po Log: Use bzip2 for the dist target. Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2005-10-25 19:53:48 UTC (rev 151) +++ trunk/ChangeLog 2005-10-26 10:48:47 UTC (rev 152) @@ -1,3 +1,7 @@ +2005-10-26 Werner Koch + + * Makefile.am: Used dist-bzip2 option. + 2005-10-25 Marcus Brinkmann * src/w32-gettext.c (get_string): Remove extra arguments to Modified: trunk/Makefile.am =================================================================== --- trunk/Makefile.am 2005-10-25 19:53:48 UTC (rev 151) +++ trunk/Makefile.am 2005-10-26 10:48:47 UTC (rev 152) @@ -20,6 +20,7 @@ SUBDIRS = m4 src tests po ACLOCAL_AMFLAGS = -I m4 +AUTOMAKE_OPTIONS = dist-bzip2 EXTRA_DIST = autogen.sh config.rpath libgpg-error.spec.in Modified: trunk/po/de.po =================================================================== --- trunk/po/de.po 2005-10-25 19:53:48 UTC (rev 151) +++ trunk/po/de.po 2005-10-26 10:48:47 UTC (rev 152) @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: libgpg-error-1.0\n" "Report-Msgid-Bugs-To: translations@gnupg.org\n" -"POT-Creation-Date: 2005-06-19 13:35+0200\n" +"POT-Creation-Date: 2005-10-26 10:43+0200\n" "PO-Revision-Date: 2004-07-30 14:55+0200\n" "Last-Translator: Werner Koch \n" "Language-Team: none\n" @@ -914,12 +914,12 @@ msgid "Unknown error code" msgstr "Unbekannter Fehlercode" -#: src/gpg-error.c:281 +#: src/gpg-error.c:452 #, c-format msgid "Usage: %s GPG-ERROR [...]\n" msgstr "Aufruf: %s GPG-FEHLER [...]\n" -#: src/gpg-error.c:302 +#: src/gpg-error.c:473 #, c-format msgid "%s: warning: could not recognize %s\n" msgstr "%s: Warnung: %s konnte nicht erkannt werden\n" Modified: trunk/po/fr.po =================================================================== --- trunk/po/fr.po 2005-10-25 19:53:48 UTC (rev 151) +++ trunk/po/fr.po 2005-10-26 10:48:47 UTC (rev 152) @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: libgpg-error 1.0\n" "Report-Msgid-Bugs-To: translations@gnupg.org\n" -"POT-Creation-Date: 2005-06-19 13:35+0200\n" +"POT-Creation-Date: 2005-10-26 10:43+0200\n" "PO-Revision-Date: 2005-08-18 16:48+0100\n" "Last-Translator: Stephane Roy \n" "Language-Team: French \n" @@ -911,12 +911,12 @@ msgid "Unknown error code" msgstr "Code d'erreur inconnu" -#: src/gpg-error.c:281 +#: src/gpg-error.c:452 #, c-format msgid "Usage: %s GPG-ERROR [...]\n" msgstr "Usage : %s GPG-ERROR [...]\n" -#: src/gpg-error.c:302 +#: src/gpg-error.c:473 #, c-format msgid "%s: warning: could not recognize %s\n" msgstr "%s : attention : pourrait ne pas reconnaître %s\n" Modified: trunk/po/libgpg-error.pot =================================================================== --- trunk/po/libgpg-error.pot 2005-10-25 19:53:48 UTC (rev 151) +++ trunk/po/libgpg-error.pot 2005-10-26 10:48:47 UTC (rev 152) @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: translations@gnupg.org\n" -"POT-Creation-Date: 2005-06-19 13:35+0200\n" +"POT-Creation-Date: 2005-10-26 10:43+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -912,12 +912,12 @@ msgid "Unknown error code" msgstr "" -#: src/gpg-error.c:281 +#: src/gpg-error.c:452 #, c-format msgid "Usage: %s GPG-ERROR [...]\n" msgstr "" -#: src/gpg-error.c:302 +#: src/gpg-error.c:473 #, c-format msgid "%s: warning: could not recognize %s\n" msgstr "" Modified: trunk/po/pl.po =================================================================== --- trunk/po/pl.po 2005-10-25 19:53:48 UTC (rev 151) +++ trunk/po/pl.po 2005-10-26 10:48:47 UTC (rev 152) @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: libgpg-error 0.8-cvs\n" "Report-Msgid-Bugs-To: translations@gnupg.org\n" -"POT-Creation-Date: 2005-06-19 13:35+0200\n" +"POT-Creation-Date: 2005-10-26 10:43+0200\n" "PO-Revision-Date: 2004-04-20 21:03+0200\n" "Last-Translator: Jakub Bogusz \n" "Language-Team: Polish \n" @@ -916,12 +916,12 @@ msgid "Unknown error code" msgstr "Nieznany kod b³êdu" -#: src/gpg-error.c:281 +#: src/gpg-error.c:452 #, c-format msgid "Usage: %s GPG-ERROR [...]\n" msgstr "Sk³adnia: %s B£¡D-GPG [...]\n" -#: src/gpg-error.c:302 +#: src/gpg-error.c:473 #, c-format msgid "%s: warning: could not recognize %s\n" msgstr "%s: uwaga: nie rozpoznano %s\n" Modified: trunk/po/ro.po =================================================================== --- trunk/po/ro.po 2005-10-25 19:53:48 UTC (rev 151) +++ trunk/po/ro.po 2005-10-26 10:48:47 UTC (rev 152) @@ -9,7 +9,7 @@ msgstr "" "Project-Id-Version: libgpg-error 1.1\n" "Report-Msgid-Bugs-To: translations@gnupg.org\n" -"POT-Creation-Date: 2005-06-19 13:35+0200\n" +"POT-Creation-Date: 2005-10-26 10:43+0200\n" "PO-Revision-Date: 2005-06-30 12:00-0500\n" "Last-Translator: Laurentiu Buzdugan \n" "Language-Team: Romanian \n" @@ -917,12 +917,12 @@ msgid "Unknown error code" msgstr "Cod de eroare necunoscut" -#: src/gpg-error.c:281 +#: src/gpg-error.c:452 #, c-format msgid "Usage: %s GPG-ERROR [...]\n" msgstr "Folosire: %s EROARE-GPG [...]\n" -#: src/gpg-error.c:302 +#: src/gpg-error.c:473 #, c-format msgid "%s: warning: could not recognize %s\n" msgstr "%s: avertisment: nu am putut recunoaºte %s\n" From cvs at cvs.gnupg.org Wed Oct 26 16:46:18 2005 From: cvs at cvs.gnupg.org (svn author wk) Date: Wed Oct 26 16:15:28 2005 Subject: [svn] dirmngr - r217 - trunk Message-ID: Author: wk Date: 2005-10-26 16:46:18 +0200 (Wed, 26 Oct 2005) New Revision: 217 Modified: trunk/ChangeLog trunk/NEWS trunk/README trunk/configure.ac Log: Releasing 0.9.3 Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2005-10-20 14:32:39 UTC (rev 216) +++ trunk/ChangeLog 2005-10-26 14:46:18 UTC (rev 217) @@ -1,3 +1,7 @@ +2005-10-26 Werner Koch + + Released 0.9.3. + 2005-10-20 Marcus Brinkmann * doc/dirmngr.texi: Fix direntry. Thanks to Rex Dieter. Modified: trunk/NEWS =================================================================== --- trunk/NEWS 2005-10-20 14:32:39 UTC (rev 216) +++ trunk/NEWS 2005-10-26 14:46:18 UTC (rev 217) @@ -1,7 +1,9 @@ -Noteworthy changes in version 0.9.3 +Noteworthy changes in version 0.9.3 (2005-10-26) ------------------------------------------------ + * Minor bug fixes. + Noteworthy changes in version 0.9.2 (2005-04-21) ------------------------------------------------ Modified: trunk/README =================================================================== --- trunk/README 2005-10-20 14:32:39 UTC (rev 216) +++ trunk/README 2005-10-26 14:46:18 UTC (rev 217) @@ -1,7 +1,7 @@ Dirmngr - X.509 Directory Manager ------------------------------------- - Version 0.9.1 + Version 0.9.x Intro Modified: trunk/configure.ac =================================================================== --- trunk/configure.ac 2005-10-20 14:32:39 UTC (rev 216) +++ trunk/configure.ac 2005-10-26 14:46:18 UTC (rev 217) @@ -22,7 +22,7 @@ AC_PREREQ(2.59) min_automake_version="1.9.3" -AC_INIT(dirmngr, 0.9.3-cvs, gpa-dev@gnupg.org) +AC_INIT(dirmngr, 0.9.3, gpa-dev@gnupg.org) NEED_GPG_ERROR_VERSION=0.7 From cvs at cvs.gnupg.org Wed Oct 26 16:52:21 2005 From: cvs at cvs.gnupg.org (svn author wk) Date: Wed Oct 26 16:21:29 2005 Subject: [svn] dirmngr - r218 - tags Message-ID: Author: wk Date: 2005-10-26 16:52:20 +0200 (Wed, 26 Oct 2005) New Revision: 218 Added: tags/dirmngr-0.9.3/ Log: tagged released Copied: tags/dirmngr-0.9.3 (from rev 217, trunk) From cvs at cvs.gnupg.org Wed Oct 26 17:01:48 2005 From: cvs at cvs.gnupg.org (svn author wk) Date: Wed Oct 26 16:30:59 2005 Subject: [svn] dirmngr - r219 - trunk Message-ID: Author: wk Date: 2005-10-26 17:01:47 +0200 (Wed, 26 Oct 2005) New Revision: 219 Modified: trunk/NEWS trunk/configure.ac Log: post release updates Modified: trunk/NEWS =================================================================== --- trunk/NEWS 2005-10-26 14:52:20 UTC (rev 218) +++ trunk/NEWS 2005-10-26 15:01:47 UTC (rev 219) @@ -1,3 +1,8 @@ +Noteworthy changes in version 0.9.4 +------------------------------------------------ + + + Noteworthy changes in version 0.9.3 (2005-10-26) ------------------------------------------------ Modified: trunk/configure.ac =================================================================== --- trunk/configure.ac 2005-10-26 14:52:20 UTC (rev 218) +++ trunk/configure.ac 2005-10-26 15:01:47 UTC (rev 219) @@ -22,7 +22,7 @@ AC_PREREQ(2.59) min_automake_version="1.9.3" -AC_INIT(dirmngr, 0.9.3, gpa-dev@gnupg.org) +AC_INIT(dirmngr, 0.9.4-cvs, gpa-dev@gnupg.org) NEED_GPG_ERROR_VERSION=0.7 From cvs at cvs.gnupg.org Wed Oct 26 18:09:26 2005 From: cvs at cvs.gnupg.org (svn author dshaw) Date: Wed Oct 26 17:40:09 2005 Subject: [svn] GnuPG - r3915 - trunk/g10 Message-ID: Author: dshaw Date: 2005-10-26 18:09:23 +0200 (Wed, 26 Oct 2005) New Revision: 3915 Modified: trunk/g10/ChangeLog trunk/g10/keygen.c Log: * keygen.c (proc_parameter_file): Default key and subkey usage flags to algo capabilities if parameter file doesn't specify them. Noted by Timo Schulz. Modified: trunk/g10/ChangeLog =================================================================== --- trunk/g10/ChangeLog 2005-10-21 15:03:18 UTC (rev 3914) +++ trunk/g10/ChangeLog 2005-10-26 16:09:23 UTC (rev 3915) @@ -1,3 +1,9 @@ +2005-10-26 David Shaw + + * keygen.c (proc_parameter_file): Default key and subkey usage + flags to algo capabilities if parameter file doesn't specify them. + Noted by Timo Schulz. + 2005-10-18 Werner Koch * cardglue.c (pin_cb): Fixed prompt for repeated PIN. Return Modified: trunk/g10/keygen.c =================================================================== --- trunk/g10/keygen.c 2005-10-21 15:03:18 UTC (rev 3914) +++ trunk/g10/keygen.c 2005-10-26 16:09:23 UTC (rev 3915) @@ -1955,7 +1955,7 @@ } } r->u.usage = use; - return 0; + return 1; } static int @@ -2062,14 +2062,14 @@ const char *s1, *s2, *s3; size_t n; char *p; - int have_user_id=0; + int have_user_id=0,err,algo; /* Check that we have all required parameters. */ r = get_parameter( para, pKEYTYPE ); if(r) { - if(check_pubkey_algo2(get_parameter_algo(para,pKEYTYPE), - PUBKEY_USAGE_SIG)) + algo=get_parameter_algo(para,pKEYTYPE); + if(check_pubkey_algo2(algo,PUBKEY_USAGE_SIG)) { log_error("%s:%d: invalid algorithm\n", fname, r->lnr ); return -1; @@ -2081,19 +2081,41 @@ return -1; } - if (parse_parameter_usage (fname, para, pKEYUSAGE)) + err=parse_parameter_usage (fname, para, pKEYUSAGE); + if(err==0) + { + /* Default to algo capabilities if key-usage is not provided */ + r=xmalloc_clear(sizeof(*r)); + r->key=pKEYUSAGE; + r->u.usage=openpgp_pk_algo_usage(algo); + r->next=para; + para=r; + } + else if(err==-1) return -1; r = get_parameter( para, pSUBKEYTYPE ); if(r) { - if(check_pubkey_algo( get_parameter_algo( para, pSUBKEYTYPE))) + algo=get_parameter_algo( para, pSUBKEYTYPE); + if(check_pubkey_algo(algo)) { log_error("%s:%d: invalid algorithm\n", fname, r->lnr ); return -1; } - if(parse_parameter_usage (fname, para, pSUBKEYUSAGE)) + err=parse_parameter_usage (fname, para, pSUBKEYUSAGE); + if(err==0) + { + /* Default to algo capabilities if subkey-usage is not + provided */ + r=xmalloc_clear(sizeof(*r)); + r->key=pSUBKEYUSAGE; + r->u.usage=openpgp_pk_algo_usage(algo); + r->next=para; + para=r; + } + else if(err==-1) return -1; } From cvs at cvs.gnupg.org Thu Oct 27 11:14:29 2005 From: cvs at cvs.gnupg.org (svn author wk) Date: Thu Oct 27 10:43:34 2005 Subject: [svn] GnuPG - r3916 - trunk/g10 Message-ID: Author: wk Date: 2005-10-27 11:14:27 +0200 (Thu, 27 Oct 2005) New Revision: 3916 Modified: trunk/g10/ChangeLog trunk/g10/apdu.c trunk/g10/apdu.h trunk/g10/gpg.c Log: cygwin fixes Modified: trunk/g10/ChangeLog =================================================================== --- trunk/g10/ChangeLog 2005-10-26 16:09:23 UTC (rev 3915) +++ trunk/g10/ChangeLog 2005-10-27 09:14:27 UTC (rev 3916) @@ -1,3 +1,26 @@ +2005-10-27 Werner Koch + + * gpg.c [__CYGWIN__]: Set default driver to winscard.dll. + + * apdu.c, apdu.h: Updated from gnupg 1.9. Changes are: + * apdu.c [__CYGWIN__]: Make cygwin environment similar to _WIN32. + Suggested by John P. Clizbe. + * apdu.h (SW_HOST_NO_KEYPAD): New. + * apdu.c (host_sw_string): Support new code. + (reader_table_s): New field CHECK_KEYPAD. + (new_reader_slot, open_ct_reader, open_pcsc_reader) + (open_ccid_reader, open_rapdu_reader): Initialize it. + (check_ccid_keypad): New. + (apdu_check_keypad): New. + (apdu_send_le): Factored all code out to ... + (send_le): .. new. Takes an additional arg; changed all callers + of the orginal function to use this one with a NULL for the new + arg. + (apdu_send_simple_kp): New. + (ct_send_apdu, pcsc_send_apdu, my_rapdu_send_apdu) + (send_apdu_ccid): New arg PININFO. + (send_apdu_ccid): Use the new arg. + 2005-10-26 David Shaw * keygen.c (proc_parameter_file): Default key and subkey usage Modified: trunk/g10/apdu.c =================================================================== --- trunk/g10/apdu.c 2005-10-26 16:09:23 UTC (rev 3915) +++ trunk/g10/apdu.c 2005-10-27 09:14:27 UTC (rev 3916) @@ -66,10 +66,10 @@ #include "ccid-driver.h" -/* To to conflicting use of threading libraries we usually can't link +/* Due to conflicting use of threading libraries we usually can't link against libpcsclite. Instead we use a wrapper program. */ #ifdef USE_GNU_PTH -#ifndef HAVE_W32_SYSTEM +#if !defined(HAVE_W32_SYSTEM) && !defined(__CYGWIN__) #define NEED_PCSC_WRAPPER 1 #endif #endif @@ -78,7 +78,7 @@ #define MAX_READER 4 /* Number of readers we support concurrently. */ -#ifdef _WIN32 +#if defined(_WIN32) || defined(__CYGWIN__) #define DLSTDCALL __stdcall #else #define DLSTDCALL @@ -90,6 +90,14 @@ #define MAX_OPEN_FDS 20 #endif +/* Helper to pass patrameters related to keypad based operations. */ +struct pininfo_s +{ + int mode; + int minlen; + int maxlen; + int padlen; +}; /* A structure to collect information pertaining to one reader slot. */ @@ -103,7 +111,8 @@ int (*reset_reader)(int); int (*get_status_reader)(int, unsigned int *); int (*send_apdu_reader)(int,unsigned char *,size_t, - unsigned char *, size_t *); + unsigned char *, size_t *, struct pininfo_s *); + int (*check_keypad)(int, int, int, int, int, int); void (*dump_status_reader)(int); struct { @@ -320,6 +329,7 @@ reader_table[reader].reset_reader = NULL; reader_table[reader].get_status_reader = NULL; reader_table[reader].send_apdu_reader = NULL; + reader_table[reader].check_keypad = NULL; reader_table[reader].dump_status_reader = NULL; reader_table[reader].used = 1; @@ -372,6 +382,7 @@ case SW_HOST_GENERAL_ERROR: return "general error"; case SW_HOST_NO_READER: return "no reader"; case SW_HOST_ABORTED: return "aborted"; + case SW_HOST_NO_KEYPAD: return "no keypad"; default: return "unknown host status error"; } } @@ -533,7 +544,7 @@ set to BUFLEN. Returns: CT API error code. */ static int ct_send_apdu (int slot, unsigned char *apdu, size_t apdulen, - unsigned char *buffer, size_t *buflen) + unsigned char *buffer, size_t *buflen, struct pininfo_s *pininfo) { int rc; unsigned char dad[1], sad[1]; @@ -596,6 +607,7 @@ reader_table[reader].reset_reader = reset_ct_reader; reader_table[reader].get_status_reader = ct_get_status; reader_table[reader].send_apdu_reader = ct_send_apdu; + reader_table[reader].check_keypad = NULL; reader_table[reader].dump_status_reader = ct_dump_reader_status; dump_reader_status (reader); @@ -1082,7 +1094,8 @@ set to BUFLEN. Returns: CT API error code. */ static int pcsc_send_apdu (int slot, unsigned char *apdu, size_t apdulen, - unsigned char *buffer, size_t *buflen) + unsigned char *buffer, size_t *buflen, + struct pininfo_s *pininfo) { #ifdef NEED_PCSC_WRAPPER long err; @@ -1479,6 +1492,7 @@ reader_table[slot].reset_reader = reset_pcsc_reader; reader_table[slot].get_status_reader = pcsc_get_status; reader_table[slot].send_apdu_reader = pcsc_send_apdu; + reader_table[slot].check_keypad = NULL; reader_table[slot].dump_status_reader = dump_pcsc_reader_status; /* Read the status so that IS_T0 will be set. */ @@ -1625,6 +1639,7 @@ reader_table[slot].reset_reader = reset_pcsc_reader; reader_table[slot].get_status_reader = pcsc_get_status; reader_table[slot].send_apdu_reader = pcsc_send_apdu; + reader_table[slot].check_keypad = NULL; reader_table[slot].dump_status_reader = dump_pcsc_reader_status; /* log_debug ("state from pcsc_status: 0x%lx\n", card_state); */ @@ -1713,7 +1728,8 @@ set to BUFLEN. Returns: Internal CCID driver error code. */ static int send_apdu_ccid (int slot, unsigned char *apdu, size_t apdulen, - unsigned char *buffer, size_t *buflen) + unsigned char *buffer, size_t *buflen, + struct pininfo_s *pininfo) { long err; size_t maxbuflen; @@ -1727,9 +1743,18 @@ log_printhex (" APDU_data:", apdu, apdulen); maxbuflen = *buflen; - err = ccid_transceive (reader_table[slot].ccid.handle, - apdu, apdulen, - buffer, maxbuflen, buflen); + if (pininfo) + err = ccid_transceive_secure (reader_table[slot].ccid.handle, + apdu, apdulen, + pininfo->mode, + pininfo->minlen, + pininfo->maxlen, + pininfo->padlen, + buffer, maxbuflen, buflen); + else + err = ccid_transceive (reader_table[slot].ccid.handle, + apdu, apdulen, + buffer, maxbuflen, buflen); if (err) log_error ("ccid_transceive failed: (0x%lx)\n", err); @@ -1737,6 +1762,24 @@ return err; } + +/* Check whether the CCID reader supports the ISO command code COMMAND + on the keypad. Return 0 on success. For a description of the pin + parameters, see ccid-driver.c */ +static int +check_ccid_keypad (int slot, int command, int pin_mode, + int pinlen_min, int pinlen_max, int pin_padlen) +{ + unsigned char apdu[] = { 0, 0, 0, 0x81 }; + + apdu[1] = command; + return ccid_transceive_secure (reader_table[slot].ccid.handle, + apdu, sizeof apdu, + pin_mode, pinlen_min, pinlen_max, pin_padlen, + NULL, 0, NULL); +} + + /* Open the reader and try to read an ATR. */ static int open_ccid_reader (const char *portstr) @@ -1776,6 +1819,7 @@ reader_table[slot].reset_reader = reset_ccid_reader; reader_table[slot].get_status_reader = get_status_ccid; reader_table[slot].send_apdu_reader = send_apdu_ccid; + reader_table[slot].check_keypad = check_ccid_keypad; reader_table[slot].dump_status_reader = dump_ccid_reader_status; dump_reader_status (slot); @@ -1932,7 +1976,8 @@ set to BUFLEN. Returns: APDU error code. */ static int my_rapdu_send_apdu (int slot, unsigned char *apdu, size_t apdulen, - unsigned char *buffer, size_t *buflen) + unsigned char *buffer, size_t *buflen, + struct pininfo_s *pininfo) { int err; reader_table_t slotp; @@ -2063,6 +2108,7 @@ reader_table[slot].reset_reader = reset_rapdu_reader; reader_table[slot].get_status_reader = my_rapdu_get_status; reader_table[slot].send_apdu_reader = my_rapdu_send_apdu; + reader_table[slot].check_keypad = NULL; reader_table[slot].dump_status_reader = NULL; dump_reader_status (slot); @@ -2198,28 +2244,28 @@ pcsc_establish_context = dlsym (handle, "SCardEstablishContext"); pcsc_release_context = dlsym (handle, "SCardReleaseContext"); pcsc_list_readers = dlsym (handle, "SCardListReaders"); -#ifdef _WIN32 +#if defined(_WIN32) || defined(__CYGWIN__) if (!pcsc_list_readers) pcsc_list_readers = dlsym (handle, "SCardListReadersA"); #endif pcsc_get_status_change = dlsym (handle, "SCardGetStatusChange"); -#ifdef _WIN32 +#if defined(_WIN32) || defined(__CYGWIN__) if (!pcsc_get_status_change) pcsc_get_status_change = dlsym (handle, "SCardGetStatusChangeA"); #endif pcsc_connect = dlsym (handle, "SCardConnect"); -#ifdef _WIN32 +#if defined(_WIN32) || defined(__CYGWIN__) if (!pcsc_connect) pcsc_connect = dlsym (handle, "SCardConnectA"); #endif pcsc_reconnect = dlsym (handle, "SCardReconnect"); -#ifdef _WIN32 +#if defined(_WIN32) || defined(__CYGWIN__) if (!pcsc_reconnect) pcsc_reconnect = dlsym (handle, "SCardReconnectA"); #endif pcsc_disconnect = dlsym (handle, "SCardDisconnect"); pcsc_status = dlsym (handle, "SCardStatus"); -#ifdef _WIN32 +#if defined(_WIN32) || defined(__CYGWIN__) if (!pcsc_status) pcsc_status = dlsym (handle, "SCardStatusA"); #endif @@ -2492,11 +2538,30 @@ } +/* Check whether the reader supports the ISO command code COMMAND on + the keypad. Return 0 on success. For a description of the pin + parameters, see ccid-driver.c */ +int +apdu_check_keypad (int slot, int command, int pin_mode, + int pinlen_min, int pinlen_max, int pin_padlen) +{ + if (slot < 0 || slot >= MAX_READER || !reader_table[slot].used ) + return SW_HOST_NO_DRIVER; + + if (reader_table[slot].check_keypad) + return reader_table[slot].check_keypad (slot, command, + pin_mode, pinlen_min, pinlen_max, + pin_padlen); + else + return SW_HOST_NOT_SUPPORTED; +} + + /* Dispatcher for the actual send_apdu function. Note, that this function should be called in locked state. */ static int send_apdu (int slot, unsigned char *apdu, size_t apdulen, - unsigned char *buffer, size_t *buflen) + unsigned char *buffer, size_t *buflen, struct pininfo_s *pininfo) { if (slot < 0 || slot >= MAX_READER || !reader_table[slot].used ) return SW_HOST_NO_DRIVER; @@ -2504,24 +2569,20 @@ if (reader_table[slot].send_apdu_reader) return reader_table[slot].send_apdu_reader (slot, apdu, apdulen, - buffer, buflen); + buffer, buflen, pininfo); else return SW_HOST_NOT_SUPPORTED; } -/* Send an APDU to the card in SLOT. The APDU is created from all - given parameters: CLASS, INS, P0, P1, LC, DATA, LE. A value of -1 - for LC won't sent this field and the data field; in this case DATA - must also be passed as NULL. The return value is the status word - or -1 for an invalid SLOT or other non card related error. If - RETBUF is not NULL, it will receive an allocated buffer with the - returned data. The length of that data will be put into - *RETBUFLEN. The caller is reponsible for releasing the buffer even - in case of errors. */ -int -apdu_send_le(int slot, int class, int ins, int p0, int p1, - int lc, const char *data, int le, - unsigned char **retbuf, size_t *retbuflen) + +/* Core APDU trabceiver function. Parameters are described at + apdu_send_le with the exception of PININFO which indicates keypad + related operations if not NULL. */ +static int +send_le (int slot, int class, int ins, int p0, int p1, + int lc, const char *data, int le, + unsigned char **retbuf, size_t *retbuflen, + struct pininfo_s *pininfo) { #define RESULTLEN 256 unsigned char result[RESULTLEN+10]; /* 10 extra in case of bugs in @@ -2570,7 +2631,7 @@ /* As safeguard don't pass any garbage from the stack to the driver. */ memset (apdu+apdulen, 0, sizeof (apdu) - apdulen); resultlen = RESULTLEN; - rc = send_apdu (slot, apdu, apdulen, result, &resultlen); + rc = send_apdu (slot, apdu, apdulen, result, &resultlen, pininfo); if (rc || resultlen < 2) { log_error ("apdu_send_simple(%d) failed: %s\n", @@ -2638,7 +2699,7 @@ apdu[apdulen++] = len; memset (apdu+apdulen, 0, sizeof (apdu) - apdulen); resultlen = RESULTLEN; - rc = send_apdu (slot, apdu, apdulen, result, &resultlen); + rc = send_apdu (slot, apdu, apdulen, result, &resultlen, NULL); if (rc || resultlen < 2) { log_error ("apdu_send_simple(%d) for get response failed: %s\n", @@ -2704,6 +2765,27 @@ } /* Send an APDU to the card in SLOT. The APDU is created from all + given parameters: CLASS, INS, P0, P1, LC, DATA, LE. A value of -1 + for LC won't sent this field and the data field; in this case DATA + must also be passed as NULL. The return value is the status word + or -1 for an invalid SLOT or other non card related error. If + RETBUF is not NULL, it will receive an allocated buffer with the + returned data. The length of that data will be put into + *RETBUFLEN. The caller is reponsible for releasing the buffer even + in case of errors. */ +int +apdu_send_le(int slot, int class, int ins, int p0, int p1, + int lc, const char *data, int le, + unsigned char **retbuf, size_t *retbuflen) +{ + return send_le (slot, class, ins, p0, p1, + lc, data, le, + retbuf, retbuflen, + NULL); +} + + +/* Send an APDU to the card in SLOT. The APDU is created from all given parameters: CLASS, INS, P0, P1, LC, DATA. A value of -1 for LC won't sent this field and the data field; in this case DATA must also be passed as NULL. The return value is the status word or -1 @@ -2716,8 +2798,8 @@ apdu_send (int slot, int class, int ins, int p0, int p1, int lc, const char *data, unsigned char **retbuf, size_t *retbuflen) { - return apdu_send_le (slot, class, ins, p0, p1, lc, data, 256, - retbuf, retbuflen); + return send_le (slot, class, ins, p0, p1, lc, data, 256, + retbuf, retbuflen, NULL); } /* Send an APDU to the card in SLOT. The APDU is created from all @@ -2730,10 +2812,28 @@ apdu_send_simple (int slot, int class, int ins, int p0, int p1, int lc, const char *data) { - return apdu_send_le (slot, class, ins, p0, p1, lc, data, -1, NULL, NULL); + return send_le (slot, class, ins, p0, p1, lc, data, -1, NULL, NULL, NULL); } +/* Same as apdu_send_simple but uses the keypad of the reader. */ +int +apdu_send_simple_kp (int slot, int class, int ins, int p0, int p1, + int lc, const char *data, + int pin_mode, + int pinlen_min, int pinlen_max, int pin_padlen) +{ + struct pininfo_s pininfo; + + pininfo.mode = pin_mode; + pininfo.minlen = pinlen_min; + pininfo.maxlen = pinlen_max; + pininfo.padlen = pin_padlen; + return send_le (slot, class, ins, p0, p1, lc, data, -1, + NULL, NULL, &pininfo); +} + + /* This is a more generic version of the apdu sending routine. It takes an already formatted APDU in APDUDATA or length APDUDATALEN and returns the with the APDU including the status word. With @@ -2771,7 +2871,7 @@ class = apdulen? *apdu : 0; resultlen = RESULTLEN; - rc = send_apdu (slot, apdu, apdulen, result, &resultlen); + rc = send_apdu (slot, apdu, apdulen, result, &resultlen, NULL); if (rc || resultlen < 2) { log_error ("apdu_send_direct(%d) failed: %s\n", @@ -2825,7 +2925,7 @@ apdu[apdulen++] = len; memset (apdu+apdulen, 0, sizeof (apdu) - apdulen); resultlen = RESULTLEN; - rc = send_apdu (slot, apdu, apdulen, result, &resultlen); + rc = send_apdu (slot, apdu, apdulen, result, &resultlen, NULL); if (rc || resultlen < 2) { log_error ("apdu_send_direct(%d) for get response failed: %s\n", Modified: trunk/g10/apdu.h =================================================================== --- trunk/g10/apdu.h 2005-10-26 16:09:23 UTC (rev 3915) +++ trunk/g10/apdu.h 2005-10-27 09:14:27 UTC (rev 3916) @@ -63,7 +63,8 @@ SW_HOST_CARD_IO_ERROR = 0x1000a, SW_HOST_GENERAL_ERROR = 0x1000b, SW_HOST_NO_READER = 0x1000c, - SW_HOST_ABORTED = 0x1000d + SW_HOST_ABORTED = 0x1000d, + SW_HOST_NO_KEYPAD = 0x1000e }; @@ -96,8 +97,14 @@ int apdu_reset (int slot); int apdu_get_status (int slot, int hang, unsigned int *status, unsigned int *changed); +int apdu_check_keypad (int slot, int command, int pin_mode, + int pinlen_min, int pinlen_max, int pin_padlen); int apdu_send_simple (int slot, int class, int ins, int p0, int p1, int lc, const char *data); +int apdu_send_simple_kp (int slot, int class, int ins, int p0, int p1, + int lc, const char *data, + int pin_mode, + int pinlen_min, int pinlen_max, int pin_padlen); int apdu_send (int slot, int class, int ins, int p0, int p1, int lc, const char *data, unsigned char **retbuf, size_t *retbuflen); Modified: trunk/g10/gpg.c =================================================================== --- trunk/g10/gpg.c 2005-10-26 16:09:23 UTC (rev 3915) +++ trunk/g10/gpg.c 2005-10-27 09:14:27 UTC (rev 3916) @@ -1710,7 +1710,7 @@ set_homedir ( default_homedir () ); #ifdef ENABLE_CARD_SUPPORT -# ifdef _WIN32 +#if defined(_WIN32) || defined(__CYGWIN__) opt.pcsc_driver = "winscard.dll"; #else opt.pcsc_driver = "libpcsclite.so"; From cvs at cvs.gnupg.org Thu Oct 27 18:24:02 2005 From: cvs at cvs.gnupg.org (svn author dshaw) Date: Thu Oct 27 17:53:07 2005 Subject: [svn] GnuPG - r3917 - trunk/g10 Message-ID: Author: dshaw Date: 2005-10-27 18:23:59 +0200 (Thu, 27 Oct 2005) New Revision: 3917 Modified: trunk/g10/ChangeLog trunk/g10/getkey.c trunk/g10/keyedit.c Log: * keyedit.c (menu_addrevoker), getkey.c (finish_lookup): Fix problem with adding a cert-only designated revoker. Code was looking for a key with sign ability, and not cert ability. Noted by Timo Schulz. Modified: trunk/g10/ChangeLog =================================================================== --- trunk/g10/ChangeLog 2005-10-27 09:14:27 UTC (rev 3916) +++ trunk/g10/ChangeLog 2005-10-27 16:23:59 UTC (rev 3917) @@ -1,3 +1,10 @@ +2005-10-27 David Shaw + + * keyedit.c (menu_addrevoker), getkey.c (finish_lookup): Fix + problem with adding a cert-only designated revoker. Code was + looking for a key with sign ability, and not cert ability. Noted + by Timo Schulz. + 2005-10-27 Werner Koch * gpg.c [__CYGWIN__]: Set default driver to winscard.dll. Modified: trunk/g10/getkey.c =================================================================== --- trunk/g10/getkey.c 2005-10-27 09:14:27 UTC (rev 3916) +++ trunk/g10/getkey.c 2005-10-27 16:23:59 UTC (rev 3917) @@ -2345,7 +2345,7 @@ KBNODE k; KBNODE foundk = NULL; PKT_user_id *foundu = NULL; -#define USAGE_MASK (PUBKEY_USAGE_SIG|PUBKEY_USAGE_ENC) +#define USAGE_MASK (PUBKEY_USAGE_SIG|PUBKEY_USAGE_ENC|PUBKEY_USAGE_CERT) unsigned int req_usage = ( ctx->req_usage & USAGE_MASK ); /* Request the primary if we're certifying another key, and also if signing data while --pgp6 or --pgp7 is on since pgp 6 and 7 Modified: trunk/g10/keyedit.c =================================================================== --- trunk/g10/keyedit.c 2005-10-27 09:14:27 UTC (rev 3916) +++ trunk/g10/keyedit.c 2005-10-27 16:23:59 UTC (rev 3917) @@ -3380,9 +3380,11 @@ goto fail; } - /* Note that I'm requesting SIG here and not CERT. We're making - a certification, but it is okay to be a subkey. */ - revoker_pk->req_usage=PUBKEY_USAGE_SIG; + /* Note that I'm requesting CERT here, which usually implies + primary keys only, but some casual testing shows that PGP and + GnuPG both can handle a designated revokation from a + subkey. */ + revoker_pk->req_usage=PUBKEY_USAGE_CERT; rc=get_pubkey_byname(revoker_pk,answer,NULL,NULL,1); if(rc) { From cvs at cvs.gnupg.org Thu Oct 27 21:18:06 2005 From: cvs at cvs.gnupg.org (svn author dshaw) Date: Thu Oct 27 20:47:11 2005 Subject: [svn] GnuPG - r3918 - trunk/doc Message-ID: Author: dshaw Date: 2005-10-27 21:18:05 +0200 (Thu, 27 Oct 2005) New Revision: 3918 Modified: trunk/doc/ChangeLog trunk/doc/DETAILS trunk/doc/gpg.sgml Log: * gpg.sgml: Document backsign, --require-backsigs, and --no-require-backsigs. * DETAILS: Clarify Key-Usage. Modified: trunk/doc/ChangeLog =================================================================== --- trunk/doc/ChangeLog 2005-10-27 16:23:59 UTC (rev 3917) +++ trunk/doc/ChangeLog 2005-10-27 19:18:05 UTC (rev 3918) @@ -1,3 +1,10 @@ +2005-10-27 David Shaw + + * gpg.sgml: Document backsign, --require-backsigs, and + --no-require-backsigs. + + * DETAILS: Clarify Key-Usage. + 2005-10-07 Werner Koch * gpgv.sgml: Small spelling corrections by Mike Dowling. Modified: trunk/doc/DETAILS =================================================================== --- trunk/doc/DETAILS 2005-10-27 16:23:59 UTC (rev 3917) +++ trunk/doc/DETAILS 2005-10-27 19:18:05 UTC (rev 3918) @@ -587,7 +587,7 @@ PIN change really worked. BACKUP_KEY_CREATED fingerprint fname - A backup key named FNAME has been created for the key wityh + A backup key named FNAME has been created for the key with KEYID. @@ -750,8 +750,13 @@ Length of the key in bits. Default is 1024. Key-Usage: Space or comma delimited list of key usage, allowed values are - "encrypt" and "sign". This is used to generate the key flags. - Please make sure that the algorithm is capable of this usage. + "encrypt", "sign", and "auth". This is used to generate the + key flags. Please make sure that the algorithm is capable of + this usage. Note that OpenPGP requires that all primary keys + are capable of certification, so no matter what usage is given + here, the "cert" flag will be on. If no Key-Usage is + specified, all the allowed usages for that particular + algorithm are used. Subkey-Type: | This generates a secondary key. Currently only one subkey can be handled. Modified: trunk/doc/gpg.sgml =================================================================== --- trunk/doc/gpg.sgml 2005-10-27 16:23:59 UTC (rev 3917) +++ trunk/doc/gpg.sgml 2005-10-27 19:18:05 UTC (rev 3918) @@ -565,6 +565,14 @@ If invoked with no arguments, both `sigs' and `uids' are cleaned. + +backsign + +Add back signatures to signing subkeys that may not currently have +back signatures. Back signatures protect against a subtle attack +against signing subkeys. See --require-backsigs. + + save @@ -2713,6 +2721,17 @@ +--require-backsigs +--no-require-backsigs + +When verifying a signature made from a subkey, ensure that the "back +signature" on the subkey is present and valid. This protects against +a subtle attack against subkeys that can sign. Currently defaults to +--no-require-backsigs, but will be changed to --require-backsigs in +the future. + + + --ask-sig-expire --no-ask-sig-expire From cvs at cvs.gnupg.org Mon Oct 31 22:33:47 2005 From: cvs at cvs.gnupg.org (svn author mo) Date: Mon Oct 31 22:02:26 2005 Subject: [svn] gcry - r1132 - trunk/src Message-ID: Author: mo Date: 2005-10-31 22:33:46 +0100 (Mon, 31 Oct 2005) New Revision: 1132 Modified: trunk/src/ChangeLog trunk/src/global.c Log: src/ChangeLog: 2005-10-31 Moritz Schulte * global.c: Added documentation. Modified: trunk/src/ChangeLog =================================================================== --- trunk/src/ChangeLog 2005-10-16 12:12:40 UTC (rev 1131) +++ trunk/src/ChangeLog 2005-10-31 21:33:46 UTC (rev 1132) @@ -1,3 +1,7 @@ +2005-10-31 Moritz Schulte + + * global.c: Added documentation. + 2005-10-16 Moritz Schulte * global.c (global_init): Use gcry_error_t instead of Modified: trunk/src/global.c =================================================================== --- trunk/src/global.c 2005-10-16 12:12:40 UTC (rev 1131) +++ trunk/src/global.c 2005-10-31 21:33:46 UTC (rev 1132) @@ -20,6 +20,7 @@ */ #include + #include #include #include @@ -34,22 +35,29 @@ #include "secmem.h" /* our own secmem allocator */ #include "ath.h" + + /**************** * flag bits: 0 : general cipher debug * 1 : general MPI debug */ static unsigned int debug_flags; +/* Controlled by global_init(). */ +static int any_init_done; + +/* Memory management. */ + static gcry_handler_alloc_t alloc_func; static gcry_handler_alloc_t alloc_secure_func; static gcry_handler_secure_check_t is_secure_func; static gcry_handler_realloc_t realloc_func; static gcry_handler_free_t free_func; static gcry_handler_no_mem_t outofcore_handler; +static void *outofcore_handler_value; +static int no_secure_memory; -static void *outofcore_handler_value = NULL; -static int no_secure_memory = 0; -static int any_init_done; + /* This is our handmade constructor. It gets called by any function likely to be called at startup. The suggested way for an @@ -90,7 +98,14 @@ BUG (); } + +/* Version number parsing. */ + +/* This function parses the first portion of the version number S and + stores it in *NUMBER. On sucess, this function returns a pointer + into S starting with the first character, which is not part of the + initial number portion; on failure, NULL is returned. */ static const char* parse_version_number( const char *s, int *number ) { @@ -106,7 +121,15 @@ return val < 0? NULL : s; } +/* This function breaks up the complete string-representation of the + version number S, which is of the following struture: ... The major, + minor and micro number components will be stored in *MAJOR, *MINOR + and *MICRO. + On success, the last component, the patch level, will be returned; + in failure, NULL will be returned. */ + static const char * parse_version_string( const char *s, int *major, int *minor, int *micro ) { @@ -124,12 +147,13 @@ return s; /* patchlevel */ } -/**************** - * Check that the the version of the library is at minimum the requested one - * and return the version string; return NULL if the condition is not - * satisfied. If a NULL is passed to this function, no check is done, - * but the version string is simply returned. - */ +/* If REQ_VERSION is non-NULL, check that the version of the library + is at minimum the requested one. Returns the string representation + of the library version if the condition is satisfied; return NULL + if the requested version is newer than that of the library. + + If a NULL is passed to this function, no check is done, but the + string representation of the library is simply returned. */ const char * gcry_check_version( const char *req_version ) { @@ -138,18 +162,28 @@ int rq_major, rq_minor, rq_micro; const char *my_plvl, *rq_plvl; + /* Initialize library. */ global_init (); + if ( !req_version ) + /* Caller wants our version number. */ return ver; + /* Parse own version number. */ my_plvl = parse_version_string( ver, &my_major, &my_minor, &my_micro ); if ( !my_plvl ) - return NULL; /* very strange our own version is bogus */ + /* very strange our own version is bogus. Shouldn't we use + assert() here and bail out in case this happens? -mo. */ + return NULL; + + /* Parse requested version number. */ rq_plvl = parse_version_string( req_version, &rq_major, &rq_minor, &rq_micro ); if ( !rq_plvl ) - return NULL; /* req version string is invalid */ + /* req version string is invalid, this can happen. */ + return NULL; + /* Compare version numbers. */ if ( my_major > rq_major || (my_major == rq_major && my_minor > rq_minor) || (my_major == rq_major && my_minor == rq_minor @@ -159,9 +193,14 @@ && strcmp( my_plvl, rq_plvl ) >= 0) ) { return ver; } + return NULL; } + + +/* Command dispatcher function, acting as general control + function. */ gcry_error_t gcry_control (enum gcry_ctl_cmds cmd, ...) { From cvs at cvs.gnupg.org Mon Oct 31 22:36:02 2005 From: cvs at cvs.gnupg.org (svn author mo) Date: Mon Oct 31 22:04:40 2005 Subject: [svn] gcry - r1133 - trunk/doc Message-ID: Author: mo Date: 2005-10-31 22:36:01 +0100 (Mon, 31 Oct 2005) New Revision: 1133 Modified: trunk/doc/ChangeLog trunk/doc/gcrypt.texi Log: ChangeLog: 2005-10-31 Moritz Schulte * gcrypt.texi: Added more gcry_control related descriptions. Modified: trunk/doc/ChangeLog =================================================================== --- trunk/doc/ChangeLog 2005-10-31 21:33:46 UTC (rev 1132) +++ trunk/doc/ChangeLog 2005-10-31 21:36:01 UTC (rev 1133) @@ -1,3 +1,7 @@ +2005-10-31 Moritz Schulte + + * gcrypt.texi: Added more gcry_control related descriptions. + 2005-10-16 Moritz Schulte * gcrypt.texi (Controlling the library): Start documenting the Modified: trunk/doc/gcrypt.texi =================================================================== --- trunk/doc/gcrypt.texi 2005-10-31 21:33:46 UTC (rev 1132) +++ trunk/doc/gcrypt.texi 2005-10-31 21:36:01 UTC (rev 1133) @@ -494,16 +494,33 @@ @item GCRYCTL_ENABLE_M_GUARD; Arguments: none This command enables the built-in memory guard. It must not be used to activate the memory guard after the memory management has already been -used; therefore it can ONLY be used at initializatoin time. Note that +used; therefore it can ONLY be used at initialization time. Note that the memory guard is NOT used when the user of the library has set his own memory management callbacks. -@item GCRYCTL_ENABLE_QUICK_RANDOM +@item GCRYCTL_ENABLE_QUICK_RANDOM; Arguments: none +This command activates the use of a highly-insecure, but fast PRNG. It +can only be used at initialization time - FIXME: is this correct? + @item GCRYCTL_DUMP_RANDOM_STATS +This command dumps PRNG related statistics to the librarys logging +stream. + @item GCRYCTL_DUMP_MEMORY_STATS +This command dumps memory manamgent related statistics to the librarys +logging stream. + @item GCRYCTL_DUMP_SECMEM_STATS +This command dumps secure memory manamgent related statistics to the +librarys logging stream. + @item GCRYCTL_DROP_PRIVS +This command disables the use of secure memory and drops the priviliges +of the current process. FIXME. + @item GCRYCTL_DISABLE_SECMEM +This command disables the use of secure memory. FIXME. + @item GCRYCTL_INIT_SECMEM @item GCRYCTL_TERM_SECMEM @item GCRYCTL_DISABLE_SECMEM_WARN @@ -529,8 +546,8 @@ @section Modules @acronym{Libgcrypt} supports the use of `extension modules', which -implement algorithms in addition to those already built into the -library directly. +implement algorithms in addition to those already built into the library +directly. @deftp {Data type} gcry_module_t This data type represents a `module'.