head	1.28;
access;
symbols
	V0-3-1:1.8;
locks; strict;
comment	@# @;


1.28
date	2001.02.14.10.44.54;	author pgerwinski;	state Exp;
branches;
next	1.27;

1.27
date	2001.02.13.18.36.10;	author bherzog;	state Exp;
branches;
next	1.26;

1.26
date	2001.02.12.01.59.20;	author pgerwinski;	state Exp;
branches;
next	1.25;

1.25
date	2001.02.09.18.07.34;	author pgerwinski;	state Exp;
branches;
next	1.24;

1.24
date	2001.02.09.17.57.07;	author pgerwinski;	state Exp;
branches;
next	1.23;

1.23
date	2001.02.07.13.07.40;	author bherzog;	state Exp;
branches;
next	1.22;

1.22
date	2001.01.30.00.26.29;	author pgerwinski;	state Exp;
branches;
next	1.21;

1.21
date	2001.01.29.18.49.25;	author bherzog;	state Exp;
branches;
next	1.20;

1.20
date	2001.01.28.15.13.18;	author pgerwinski;	state Exp;
branches;
next	1.19;

1.19
date	2001.01.23.10.17.26;	author pgerwinski;	state Exp;
branches;
next	1.18;

1.18
date	2001.01.18.07.01.09;	author wkoch;	state Exp;
branches;
next	1.17;

1.17
date	2001.01.16.22.27.23;	author pgerwinski;	state Exp;
branches;
next	1.16;

1.16
date	2001.01.16.10.25.50;	author pgerwinski;	state Exp;
branches;
next	1.15;

1.15
date	2001.01.07.16.57.22;	author pgerwinski;	state Exp;
branches;
next	1.14;

1.14
date	2000.12.20.13.31.17;	author wkoch;	state Exp;
branches;
next	1.13;

1.13
date	2000.10.25.15.10.10;	author pgerwinski;	state Exp;
branches;
next	1.12;

1.12
date	2000.09.01.15.17.06;	author wkoch;	state Exp;
branches;
next	1.11;

1.11
date	2000.08.30.16.42.12;	author wkoch;	state Exp;
branches;
next	1.10;

1.10
date	2000.08.14.13.57.54;	author wkoch;	state Exp;
branches;
next	1.9;

1.9
date	2000.07.10.16.09.30;	author wkoch;	state Exp;
branches;
next	1.8;

1.8
date	2000.05.25.16.03.30;	author wkoch;	state Exp;
branches;
next	1.7;

1.7
date	2000.05.16.18.08.34;	author wkoch;	state Exp;
branches;
next	1.6;

1.6
date	2000.05.16.17.35.11;	author wkoch;	state Exp;
branches;
next	1.5;

1.5
date	2000.05.16.15.30.40;	author wkoch;	state Exp;
branches;
next	1.4;

1.4
date	2000.05.11.16.01.28;	author wkoch;	state Exp;
branches;
next	1.3;

1.3
date	2000.05.11.00.57.07;	author pgerwinski;	state Exp;
branches;
next	1.2;

1.2
date	2000.05.04.16.01.55;	author wkoch;	state Exp;
branches;
next	1.1;

1.1
date	2000.05.02.18.01.28;	author wkoch;	state Exp;
branches;
next	;


desc
@@


1.28
log
@ * Sort key rings alphabetically.

 * Faster key management; some bugs fixed.

 * GPGME error handling.

 * Handle quoting of colons.

 * Check whether files really exist.
