From bf6779bf7408dcfa67cc5cdd78590c31878b0035 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Mon, 2 Apr 2001 08:40:32 +0000 Subject: [PATCH] Release 0.2.1 --- AUTHORS | 20 ++++++++-- ChangeLog | 17 +++++++++ INSTALL | 14 +++++++ Makefile.am | 20 ++++++++++ NEWS | 20 ++++++++++ bonobo/Makefile.am | 19 ++++++++++ complus/Makefile.am | 19 ++++++++++ configure.in | 26 +++++++++++-- gpgme/ChangeLog | 22 ++++++++++- gpgme/Makefile.am | 21 ++++++++++- gpgme/context.h | 1 + gpgme/data.c | 1 + gpgme/debug.c | 83 ++++++++++++++++++++++++++++++++++++----- gpgme/decrypt.c | 1 + gpgme/delete.c | 2 +- gpgme/encrypt.c | 1 + gpgme/export.c | 1 + gpgme/genkey.c | 1 + gpgme/gpgme.c | 1 + gpgme/gpgme.h | 3 +- gpgme/import.c | 3 +- gpgme/io.h | 1 + gpgme/key.c | 1 + gpgme/key.h | 1 + gpgme/keylist.c | 1 + gpgme/mkerrors | 1 + gpgme/mkstatus | 1 + gpgme/ops.h | 1 + gpgme/posix-io.c | 15 ++++++-- gpgme/posix-sema.c | 1 + gpgme/posix-util.c | 1 + gpgme/recipient.c | 1 + gpgme/rungpg.c | 1 + gpgme/rungpg.h | 1 + gpgme/sema.h | 1 + gpgme/sign.c | 1 + gpgme/signers.c | 1 + gpgme/syshdr.h | 1 + gpgme/trustlist.c | 1 + gpgme/types.h | 1 + gpgme/util.c | 1 + gpgme/util.h | 2 + gpgme/verify.c | 1 + gpgme/version.c | 1 + gpgme/w32-io.c | 1 + gpgme/w32-sema.c | 1 + gpgme/w32-util.c | 3 +- gpgme/wait.c | 1 + gpgme/wait.h | 1 + jnlib/ChangeLog | 11 ++++++ jnlib/Makefile.am | 19 +++++++++- jnlib/argparse.c | 2 +- jnlib/argparse.h | 2 +- jnlib/dotlock.c | 2 +- jnlib/dotlock.h | 2 +- jnlib/libjnlib-config.h | 2 +- jnlib/logging.c | 2 +- jnlib/logging.h | 2 +- jnlib/mischelp.h | 2 +- jnlib/stringhelp.c | 2 +- jnlib/stringhelp.h | 2 +- jnlib/types.h | 2 +- jnlib/xmalloc.c | 2 +- jnlib/xmalloc.h | 2 +- tests/Makefile.am | 22 ++++++++++- tests/t-decrypt.c | 1 + tests/t-encrypt.c | 1 + tests/t-export.c | 1 + tests/t-genkey.c | 1 + tests/t-import.c | 1 + tests/t-keylist.c | 1 + tests/t-sign.c | 1 + tests/t-trustlist.c | 1 + tests/t-verify.c | 1 + 74 files changed, 387 insertions(+), 41 deletions(-) diff --git a/AUTHORS b/AUTHORS index 20ea6e0..76ba895 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1,9 +1,23 @@ Program: gpgme -Maintainer: Werner Koch +Maintainer: Werner Koch FSF - * Code taken from GnuPG: gpgme/w32-util.c + - Code taken from GnuPG 1.0: gpgme/w32-util.c, GnuPG 1.1: jnlib/. + +g10 Code GmbH + - All stuff since mid march 2001. Werner Koch - * Design and most stuff. + - Design and most stuff. + + + Copyright 2001 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. diff --git a/ChangeLog b/ChangeLog index e3c455a..d25591b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2001-04-02 Werner Koch + + Released 0.2.1. + + Changed the copyright notices all over the place. + 2001-02-28 Werner Koch Released 0.2.0. @@ -6,3 +12,14 @@ * autogen.sh: Added option --build-w32. + + Copyright 2001 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. + \ No newline at end of file diff --git a/INSTALL b/INSTALL index b42a17a..ebae9ac 100644 --- a/INSTALL +++ b/INSTALL @@ -1,3 +1,17 @@ +Installation Instructions for GPGME +=================================== + + Copyright 2001 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. + + Basic Installation ================== diff --git a/Makefile.am b/Makefile.am index e733d27..d48510b 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,3 +1,23 @@ +# Copyright (C) 2000 Werner Koch (dd9jn) +# Copyright (C) 2001 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 General Public License as published by +# the Free Software Foundation; either version 2 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 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 + +## Process this file with automake to produce Makefile.in EXTRA_DIST = README-alpha autogen.sh diff --git a/NEWS b/NEWS index e69de29..1db08f8 100644 --- a/NEWS +++ b/NEWS @@ -0,0 +1,20 @@ +Noteworthy changes in version 0.2.1 (2001-04-02) +------------------------------------------------ + + * Changed debug output and GPGME_DEBUG variable (gpgme/debug.c) + + * Handle GnuPG's new key capabilities output and support revocation + et al. attributes + + * Made the W32 support more robust. + + + Copyright 2001 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. diff --git a/bonobo/Makefile.am b/bonobo/Makefile.am index 48bc03e..27bc13d 100644 --- a/bonobo/Makefile.am +++ b/bonobo/Makefile.am @@ -1,3 +1,22 @@ +# Copyright (C) 2000 Werner Koch (dd9jn) +# Copyright (C) 2001 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 General Public License as published by +# the Free Software Foundation; either version 2 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 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 + ## Process this file with automake to produce Makefile.in bin_PROGRAMS = gpgme diff --git a/complus/Makefile.am b/complus/Makefile.am index bbae8d5..ae05e45 100644 --- a/complus/Makefile.am +++ b/complus/Makefile.am @@ -1,3 +1,22 @@ +# Copyright (C) 2000 Werner Koch (dd9jn) +# Copyright (C) 2001 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 General Public License as published by +# the Free Software Foundation; either version 2 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 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 + ## Process this file with automake to produce Makefile.in EXTRA_DIST = WINE-LICENSE WINE-AUTHORS diff --git a/configure.in b/configure.in index 903b24c..be971fa 100644 --- a/configure.in +++ b/configure.in @@ -1,6 +1,24 @@ # configure.in for GPGME +# Copyright (C) 2000 Werner Koch (dd9jn) +# Copyright (C) 2001 g10 Code GmbH # -dnl (Process this file with autoconf to produce a configure script.) +# This file is part of GPGME. +# +# GPGME 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. +# +# 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 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 + +# (Process this file with autoconf to produce a configure script.) AC_REVISION($Revision$)dnl AC_INIT(gpgme/gpgme.h) @@ -13,11 +31,11 @@ AM_MAINTAINER_MODE # AGE, set REVISION to 0. # 3. Interfaces removed (BAD, breaks upward compatibility): Increment # CURRENT, set AGE and REVISION to 0. -AM_INIT_AUTOMAKE(gpgme,0.2.0a) +AM_INIT_AUTOMAKE(gpgme,0.2.1) LIBGPGME_LT_CURRENT=3 LIBGPGME_LT_AGE=3 LIBGPGME_LT_REVISION=0 -NEED_GPG_VERSION=1.0.4e +NEED_GPG_VERSION=1.0.4f ############################################## AC_SUBST(LIBGPGME_LT_CURRENT) @@ -32,7 +50,7 @@ dnl AC_ARG_PROGRAM dnl Don't default to build static libs -AM_DISABLE_STATIC +dnl AM_DISABLE_STATIC AM_PROG_LIBTOOL if test "$GCC" = yes; then diff --git a/gpgme/ChangeLog b/gpgme/ChangeLog index 45607f9..2d186d8 100644 --- a/gpgme/ChangeLog +++ b/gpgme/ChangeLog @@ -1,3 +1,11 @@ +2001-03-30 Werner Koch + + * debug.c (debug_init): Allow to specify a debug file. + (_gpgme_debug_level): New. + + * posix-io.c (_gpgme_io_read, _gpgme_io_write): Print output. + (_gpgme_io_select): Debug only with level > 2. + 2001-03-15 Werner Koch * rungpg.c: Included time.h. @@ -33,7 +41,7 @@ 2001-02-28 Werner Koch - * w32-io.c (destroy_reader): Set sop_me flag. + * w32-io.c (destroy_reader): Set stop_me flag. (writer,create_writer,destroy_writer,find_writer,kill_writer): New. (_gpgme_io_write): Use a writer thread to avaoid blocking. (_gpgme_io_close): Cleanup a writer thread @@ -163,3 +171,15 @@ 2001-01-05 Werner Koch * data.c (gpgme_data_rewind): Allow to rewind data_type_none. + + + Copyright 2001 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. + \ No newline at end of file diff --git a/gpgme/Makefile.am b/gpgme/Makefile.am index 59faab4..36029b7 100644 --- a/gpgme/Makefile.am +++ b/gpgme/Makefile.am @@ -1,4 +1,23 @@ -# Process this file with automake to produce Makefile.in +# Copyright (C) 2000 Werner Koch (dd9jn) +# Copyright (C) 2001 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 General Public License as published by +# the Free Software Foundation; either version 2 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 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 + +## Process this file with automake to produce Makefile.in EXTRA_DIST = gpgme-config.in gpgme.m4 mkerrors mkstatus BUILT_SOURCES = errors.c status-table.h diff --git a/gpgme/context.h b/gpgme/context.h index de6ca72..a199269 100644 --- a/gpgme/context.h +++ b/gpgme/context.h @@ -1,5 +1,6 @@ /* context.h * Copyright (C) 2000 Werner Koch (dd9jn) + * Copyright (C) 2001 g10 Code GmbH * * This file is part of GPGME. * diff --git a/gpgme/data.c b/gpgme/data.c index 9d8b58e..f234c50 100644 --- a/gpgme/data.c +++ b/gpgme/data.c @@ -1,5 +1,6 @@ /* data.c * Copyright (C) 2000 Werner Koch (dd9jn) + * Copyright (C) 2001 g10 Code GmbH * * This file is part of GPGME. * diff --git a/gpgme/debug.c b/gpgme/debug.c index 19de2a7..c18f3d3 100644 --- a/gpgme/debug.c +++ b/gpgme/debug.c @@ -1,5 +1,5 @@ /* debug.c - * Copyright (C) 2001 Werner Koch (dd9jn) + * Copyright (C) 2001 g10 Code GmbH * * This file is part of GPGME. * @@ -24,6 +24,7 @@ #include #include #include +#include #include #include "util.h" @@ -37,6 +38,34 @@ struct debug_control_s { }; static int debug_level = 0; +static FILE *errfp = NULL; + +/**************** + * remove leading and trailing white spaces + */ +static char * +trim_spaces( char *str ) +{ + char *string, *p, *mark; + + string = str; + /* find first non space character */ + for( p=string; *p && isspace( *(byte*)p ) ; p++ ) + ; + /* move characters */ + for( (mark = NULL); (*string = *p); string++, p++ ) + if( isspace( *(byte*)p ) ) { + if( !mark ) + mark = string ; + } + else + mark = NULL ; + if( mark ) + *mark = '\0' ; /* remove trailing spaces */ + + return str ; +} + static void debug_init (void) @@ -48,15 +77,51 @@ debug_init (void) LOCK (debug_lock); if (!initialized) { const char *e = getenv ("GPGME_DEBUG"); - - debug_level = e? atoi (e): 0; + const char *s1, *s2;; + initialized = 1; + debug_level = 0; + errfp = stderr; + if (e) { + debug_level = atoi (e); + s1 = strchr (e, ':'); + if (s1 +#ifndef HAVE_DOSISH_SYSTEM + && getuid () == geteuid () +#endif + ) { + char *p; + FILE *fp; + + s1++; + if ( !(s2 = strchr (s1, ':')) ) + s2 = s1 + strlen(s1); + p = xtrymalloc (s2-s1+1); + if (p) { + memcpy (p, s1, s2-s1); + p[s2-s1] = 0; + trim_spaces (p); + fp = fopen (p,"a"); + if (fp) { + setvbuf (fp, NULL, _IOLBF, 0); + errfp = fp; + } + xfree (p); + } + } + } + if (debug_level > 0) - fprintf (stderr,"gpgme_debug: level=%d\n", debug_level); + fprintf (errfp,"gpgme_debug: level=%d\n", debug_level); } UNLOCK (debug_lock); } +int +_gpgme_debug_level () +{ + return debug_level; +} void _gpgme_debug (int level, const char *format, ...) @@ -69,12 +134,12 @@ _gpgme_debug (int level, const char *format, ...) va_start ( arg_ptr, format ) ; LOCK (debug_lock); - vfprintf (stderr, format, arg_ptr) ; + vfprintf (errfp, format, arg_ptr) ; va_end ( arg_ptr ) ; if( format && *format && format[strlen(format)-1] != '\n' ) - putc ('\n', stderr); + putc ('\n', errfp); UNLOCK (debug_lock); - fflush (stderr); + fflush (errfp); } @@ -144,11 +209,11 @@ _gpgme_debug_end (void **helper, const char *text) rewind (ctl->fp); LOCK (debug_lock); while ( (c=getc (ctl->fp)) != EOF ) { - putc (c, stderr); + putc (c, errfp); last_c = c; } if (last_c != '\n') - putc ('\n', stderr); + putc ('\n', errfp); UNLOCK (debug_lock); fclose (ctl->fp); diff --git a/gpgme/decrypt.c b/gpgme/decrypt.c index 75d4ac8..526a815 100644 --- a/gpgme/decrypt.c +++ b/gpgme/decrypt.c @@ -1,5 +1,6 @@ /* decrypt.c - decrypt functions * Copyright (C) 2000 Werner Koch (dd9jn) + * Copyright (C) 2001 g10 Code GmbH * * This file is part of GPGME. * diff --git a/gpgme/delete.c b/gpgme/delete.c index 4e3c9b4..8744efc 100644 --- a/gpgme/delete.c +++ b/gpgme/delete.c @@ -1,5 +1,5 @@ /* delete.c - delete a key - * Copyright (C) 2001 Werner Koch (dd9jn) + * Copyright (C) 2001 g10 Code GmbH * * This file is part of GPGME. * diff --git a/gpgme/encrypt.c b/gpgme/encrypt.c index e4bb38e..5234cc8 100644 --- a/gpgme/encrypt.c +++ b/gpgme/encrypt.c @@ -1,5 +1,6 @@ /* encrypt.c - encrypt functions * Copyright (C) 2000 Werner Koch (dd9jn) + * Copyright (C) 2001 g10 Code GmbH * * This file is part of GPGME. * diff --git a/gpgme/export.c b/gpgme/export.c index c46c3a9..506b3a0 100644 --- a/gpgme/export.c +++ b/gpgme/export.c @@ -1,5 +1,6 @@ /* export.c - encrypt functions * Copyright (C) 2000 Werner Koch (dd9jn) + * Copyright (C) 2001 g10 Code GmbH * * This file is part of GPGME. * diff --git a/gpgme/genkey.c b/gpgme/genkey.c index c2bab3d..c765286 100644 --- a/gpgme/genkey.c +++ b/gpgme/genkey.c @@ -1,5 +1,6 @@ /* genkey.c - key generation * Copyright (C) 2000 Werner Koch (dd9jn) + * Copyright (C) 2001 g10 Code GmbH * * This file is part of GPGME. * diff --git a/gpgme/gpgme.c b/gpgme/gpgme.c index 43e89ad..1c6ffae 100644 --- a/gpgme/gpgme.c +++ b/gpgme/gpgme.c @@ -1,5 +1,6 @@ /* gpgme.c - GnuPG Made Easy * Copyright (C) 2000 Werner Koch (dd9jn) + * Copyright (C) 2001 g10 Code GmbH * * This file is part of GPGME. * diff --git a/gpgme/gpgme.h b/gpgme/gpgme.h index f1744f0..1e998df 100644 --- a/gpgme/gpgme.h +++ b/gpgme/gpgme.h @@ -1,5 +1,6 @@ /* gpgme.h - GnuPG Made Easy * Copyright (C) 2000 Werner Koch (dd9jn) + * Copyright (C) 2001 g10 Code GmbH * * This file is part of GPGME. * @@ -43,7 +44,7 @@ extern "C" { * let autoconf (using the 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 "0.2.0a" +#define GPGME_VERSION "0.2.1" diff --git a/gpgme/import.c b/gpgme/import.c index a05f60b..37bd45e 100644 --- a/gpgme/import.c +++ b/gpgme/import.c @@ -1,5 +1,6 @@ -/* impoirt.c - encrypt functions +/* import.c - encrypt functions * Copyright (C) 2000 Werner Koch (dd9jn) + * Copyright (C) 2001 g10 Code GmbH * * This file is part of GPGME. * diff --git a/gpgme/io.h b/gpgme/io.h index 2f9f1b7..0965a1d 100644 --- a/gpgme/io.h +++ b/gpgme/io.h @@ -1,5 +1,6 @@ /* io.h - I/O functions * Copyright (C) 2000 Werner Koch (dd9jn) + * Copyright (C) 2001 g10 Code GmbH * * This file is part of GPGME. * diff --git a/gpgme/key.c b/gpgme/key.c index 6f8f03b..2fae069 100644 --- a/gpgme/key.c +++ b/gpgme/key.c @@ -1,5 +1,6 @@ /* key.c - Key and keyList objects * Copyright (C) 2000 Werner Koch (dd9jn) + * Copyright (C) 2001 g10 Code GmbH * * This file is part of GPGME. * diff --git a/gpgme/key.h b/gpgme/key.h index 5e9d4c6..60244e9 100644 --- a/gpgme/key.h +++ b/gpgme/key.h @@ -1,5 +1,6 @@ /* key.h * Copyright (C) 2000 Werner Koch (dd9jn) + * Copyright (C) 2001 g10 Code GmbH * * This file is part of GPGME. * diff --git a/gpgme/keylist.c b/gpgme/keylist.c index 19eaa2a..9b6279a 100644 --- a/gpgme/keylist.c +++ b/gpgme/keylist.c @@ -1,5 +1,6 @@ /* keylist.c - key listing * Copyright (C) 2000 Werner Koch (dd9jn) + * Copyright (C) 2001 g10 Code GmbH * * This file is part of GPGME. * diff --git a/gpgme/mkerrors b/gpgme/mkerrors index 4ad5812..c5e1281 100755 --- a/gpgme/mkerrors +++ b/gpgme/mkerrors @@ -2,6 +2,7 @@ # mkerrors - Extract error strings from gpgme.h # and create C source for gpgme_strerror # Copyright (C) 2000 Werner Koch (dd9jn) +# Copyright (C) 2001 g10 Code GmbH # # This file is part of GPGME. # diff --git a/gpgme/mkstatus b/gpgme/mkstatus index ce3b04f..150313d 100755 --- a/gpgme/mkstatus +++ b/gpgme/mkstatus @@ -2,6 +2,7 @@ # mkstatus - Extract error strings from rungpg.h # and create a lookup table # Copyright (C) 2000 Werner Koch (dd9jn) +# Copyright (C) 2001 g10 Code GmbH # # This file is part of GPGME. # diff --git a/gpgme/ops.h b/gpgme/ops.h index cbf3529..668a18d 100644 --- a/gpgme/ops.h +++ b/gpgme/ops.h @@ -1,5 +1,6 @@ /* ops.h - internal operations stuff * Copyright (C) 2000 Werner Koch (dd9jn) + * Copyright (C) 2001 g10 Code GmbH * * This file is part of GPGME. * diff --git a/gpgme/posix-io.c b/gpgme/posix-io.c index e10a7ef..2043854 100644 --- a/gpgme/posix-io.c +++ b/gpgme/posix-io.c @@ -1,5 +1,6 @@ /* posix-io.c - Posix I/O functions * Copyright (C) 2000 Werner Koch (dd9jn) + * Copyright (C) 2001 g10 Code GmbH * * This file is part of GPGME. * @@ -52,6 +53,9 @@ _gpgme_io_read ( int fd, void *buffer, size_t count ) nread = read (fd, buffer, count); } while (nread == -1 && errno == EINTR ); DEBUG2 ("fd %d: got %d bytes\n", fd, nread ); + if ( nread > 0 ) { + _gpgme_debug (2, "fd %d: got `%.*s'\n", fd, nread, buffer ); + } return nread; } @@ -62,6 +66,7 @@ _gpgme_io_write ( int fd, const void *buffer, size_t count ) int nwritten; DEBUG2 ("fd %d: about to write %d bytes\n", fd, (int)count ); + _gpgme_debug (2, "fd %d: write `%.*s'\n", fd, (int)count, buffer ); do { nwritten = write (fd, buffer, count); } while (nwritten == -1 && errno == EINTR ); @@ -256,13 +261,14 @@ _gpgme_io_select ( struct io_select_fd_s *fds, size_t nfds ) static fd_set writefds; int any, i, max_fd, n, count; struct timeval timeout = { 1, 0 }; /* Use a 1s timeout */ - void *dbg_help; + void *dbg_help = NULL; FD_ZERO ( &readfds ); FD_ZERO ( &writefds ); max_fd = 0; - DEBUG_BEGIN (dbg_help, "gpgme:select on [ "); + if ( _gpgme_debug_level () > 2 ) + DEBUG_BEGIN (dbg_help, "gpgme:select on [ "); any = 0; for ( i=0; i < nfds; i++ ) { if ( fds[i].fd == -1 ) @@ -288,7 +294,7 @@ _gpgme_io_select ( struct io_select_fd_s *fds, size_t nfds ) } fds[i].signaled = 0; } - DEBUG_END (dbg_help, "]" ); + DEBUG_END (dbg_help, "]" ); if ( !any ) return 0; @@ -300,7 +306,8 @@ _gpgme_io_select ( struct io_select_fd_s *fds, size_t nfds ) return -1; /* error */ } - DEBUG_BEGIN (dbg_help, "select OK [ " ); + if ( _gpgme_debug_level () > 2 ) + DEBUG_BEGIN (dbg_help, "select OK [ " ); if (DEBUG_ENABLED(dbg_help)) { for (i=0; i <= max_fd; i++ ) { if (FD_ISSET (i, &readfds) ) diff --git a/gpgme/posix-sema.c b/gpgme/posix-sema.c index 82f9b8c..5d56cc4 100644 --- a/gpgme/posix-sema.c +++ b/gpgme/posix-sema.c @@ -1,5 +1,6 @@ /* posix-sema.c * Copyright (C) 2001 Werner Koch (dd9jn) + * Copyright (C) 2001 g10 Code GmbH * * This file is part of GPGME. * diff --git a/gpgme/posix-util.c b/gpgme/posix-util.c index 38fb2f0..34150fb 100644 --- a/gpgme/posix-util.c +++ b/gpgme/posix-util.c @@ -1,5 +1,6 @@ /* posix-util.c - Utility functions for Posix * Copyright (C) 2001 Werner Koch (dd9jn) + * Copyright (C) 2001 g10 Code GmbH * * This file is part of GPGME. * diff --git a/gpgme/recipient.c b/gpgme/recipient.c index 5a14c0a..c9a217e 100644 --- a/gpgme/recipient.c +++ b/gpgme/recipient.c @@ -1,5 +1,6 @@ /* recipient.c - mainatin recipient sets * Copyright (C) 2000 Werner Koch (dd9jn) + * Copyright (C) 2001 g10 Code GmbH * * This file is part of GPGME. * diff --git a/gpgme/rungpg.c b/gpgme/rungpg.c index bed8aac..d68de45 100644 --- a/gpgme/rungpg.c +++ b/gpgme/rungpg.c @@ -1,5 +1,6 @@ /* rungpg.c * Copyright (C) 2000 Werner Koch (dd9jn) + * Copyright (C) 2001 g10 Code GmbH * * This file is part of GPGME. * diff --git a/gpgme/rungpg.h b/gpgme/rungpg.h index e6ba4a9..2895a83 100644 --- a/gpgme/rungpg.h +++ b/gpgme/rungpg.h @@ -1,5 +1,6 @@ /* rungpg.h - gpg calling functions * Copyright (C) 2000 Werner Koch (dd9jn) + * Copyright (C) 2001 g10 Code GmbH * * This file is part of GPGME. * diff --git a/gpgme/sema.h b/gpgme/sema.h index db28a71..e476467 100644 --- a/gpgme/sema.h +++ b/gpgme/sema.h @@ -1,5 +1,6 @@ /* sema.h - definitions for semaphores * Copyright (C) 2001 Werner Koch (dd9jn) + * Copyright (C) 2001 g10 Code GmbH * * This file is part of GPGME. * diff --git a/gpgme/sign.c b/gpgme/sign.c index 5b6c61e..f71e0d6 100644 --- a/gpgme/sign.c +++ b/gpgme/sign.c @@ -1,5 +1,6 @@ /* sign.c - signing functions * Copyright (C) 2000 Werner Koch (dd9jn) + * Copyright (C) 2001 g10 Code GmbH * * This file is part of GPGME. * diff --git a/gpgme/signers.c b/gpgme/signers.c index 6432b8f..95d8a22 100644 --- a/gpgme/signers.c +++ b/gpgme/signers.c @@ -1,5 +1,6 @@ /* signers.c - maintain signer sets * Copyright (C) 2001 Werner Koch (dd9jn) + * Copyright (C) 2001 g10 Code GmbH * * This file is part of GPGME. * diff --git a/gpgme/syshdr.h b/gpgme/syshdr.h index 166e874..af5e4ad 100644 --- a/gpgme/syshdr.h +++ b/gpgme/syshdr.h @@ -1,5 +1,6 @@ /* syshdr.h - System specfic header files * Copyright (C) 2000 Werner Koch (dd9jn) + * Copyright (C) 2001 g10 Code GmbH * * This file is part of GPGME. * diff --git a/gpgme/trustlist.c b/gpgme/trustlist.c index 156bbb8..c6ba8e8 100644 --- a/gpgme/trustlist.c +++ b/gpgme/trustlist.c @@ -1,5 +1,6 @@ /* trustlist.c - key listing * Copyright (C) 2000 Werner Koch (dd9jn) + * Copyright (C) 2001 g10 Code GmbH * * This file is part of GPGME. * diff --git a/gpgme/types.h b/gpgme/types.h index e5642e1..4aa0df7 100644 --- a/gpgme/types.h +++ b/gpgme/types.h @@ -1,5 +1,6 @@ /* types.h - Some type definitions * Copyright (C) 2000 Werner Koch (dd9jn) + * Copyright (C) 2001 g10 Code GmbH * * This file is part of GPGME. * diff --git a/gpgme/util.c b/gpgme/util.c index 0210733..1d777a5 100644 --- a/gpgme/util.c +++ b/gpgme/util.c @@ -1,5 +1,6 @@ /* util.c * Copyright (C) 2000 Werner Koch (dd9jn) + * Copyright (C) 2001 g10 Code GmbH * * This file is part of GPGME. * diff --git a/gpgme/util.h b/gpgme/util.h index 0d901e6..437276e 100644 --- a/gpgme/util.h +++ b/gpgme/util.h @@ -1,5 +1,6 @@ /* util.h * Copyright (C) 2000 Werner Koch (dd9jn) + * Copyright (C) 2001 g10 Code GmbH * * This file is part of GPGME. * @@ -47,6 +48,7 @@ void _gpgme_free ( void *a ); void _gpgme_debug (int level, const char *format, ...); +int _gpgme_debug_level (void); void _gpgme_debug_begin ( void **helper, int level, const char *text); int _gpgme_debug_enabled ( void **helper ); void _gpgme_debug_add (void **helper, const char *format, ...); diff --git a/gpgme/verify.c b/gpgme/verify.c index ce6a2ba..b611ece 100644 --- a/gpgme/verify.c +++ b/gpgme/verify.c @@ -1,5 +1,6 @@ /* verify.c - signature verification * Copyright (C) 2000 Werner Koch (dd9jn) + * Copyright (C) 2001 g10 Code GmbH * * This file is part of GPGME. * diff --git a/gpgme/version.c b/gpgme/version.c index cac1982..0d8e5a7 100644 --- a/gpgme/version.c +++ b/gpgme/version.c @@ -1,5 +1,6 @@ /* version.c - version check * Copyright (C) 2000 Werner Koch (dd9jn) + * Copyright (C) 2001 g10 Code GmbH * * This file is part of GPGME. * diff --git a/gpgme/w32-io.c b/gpgme/w32-io.c index bfa0ad6..7d06060 100644 --- a/gpgme/w32-io.c +++ b/gpgme/w32-io.c @@ -1,5 +1,6 @@ /* w32-io.c - W32 API I/O functions * Copyright (C) 2000 Werner Koch (dd9jn) + * Copyright (C) 2001 g10 Code GmbH * * This file is part of GPGME. * diff --git a/gpgme/w32-sema.c b/gpgme/w32-sema.c index 3b905c9..b8507f8 100644 --- a/gpgme/w32-sema.c +++ b/gpgme/w32-sema.c @@ -1,5 +1,6 @@ /* w32-sema.c * Copyright (C) 2001 Werner Koch (dd9jn) + * Copyright (C) 2001 g10 Code GmbH * * This file is part of GPGME. * diff --git a/gpgme/w32-util.c b/gpgme/w32-util.c index 000ce04..693a9c7 100644 --- a/gpgme/w32-util.c +++ b/gpgme/w32-util.c @@ -1,6 +1,7 @@ /* w32-util.c - Utility functions for the W32 API - * Copyright (C) 2001 Werner Koch (dd9jn) * Copyright (C) 1999 Free Software Foundation, Inc + * Copyright (C) 2001 Werner Koch (dd9jn) + * Copyright (C) 2001 g10 Code GmbH * * This file is part of GPGME. * diff --git a/gpgme/wait.c b/gpgme/wait.c index ff65247..47b2261 100644 --- a/gpgme/wait.c +++ b/gpgme/wait.c @@ -1,5 +1,6 @@ /* wait.c * Copyright (C) 2000 Werner Koch (dd9jn) + * Copyright (C) 2001 g10 Code GmbH * * This file is part of GPGME. * diff --git a/gpgme/wait.h b/gpgme/wait.h index 445be6d..857e5d5 100644 --- a/gpgme/wait.h +++ b/gpgme/wait.h @@ -1,5 +1,6 @@ /* wait.h - definitions for wait.c * Copyright (C) 2000 Werner Koch (dd9jn) + * Copyright (C) 2001 g10 Code GmbH * * This file is part of GPGME. * diff --git a/jnlib/ChangeLog b/jnlib/ChangeLog index ed5e20a..b9a1c2b 100644 --- a/jnlib/ChangeLog +++ b/jnlib/ChangeLog @@ -39,3 +39,14 @@ Mon Jan 24 13:04:28 CET 2000 Werner Koch (log_printf): New. (do_logv): Add kludge to insert LFs. + + Copyright 2000 Werner Koch (dd9jn) + Copyright 2001 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. diff --git a/jnlib/Makefile.am b/jnlib/Makefile.am index 5d60969..1049f3c 100644 --- a/jnlib/Makefile.am +++ b/jnlib/Makefile.am @@ -1,3 +1,21 @@ +# Copyright (C) 1999, 2000, 2001 Feee Software Soundation, 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 + ## Process this file with automake to produce Makefile.in EXTRA_DIST = README @@ -16,4 +34,3 @@ libjnlib_a_SOURCES = libjnlib-config.h \ types.h mischelp.h - diff --git a/jnlib/argparse.c b/jnlib/argparse.c index 0384c5d..ba63558 100644 --- a/jnlib/argparse.c +++ b/jnlib/argparse.c @@ -1,5 +1,5 @@ /* [argparse.c wk 17.06.97] Argument Parser for option handling - * Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. + * Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc. * * This file is part of GnuPG. * diff --git a/jnlib/argparse.h b/jnlib/argparse.h index 3668a21..e8922fa 100644 --- a/jnlib/argparse.h +++ b/jnlib/argparse.h @@ -1,5 +1,5 @@ /* argparse.h - * Copyright (C) 1998,1999 Free Software Foundation, Inc. + * Copyright (C) 1998,1999,2000,2001 Free Software Foundation, Inc. * * This file is part of GnuPG. * diff --git a/jnlib/dotlock.c b/jnlib/dotlock.c index 8e61f7a..772c770 100644 --- a/jnlib/dotlock.c +++ b/jnlib/dotlock.c @@ -1,5 +1,5 @@ /* dotlock.c - dotfile locking - * Copyright (C) 1998,2000 Free Software Foundation, Inc. + * Copyright (C) 1998,2000,2001 Free Software Foundation, Inc. * * This file is part of GnuPG. * diff --git a/jnlib/dotlock.h b/jnlib/dotlock.h index d54219e..7d45c82 100644 --- a/jnlib/dotlock.h +++ b/jnlib/dotlock.h @@ -1,5 +1,5 @@ /* dotlock.h - * Copyright (C) 2000 Free Software Foundation, Inc. + * Copyright (C) 2000, 2001 Free Software Foundation, Inc. * * This file is part of GnuPG. * diff --git a/jnlib/libjnlib-config.h b/jnlib/libjnlib-config.h index 4cc57b2..de8e6a4 100644 --- a/jnlib/libjnlib-config.h +++ b/jnlib/libjnlib-config.h @@ -1,5 +1,5 @@ /* libjnlib-config.h - local configuration of the jnlib functions - * Copyright (C) 2000 Free Software Foundation, Inc. + * Copyright (C) 2000, 2001 Free Software Foundation, Inc. * * This file is part of GnuPG. * diff --git a/jnlib/logging.c b/jnlib/logging.c index 7ab2cb5..f03c5c4 100644 --- a/jnlib/logging.c +++ b/jnlib/logging.c @@ -1,5 +1,5 @@ /* logging.c - useful logging functions - * Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. + * Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc. * * This file is part of GnuPG. * diff --git a/jnlib/logging.h b/jnlib/logging.h index 5084b71..83158f0 100644 --- a/jnlib/logging.h +++ b/jnlib/logging.h @@ -1,5 +1,5 @@ /* logging.h - * Copyright (C) 1999, 2000 Free Software Foundation, Inc. + * Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. * * This file is part of GnuPG. * diff --git a/jnlib/mischelp.h b/jnlib/mischelp.h index 684a697..58c9250 100644 --- a/jnlib/mischelp.h +++ b/jnlib/mischelp.h @@ -1,5 +1,5 @@ /* mischelp.h - * Copyright (C) 1999 Free Software Foundation, Inc. + * Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. * * This file is part of GnuPG. * diff --git a/jnlib/stringhelp.c b/jnlib/stringhelp.c index 59345f2..f222a62 100644 --- a/jnlib/stringhelp.c +++ b/jnlib/stringhelp.c @@ -1,5 +1,5 @@ /* stringhelp.c - standard string helper functions - * Copyright (C) 1998, 1999 Free Software Foundation, Inc. + * Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc. * * This file is part of GnuPG. * diff --git a/jnlib/stringhelp.h b/jnlib/stringhelp.h index ebdd7b2..5d124e4 100644 --- a/jnlib/stringhelp.h +++ b/jnlib/stringhelp.h @@ -1,5 +1,5 @@ /* stringhelp.h - * Copyright (C) 1998,1999 Free Software Foundation, Inc. + * Copyright (C) 1998,1999,2000,2001 Free Software Foundation, Inc. * * This file is part of GnuPG. * diff --git a/jnlib/types.h b/jnlib/types.h index a5d0e42..230d150 100644 --- a/jnlib/types.h +++ b/jnlib/types.h @@ -1,5 +1,5 @@ /* types.h - * Copyright (C) 1999, 2000 Free Software Foundation, Inc. + * Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. * * This file is part of GnuPG. * diff --git a/jnlib/xmalloc.c b/jnlib/xmalloc.c index 34ecc28..1cfaab9 100644 --- a/jnlib/xmalloc.c +++ b/jnlib/xmalloc.c @@ -1,5 +1,5 @@ /* xmalloc.c - standard malloc wrappers - * Copyright (C) 1999 Free Software Foundation, Inc. + * Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. * * This file is part of GnuPG. * diff --git a/jnlib/xmalloc.h b/jnlib/xmalloc.h index 4dd88ec..150ef36 100644 --- a/jnlib/xmalloc.h +++ b/jnlib/xmalloc.h @@ -1,5 +1,5 @@ /* xmalloc.h - * Copyright (C) 1999 Free Software Foundation, Inc. + * Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. * * This file is part of GnuPG. * diff --git a/tests/Makefile.am b/tests/Makefile.am index 27482bb..2d56612 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,4 +1,24 @@ -## Process this file with automake to create Makefile.in +# Copyright (C) 2000 Werner Koch (dd9jn) +# Copyright (C) 2001 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 General Public License as published by +# the Free Software Foundation; either version 2 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 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 + +## Process this file with automake to produce Makefile.in + TESTS_ENVIRONMENT = GNUPGHOME=. diff --git a/tests/t-decrypt.c b/tests/t-decrypt.c index 677d382..af4c2d0 100644 --- a/tests/t-decrypt.c +++ b/tests/t-decrypt.c @@ -1,5 +1,6 @@ /* t-encrypt.c - regression test * Copyright (C) 2000 Werner Koch (dd9jn) + * Copyright (C) 2001 g10 Code GmbH * * This file is part of GPGME. * diff --git a/tests/t-encrypt.c b/tests/t-encrypt.c index 8604690..bbb5557 100644 --- a/tests/t-encrypt.c +++ b/tests/t-encrypt.c @@ -1,5 +1,6 @@ /* t-encrypt.c - regression test * Copyright (C) 2000 Werner Koch (dd9jn) + * Copyright (C) 2001 g10 Code GmbH * * This file is part of GPGME. * diff --git a/tests/t-export.c b/tests/t-export.c index 768e739..ca0ee98 100644 --- a/tests/t-export.c +++ b/tests/t-export.c @@ -1,5 +1,6 @@ /* t-export.c - regression test * Copyright (C) 2000 Werner Koch (dd9jn) + * Copyright (C) 2001 g10 Code GmbH * * This file is part of GPGME. * diff --git a/tests/t-genkey.c b/tests/t-genkey.c index d22b95e..a330056 100644 --- a/tests/t-genkey.c +++ b/tests/t-genkey.c @@ -1,5 +1,6 @@ /* t-genkey.c - regression test * Copyright (C) 2000 Werner Koch (dd9jn) + * Copyright (C) 2001 g10 Code GmbH * * This file is part of GPGME. * diff --git a/tests/t-import.c b/tests/t-import.c index 9335339..8054ed6 100644 --- a/tests/t-import.c +++ b/tests/t-import.c @@ -1,5 +1,6 @@ /* t-import.c - regression test * Copyright (C) 2000 Werner Koch (dd9jn) + * Copyright (C) 2001 g10 Code GmbH * * This file is part of GPGME. * diff --git a/tests/t-keylist.c b/tests/t-keylist.c index 317990c..aa82a5b 100644 --- a/tests/t-keylist.c +++ b/tests/t-keylist.c @@ -1,5 +1,6 @@ /* t-keylist.c - regression test * Copyright (C) 2000 Werner Koch (dd9jn) + * Copyright (C) 2001 g10 Code GmbH * * This file is part of GPGME. * diff --git a/tests/t-sign.c b/tests/t-sign.c index 79f6b5c..f57a1ea 100644 --- a/tests/t-sign.c +++ b/tests/t-sign.c @@ -1,5 +1,6 @@ /* t-sign.c - regression test * Copyright (C) 2000 Werner Koch (dd9jn) + * Copyright (C) 2001 g10 Code GmbH * * This file is part of GPGME. * diff --git a/tests/t-trustlist.c b/tests/t-trustlist.c index ce83d62..aaa704a 100644 --- a/tests/t-trustlist.c +++ b/tests/t-trustlist.c @@ -1,5 +1,6 @@ /* t-trustlist.c - regression test * Copyright (C) 2000 Werner Koch (dd9jn) + * Copyright (C) 2001 g10 Code GmbH * * This file is part of GPGME. * diff --git a/tests/t-verify.c b/tests/t-verify.c index e0fbbe3..b315d1f 100644 --- a/tests/t-verify.c +++ b/tests/t-verify.c @@ -1,5 +1,6 @@ /* t-verify.c - regression test * Copyright (C) 2000 Werner Koch (dd9jn) + * Copyright (C) 2001 g10 Code GmbH * * This file is part of GPGME. * -- 2.26.2