@
text
@Tue 13 Feb 2001 29:45 Peter Gerwinski <peter@@gerwinski.de>

        * all files: s/gchar/char/g, GCSsified.

        * gpapa.c (release_public_keyring, release_secret_keyring,
          compare_public_keys, compare_secret_keys,
          gpapa_extract_fingerprint): new functions.
          (extract_key): recognize (even false) quoted colons.
          (linecallback_refresh_pub, linecallback_id_pub,
          linecallback_refresh_sec, linecallback_id_sec):
          report status errors.
          since GPG has `--with-fingerprint' now, get the fingerprints here.
          (gpapa_refresh_public_keyring): pass `--with-fingerprint';
          sort the public key ring alphabetically.
          (gpapa_get_public_key_count): refresh only if absolutely necessary.
          (gpapa_get_public_key_by_ID, gpapa_get_public_key_by_userID,
          gpapa_get_secret_key_by_ID, gpapa_get_secret_key_by_userID):
          return the key from the key list.
          (gpapa_release_public_key, gpapa_release_secret_key): removed; these
          are now (again) methods of the public/secret key objects.
          (gpapa_refresh_secret_keyring): sort the secret key ring
          alphabetically.
          (gpapa_load_options, gpapa_save_options): removed.
          (gpapa_fini): release keyrings.

        * gpapafile.c (linecallback_check_gpg_status): new function.
          (linecallback_get_status, linecallback_get_signatures,
          gpapa_file_sign, gpapa_file_encrypt, gpapa_file_encrypt_and_sign, 
          gpapa_file_protect, gpapa_file_decrypt): report status errors.
          (gpapa_file_get_status): check explicitly whether the file exists
          and is a regular file.

        * gpapaintern.c (gpapa_report_error_status): new function.
          (gpapa_call_gnupg): reset the counter of STATUS_NODATA reports.

        * gpapakey.c (gpapa_key_set_expiry_date): use g_strdup_printf().
        
        * gpapapublickey.c (linecallback_fingerprint,
          gpapa_public_key_set_ownertrust): use extract_fingerprint().
          (linecallback_fingerprint): report status errors.
          (gpapa_public_key_release): new (old) function.

        * gpapasecretkey.c (gpapa_secret_key_create_revocation): no need to
          {s|g_strdup}_printf().
          (gpapa_secret_key_release): new function.

2001-02-13  Bernhard Herzog  <bh@@intevation.de>

	* Makefile.am (libgpapa_a_SOURCES): Add sema.h

	* gpapafile.c (gpapa_file_get_status): Fix wrong gpgargv index.

Sun 11 Feb 2001 26:42 Peter Gerwinski <peter@@gerwinski.de>

        * gpapa.c (gpapa_create_key_pair): handle empty comments;
          explicitly add the `--batch' option.

        * gpapaintern.c (gpapa_call_gnupg): add the `--batch' option
          only when there are no commands. Otherwise, gpg complains
          about deletion of secret keys which cannot be done in batch mode.

        * gpapasecretkey.c (gpapa_secret_key_delete): give a "YES" command;
          also delete the public key.

        * rungpg.c (build_argv): never add the `--batch' option;
          let the caller do this.

        * wait.c (_gpgme_wait_on_condition): do not consider `c->cancel'.
          In fact `c' is not really a `GpgmeCtx'.

Fri 9 Feb 2001 19:05 Peter Gerwinski <peter@@gerwinski.de>

        * posix-sema.c, w32-sema.c, sema.h, debug.c: new files (from GPGME).

Fri 9 Feb 2001 11:05 Peter Gerwinski <peter@@gerwinski.de>

        * context.h, data.c, gpgme.c, gpgme.h, ops.h, posix-io.c,
          rungpg.c, rungpg.h, util.c, util.h, w32-io.c, wait.c,
          gpgme_types.h: updated to current GPGME.

        * sema.h: new file (from GPGME).

2001-02-07  Bernhard Herzog  <bh@@intevation.de>

	* gpapatest.c (test_expiry): Add a dummy passphrase to make
	gpapatest compile with the changes in gpapakey.c

	* gpapakey.h (gpapa_key_set_expiry_date): 
	* gpapakey.c (gpapa_key_set_expiry_date): Add the password
	parameter and pass it to gpg also treat a NULL date properly as
	"never expire"

Mon 29 Jan 2001 25:14 Peter Gerwinski <peter@@gerwinski.de>

        All files: updated copyright notices.

        * gpapa.c (gpapa_create_key_pair): cosmetical changes.

        * gpapaintern.c (gpapa_call_gnupg): more debugging output;
          pass the commands on fd 0 rather than on a special fd.
          For whatever reason, this works (at least on a Linux-based
          systems) while the other doesn't.

        * gpapatest.c (test_genkey): cosmetical changes.
          (test_gpapa_key_set_expiry_date): renamed to `test_expiry'.
          (main) call `test_expiry' on keyword "expiry".

2001-01-29  Bernhard Herzog  <bh@@intevation.de>

	* Makefile.am (libgpapa_a_SOURCES): Correct the filename of
	status-table.h and add context.h so that make dist works again

Sat 27 Jan 2001 27:42 Peter Gerwinski <peter@@gerwinski.de>

        * gpapaintern.c (line_handler, status_handler): added debug output.
          (command_handler): trying to use this for passing a passphrase.
          (gpapa_call_gnupg): explicitly use `--command-fd' and
          `--passphrase-fd' instead of relying on the GPGME callbacks.

        * gpapatest.c (linecallback): fixed parameters to use GPGME
          status codes.
          (main): report `argv[0]' instead of "foo" in callback messages.

        * posix-io.c (_gpgme_io_spawn): more debugging messages.

        * rungpg.c (build_argv): more debugging messages.

Fri 26 Jan 2001 18:46 Peter Gerwinski <peter@@gerwinski.de>

        * gpapa.c (gpapa_create_key_pair): initialize `commands'.

        * gpapafile.c (status_check): do not clear the buffer.
          The strings will be needed.

        * gpgme_types.h: #define GPG_PATH only if not already defined.

Tue 23 Jan 2001 11:12 Peter Gerwinski <peter@@gerwinski.de>

        * w32-io.c (_gpgme_io_spawn): use `nul' instead of `/dev/nul'.

Mon 22 Jan 2001 29:24 Peter Gerwinski <peter@@gerwinski.de>

        * gpapapublickey.c (linecallback_get_signatures): do not
          treat the self-signature specially.

        * gpapatest.c (main): initialize with GPG_PROGRAM from
          `../gpgdefs.h' rather than with a constant path.

        * gpgme_types.h (GPG_PATH): redefined to use GPAPA's path to
          the gpg program as specified in gpapa_init().

2001-01-18  Werner Koch  <wk@@gnupg.org>

	* gpapaintern.c, util.c (stpcpy): Removed.
	* w32-io.c (stpcpy): New.

Tue 16 Jan 2001 23:25 Jan van Heys <jan.van.heys@@uni-essen.de>
                      Peter Gerwinski <peter@@gerwinski.de>

        Copied relevant files from GPGME.

        * Makefile.am: added new files.

Mon 15 Jan 2001 28:30 Peter Gerwinski <peter@@gerwinski.de>

        Re-wrote the GnuPG communication layer to use GPGME.

        * Makefile.am:
          (gpapatest_LDADD): added `-lgpgme'.

        * gpapa.c:
          (top level): let "gpapa.h" include the standard headers.
          (linecallback_refresh_pub): parameter list changed
          according to the new requirements of gpapa_call_gnupg();
          body changed accordingly.
          (linecallback_refresh_sec): likewise.
          (linecallback_id_sec): likewise.
          (linecallback_export_ownertrust): likewise.

        * gpapa.h: include standard headers.

        * gpapafile.c: 
          (top level): let "gpapa.h" include the standard headers.
          (linecallback_get_status): parameter list changed (see above).
          (status_check): pass status as a GpgStatusCode rather than a char*.
          (linecallback_get_signatures): parameter list changed (see above).

        * gpapaintern.c: rewritten. Use functions from GPGME for
          communication with GnuPG.
          (stpcpy): new function.

        * gpapaintern.h:
          (NO_STATUS): constant to indicate that something is _not_ a
          GPG status code.
          @@@@@@@@ This must be kept in sync with GPGME!

        * gpapapublickey.c:
          (linecallback_fingerprint): parameter list changed (see above).
          (linecallback_get_signatures): likewise.

        Cosmetical changes (GCS, etc.) in other files.

2000-12-20  Werner Koch  <wk@@gnupg.org>

	Applied patches from Jan's tarball dated 2000-12-18.  

Mon 18 Dec 2000 Jan van Heys <jan.van.heys@@uni-essen.de>
                Peter Gerwinski <peter@@gerwinski.de>

        * gpapa.c:
          (gpapa_get_public_key_by_userID): new function.
          (gpapa_get_secret_key_by_userID): new function.
          (gpapa_create_key_pair): return the created public and
          secret keys.

        * gpapakey.c:
          (gpapa_key_set_expiry_date): function implemented.

        * gpapapublickey.c:
          (gpapa_public_key_get_keytrust),
          (gpapa_public_key_get_ownertrust): handle case 'q'.
          (gpapa_public_key_set_ownertrust): function implemented.
          (gpapa_public_key_delete): added confirmation to `gpg' call.

        * gpapasecretkey.c:
          (gpapa_secret_key_delete): added confirmation to `gpg' call.
          (gpapa_secret_key_create_revocation): function implemented.

        * gpapatest.c:
          (test_genkey),
          (test_gpapa_key_set_expiry_date): new functions.
          (main): call new functions.

Wed 25 Oct 2000 16:42 Jan van Heys <jan.van.heys@@uni-essen.de>
                      Peter Gerwinski <peter@@gerwinski.de>

        * gpapaintern.c: introduced "#define TEST_PASSPHRASE" hack
          to provide a dummy passphrase "test" for testing purposes.
          (spawn_gnupg): close the input pipe after writing the
          commands to it.
          (handle_status, handle_output_line): fixed bug which
          caused incomplete lines to jam the pipe i/o.

        * gpapa.c (gpapa_create_key_pair): function implemented.

        * gpapapublickey.c (gpapa_public_key_sign): function implemented.

2000-09-01  Werner Koch  <wk@@gnupg.org>

	* gpapafile.c (status_check): Avoid extra allocation and made
	function more stable.  

	* gpapaintern.c: The whole thing has been restructed.

2000-08-30  Werner Koch  <wk@@gnupg.org>

	* gpapaintern.c (spawn_gnupg): New. Started to rework the GnuPG
	invocation stuff for easier debugging of Windows problem.

2000-07-31 16:35:40  Werner Koch  (wk@@habibti.openit.de)

  * gpapaintern.c (gpapa_call_gnupg) [MINGW32]: SetHandleInformation() is not
  available under Windows9[58]; so we do not print the error message.
  Fixed a stupid SEGV problem with fprintf.

2000-07-10 18:11:21  Werner Koch  (wk@@habibti.openit.de)

  * build-dll, README: New.

  * gpapatest.c [MINGW32]: Implement xmalloc etc. here

2000-05-25 17:51:21  Werner Koch  (wk@@habibti.openit.de)

  * gpapa.c (gpapa_init): Add gpg parameter.
  (gpapa_private_get_gpg_program): New.
  * gpapaintern.c (gpapa_call_gnupg): Use this new function.

2000-05-16 19:53:49  Werner Koch  (wk@@habibti.openit.de)

  Ran "indent -gnu -sc" on all source files.

2000-05-16 17:38:06  Werner Koch  (wk@@habibti.openit.de)

  * gpapaintern.c (gpapa_call_gnupg) [MINGW32]: Some stuff works now.

2000-05-11 16:54:10  Werner Koch  (wk@@habibti.openit.de)

  * gpapaintern.c (gpapa_call_gnupg) [MINGW32]: Dummy code for W32.
    Excluded one header for W32.

10 May 2000 26:56 Peter Gerwinski <peter.gerwinski@@g-n-u.de>

  All non-interactive parts of the public and secret key editors work.
  Encrypting, decrypting, and signing files works.

2000-05-02 19:45:30  Werner Koch  (wk@@habibti.openit.de)

  Replaced all concat() by xstrcat2().	Replaced some parameters named
  index by idx to avoid compiler warnings due to the index(3).

2000-05-02 18:32:57  Werner Koch  (wk@@habibti.openit.de)

  * Makefile.am: New.

  Included the config.h as the header of each .c file.	Removed
  the libiberty.h header.

Wed 26 Apr 2000 26:07 Peter Gerwinski <peter.gerwinski@@g-n-u.de>

  * gpapa.c: re-implemented key ring extraction to keep them in
    memory.  This is much faster for now but does not scale well
    and must be replaced by something more sophisticated in the
    future.

Wed 26 Apr 2000 12:53 Peter Gerwinski <peter.gerwinski@@g-n-u.de>

  * m: create an `.a'.

  * upload: new file.

Wed 26 Apr 2000 10:10 Peter Gerwinski <peter.gerwinski@@g-n-u.de>

  * gpapaintern.c: gpapa_call_gnupg(): get the passphrase as an
    additional parameter instead of using a callback.

Tue 25 Apr 2000 26:25 Peter Gerwinski <peter.gerwinski@@g-n-u.de>

  Signing works.

  * gpapaintern.c: gpapa_call_gnupg() can handle passphrases.
    In fact for the way it is implemented, the callback is not
    necessary.	Do we want to keep it?

Tue 25 Apr 2000 14:00 Peter Gerwinski <peter.gerwinski@@g-n-u.de>

  Getting information about keys works, including fingerprints
  and such, but not including signatures and such.

Sun 23 Apr 2000 28:00 Peter Gerwinski <peter.gerwinski@@g-n-u.de>

  * gpapaintern.c: gpapa_call_gnupg() works.

Sat 22 Apr 2000 Peter Gerwinski <peter.gerwinski@@g-n-u.de>

  Started implementing.

Thu 20 Apr 2000 Markus Gerwinski <markus.gerwinski@@sercon.de>

  Finished design.

Tue 18 Apr 2000 Markus Gerwinski <markus.gerwinski@@sercon.de>

  Started with design.	Created the name "GPAPA".

Wed 5 Apr 2000 Markus Gerwinski <markus.gerwinski@@sercon.de>

  Wrote down requirements.

Tu 16 May 2000 Markus Gerwinski <markus.gerwinski@@sercon.de>

  - Did a lot of major changes in the header of gpapa_create_key_pair.
  - Detached methods set_expiry_date and set_expiry_time from class
    GpapaSecretKey and attached them to GpapaKey.
@


1.27
log
@* Makefile.am (libgpapa_a_SOURCES): Add sema.h

* gpapafile.c (gpapa_file_get_status): Fix wrong gpgargv index.
@
text
@d1 46
@


1.26
log
@ * Create keys without comment fields

 * Delete secret keys (together with their public keys)
@
text
@d1 6
@


1.25
log
@New files from GPGME.
@
text
@d1 18
d21 1
a21 1
        * posix-sema.c, w32-sema.c, debug.c: new files (from GPGME).
@


1.24
log
@Upgraded GPGME parts of GPAPA.
@
text
@d1 4
@


1.23
log
@* gpapatest.c (test_expiry): Add a dummy passphrase to make
gpapatest compile with the changes in gpapakey.c

* gpapakey.h (gpapa_key_set_expiry_date):
* gpapakey.c (gpapa_key_set_expiry_date): Add the password
parameter and pass it to gpg also treat a NULL date properly as
"never expire"

* keyring.c (keyring_editor_generate_key_advanced): Pass the
password to gpapa_key_set_expiry_date

* keysmenu.c (keys_openSecret_editKey_close):
(keys_openSecret_editKey_close): Provide dummy passwords for
gpapa_key_set_expiry_date just to make them compile. The functions
are currently unused.

* keyeditdlg.c (key_edit_change_expiry): Use the new password
parameter of the expiry dialog and pass it to gpapa.

* expirydlg.h (gpa_expiry_dialog_run):
* expirydlg.c (gpa_expiry_dialog_run): Add a parameter to return
the password
(GPAExpiryDialog): Add a field for the password
(expiry_ok): Ask for the password and set the password field in
the dialog struct
@
text
@d1 8
@


1.22
log
@
Made passing commands - in particular: key generation - work.
@
text
@d1 10
@


1.21
log
@update ChangeLog
@
text
@d1 15
@


1.20
log
@Use --passphrase-fd (again) to pass passphrases instead of
a command_handler callback (which did not work).
@
text
@d1 5
@


1.19
log
@Fixed GPGME I/O in GPAPA.

Do not treat the self-signature specially.
@
text
@d1 24
@


1.18
log
@Modifications for the new MingW32/CPD release
@
text
@d1 15
@


1.17
log
@GPAPA: copied files from GPGME.
@
text
@d1 5
@


1.16
log
@Re-wrote the GnuPG communication layer to use GPGME.
@
text
@d1 8
a8 1
Mon 15 Jan 2001 Peter Gerwinski <peter@@gerwinski.de>
@


1.15
log
@ChangeLog entry for 20 Dec 2000
Cosmetic changes (GNU coding standards)
@
text
@d1 39
@


1.14
log
@Add changes from Jan
@
text
@d4 27
a30 1
	No ChangeLog entries are available.
@


1.13
log
@Generating and signing keys almost finished; fixed bugs.
@
text
@d1 5
@


1.12
log
@Fixed some design issues in GPAPA - Still have to cope with the Windows
version
@
text
@d1 14
@


1.11
log
@backup checkin - does not compile at the moment
@
text
@d1 7
@


1.10
log
@*** empty log message ***
@
text
@d1 5
@


1.9
log
@*** empty log message ***
@
text
@d1 6
@


1.8
log
@configuration fixes
@
text
@d1 6
@


1.7
log
@No more K&R but GNU coding standards (more or less).
@
text
@d1 6
@


1.6
log
@Markus's last chunk of code changes.
He did quite a professional job to design and code the base of GPA.
Kudos to him and thanks to the BMWi for funding this development.
@
text
@d1 4
@


1.5
log
@Some GPAPA things are now working under W32.
@
text
@d3 1
a3 1
	* gpapaintern.c (gpapa_call_gnupg) [MINGW32]: Some stuff works now.
d7 2
a8 2
	* gpapaintern.c (gpapa_call_gnupg) [MINGW32]: Dummy code for W32.
	Excluded one header for W32.
d77 6
@


1.4
log
@Version 0.2.0 - very basically runs on Windows NT
@
text
@d1 4
d7 1
a7 1
	* gpapaintern.c (gpapa_call_gnupg) [MINGW32}: Dummy code for W32.
@


1.3
log
@Updated ChangeLog.
@
text
@d1 5
@


1.2
log
@Imported changes by Markus.
@
text
@d1 5
@


1.1
log
@PGG has been replaced by the new GPAPA
@
text
@d3 1
a3 1
  Replaced all concat() by xstrdup2().	Replcaed some parameters named
@

