From cvs at cvs.gnupg.org Fri Oct 1 12:11:26 2004 From: cvs at cvs.gnupg.org (cvs user werner) Date: Fri Oct 1 12:11:35 2004 Subject: gnupg/scripts (9 files) Message-ID: Date: Friday, October 1, 2004 @ 12:11:26 Author: werner Path: /cvs/gnupg/gnupg/scripts Modified: ChangeLog autogen.sh config.guess config.sub depcomp install-sh missing mk-gpg-texi mk-w32-dist * mk-w32-dist: Updated from stable branch. * mk-gpg-texi: Changed to use the newer docbook2x-texi utility. * config.guess, config.sub, mkinstalldirs, missing * depcomp, install-sh: Upgraded. --------------+ ChangeLog | 9 + autogen.sh | 2 config.guess | 343 ++++++++++++++++++++++++++++++++++----------------------- config.sub | 171 ++++++++++++++++++++-------- depcomp | 291 +++++++++++++++++++++++++++--------------------- install-sh | 151 ++++++++++++++++--------- missing | 14 +- mk-gpg-texi | 53 ++++---- mk-w32-dist | 14 -- 9 files changed, 651 insertions(+), 397 deletions(-) From cvs at cvs.gnupg.org Fri Oct 1 12:11:33 2004 From: cvs at cvs.gnupg.org (cvs user werner) Date: Fri Oct 1 12:11:49 2004 Subject: gnupg/po (31 files) Message-ID: Date: Friday, October 1, 2004 @ 12:11:33 Author: werner Path: /cvs/gnupg/gnupg/po Modified: be.po ca.po cs.po da.po de.po el.po en@boldquot.gmo en@boldquot.po en@quot.gmo en@quot.po eo.po es.po et.po fi.po fr.po gl.po hu.po id.po it.po ja.po nl.po pl.po pt.po pt_BR.po ro.po ru.po sk.po sv.po tr.po zh_CN.po zh_TW.po * mk-w32-dist: Updated from stable branch. * mk-gpg-texi: Changed to use the newer docbook2x-texi utility. * config.guess, config.sub, mkinstalldirs, missing * depcomp, install-sh: Upgraded. -----------------+ be.po | 1443 +++++++++++++++++++++++++++----------------------- ca.po | 1491 ++++++++++++++++++++++++++++------------------------ cs.po | 1488 ++++++++++++++++++++++++++++------------------------ da.po | 1476 ++++++++++++++++++++++++++++------------------------ de.po | 1530 +++++++++++++++++++++++++++++------------------------- el.po | 1490 ++++++++++++++++++++++++++++------------------------ en@boldquot.gmo | 0 en@boldquot.po | 1493 +++++++++++++++++++++++++++------------------------- en@quot.gmo | 0 en@quot.po | 1489 +++++++++++++++++++++++++++------------------------- eo.po | 1482 ++++++++++++++++++++++++++++------------------------ es.po | 1488 ++++++++++++++++++++++++++++------------------------ et.po | 1489 ++++++++++++++++++++++++++++------------------------ fi.po | 1488 ++++++++++++++++++++++++++++------------------------ fr.po | 1492 ++++++++++++++++++++++++++++------------------------ gl.po | 1487 ++++++++++++++++++++++++++++------------------------ hu.po | 1488 ++++++++++++++++++++++++++++------------------------ id.po | 1486 ++++++++++++++++++++++++++++------------------------ it.po | 1490 ++++++++++++++++++++++++++++------------------------ ja.po | 1486 ++++++++++++++++++++++++++++------------------------ nl.po | 1482 ++++++++++++++++++++++++++++------------------------ pl.po | 1492 ++++++++++++++++++++++++++++------------------------ pt.po | 1485 ++++++++++++++++++++++++++++------------------------ pt_BR.po | 1521 +++++++++++++++++++++++++++++------------------------ ro.po | 1488 ++++++++++++++++++++++++++++------------------------ ru.po | 1488 ++++++++++++++++++++++++++++------------------------ sk.po | 1488 ++++++++++++++++++++++++++++------------------------ sv.po | 1492 ++++++++++++++++++++++++++++------------------------ tr.po | 1489 ++++++++++++++++++++++++++++------------------------ zh_CN.po | 1496 ++++++++++++++++++++++++++++------------------------ zh_TW.po | 1480 ++++++++++++++++++++++++++++------------------------ 31 files changed, 23495 insertions(+), 19682 deletions(-) From cvs at cvs.gnupg.org Fri Oct 1 12:11:42 2004 From: cvs at cvs.gnupg.org (cvs user werner) Date: Fri Oct 1 12:11:56 2004 Subject: gnupg/g10 (ChangeLog app-openpgp.c) Message-ID: Date: Friday, October 1, 2004 @ 12:11:42 Author: werner Path: /cvs/gnupg/gnupg/g10 Modified: ChangeLog app-openpgp.c * mk-w32-dist: Updated from stable branch. * mk-gpg-texi: Changed to use the newer docbook2x-texi utility. * config.guess, config.sub, mkinstalldirs, missing * depcomp, install-sh: Upgraded. ---------------+ ChangeLog | 4 ++++ app-openpgp.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) From cvs at cvs.gnupg.org Fri Oct 1 12:11:42 2004 From: cvs at cvs.gnupg.org (cvs user werner) Date: Fri Oct 1 12:12:04 2004 Subject: gnupg/doc (gpg.texi gpgv.texi) Message-ID: Date: Friday, October 1, 2004 @ 12:11:42 Author: werner Path: /cvs/gnupg/gnupg/doc Modified: gpg.texi gpgv.texi * mk-w32-dist: Updated from stable branch. * mk-gpg-texi: Changed to use the newer docbook2x-texi utility. * config.guess, config.sub, mkinstalldirs, missing * depcomp, install-sh: Upgraded. -----------+ gpg.texi | 1344 +++++++++++++++++++++++++++++++++--------------------------- gpgv.texi | 71 +-- 2 files changed, 788 insertions(+), 627 deletions(-) From cvs at cvs.gnupg.org Fri Oct 1 12:11:43 2004 From: cvs at cvs.gnupg.org (cvs user werner) Date: Fri Oct 1 12:12:14 2004 Subject: gnupg (AUTHORS NEWS README configure.ac) Message-ID: Date: Friday, October 1, 2004 @ 12:11:43 Author: werner Path: /cvs/gnupg/gnupg Modified: AUTHORS NEWS README configure.ac * mk-w32-dist: Updated from stable branch. * mk-gpg-texi: Changed to use the newer docbook2x-texi utility. * config.guess, config.sub, mkinstalldirs, missing * depcomp, install-sh: Upgraded. --------------+ AUTHORS | 3 --- NEWS | 2 +- README | 2 +- configure.ac | 6 +++--- 4 files changed, 5 insertions(+), 8 deletions(-) From cvs at cvs.gnupg.org Fri Oct 1 12:18:31 2004 From: cvs at cvs.gnupg.org (cvs user werner) Date: Fri Oct 1 12:18:37 2004 Subject: gnupg/g10 (ChangeLog gpgv.c) Message-ID: Date: Friday, October 1, 2004 @ 12:18:31 Author: werner Path: /cvs/gnupg/gnupg/g10 Modified: ChangeLog gpgv.c * gpgv.c (i18n_init): Always use LC_ALL. * bftest.c (i18n_init): Always use LC_ALL. * shmtest.c (i18n_init): Ditto. * mpicalc.c (i18n_init): Ditto. -----------+ ChangeLog | 4 ++++ gpgv.c | 7 +------ 2 files changed, 5 insertions(+), 6 deletions(-) From cvs at cvs.gnupg.org Fri Oct 1 12:18:30 2004 From: cvs at cvs.gnupg.org (cvs user werner) Date: Fri Oct 1 12:18:45 2004 Subject: gnupg/tools (ChangeLog bftest.c mpicalc.c shmtest.c) Message-ID: Date: Friday, October 1, 2004 @ 12:18:30 Author: werner Path: /cvs/gnupg/gnupg/tools Modified: ChangeLog bftest.c mpicalc.c shmtest.c * gpgv.c (i18n_init): Always use LC_ALL. * bftest.c (i18n_init): Always use LC_ALL. * shmtest.c (i18n_init): Ditto. * mpicalc.c (i18n_init): Ditto. -----------+ ChangeLog | 6 ++++++ bftest.c | 4 ---- mpicalc.c | 4 ---- shmtest.c | 6 +----- 4 files changed, 7 insertions(+), 13 deletions(-) From cvs at cvs.gnupg.org Fri Oct 1 14:53:08 2004 From: cvs at cvs.gnupg.org (cvs user werner) Date: Fri Oct 1 14:53:17 2004 Subject: GNUPG-1-9-BRANCH gnupg/tools (ChangeLog gpgconf-comp.c gpgconf.c) Message-ID: Date: Friday, October 1, 2004 @ 14:53:08 Author: werner Path: /cvs/gnupg/gnupg/tools Tag: GNUPG-1-9-BRANCH Modified: ChangeLog gpgconf-comp.c gpgconf.c * gpgconf-comp.c (my_dgettext): Also switch codeset and directory for the other used domains (i.e. dirmngr). * gpgconf.c (main): Fixed translation markers. ----------------+ ChangeLog | 7 +++++++ gpgconf-comp.c | 15 +++++++++++---- gpgconf.c | 7 ++++--- 3 files changed, 22 insertions(+), 7 deletions(-) From cvs at cvs.gnupg.org Fri Oct 1 14:53:09 2004 From: cvs at cvs.gnupg.org (cvs user werner) Date: Fri Oct 1 14:53:24 2004 Subject: GNUPG-1-9-BRANCH gnupg/sm (gpgsm.c) Message-ID: Date: Friday, October 1, 2004 @ 14:53:09 Author: werner Path: /cvs/gnupg/gnupg/sm Tag: GNUPG-1-9-BRANCH Modified: gpgsm.c * gpgconf-comp.c (my_dgettext): Also switch codeset and directory for the other used domains (i.e. dirmngr). * gpgconf.c (main): Fixed translation markers. ---------+ gpgsm.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) From cvs at cvs.gnupg.org Fri Oct 1 14:53:11 2004 From: cvs at cvs.gnupg.org (cvs user werner) Date: Fri Oct 1 14:53:35 2004 Subject: GNUPG-1-9-BRANCH gnupg/po (de.po) Message-ID: Date: Friday, October 1, 2004 @ 14:53:11 Author: werner Path: /cvs/gnupg/gnupg/po Tag: GNUPG-1-9-BRANCH Modified: de.po * gpgconf-comp.c (my_dgettext): Also switch codeset and directory for the other used domains (i.e. dirmngr). * gpgconf.c (main): Fixed translation markers. -------+ de.po | 98 ++++++++++++++++++++++++++++++++++------------------------------ 1 files changed, 53 insertions(+), 45 deletions(-) From cvs at cvs.gnupg.org Fri Oct 1 14:54:53 2004 From: cvs at cvs.gnupg.org (cvs user werner) Date: Fri Oct 1 14:54:59 2004 Subject: GNUPG-1-9-BRANCH gnupg (ChangeLog NEWS configure.ac) Message-ID: Date: Friday, October 1, 2004 @ 14:54:53 Author: werner Path: /cvs/gnupg/gnupg Tag: GNUPG-1-9-BRANCH Modified: ChangeLog NEWS configure.ac --------------+ ChangeLog | 4 ++++ NEWS | 2 +- configure.ac | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) From cvs at cvs.gnupg.org Fri Oct 1 14:55:05 2004 From: cvs at cvs.gnupg.org (cvs user werner) Date: Fri Oct 1 14:55:11 2004 Subject: GNUPG-1-9-BRANCH gnupg/po (de.po) Message-ID: Date: Friday, October 1, 2004 @ 14:55:05 Author: werner Path: /cvs/gnupg/gnupg/po Tag: GNUPG-1-9-BRANCH Modified: de.po updated -------+ de.po | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) From cvs at cvs.gnupg.org Fri Oct 1 15:31:47 2004 From: cvs at cvs.gnupg.org (cvs user werner) Date: Fri Oct 1 15:31:54 2004 Subject: GNUPG-1-9-BRANCH gnupg (NEWS configure.ac) Message-ID: Date: Friday, October 1, 2004 @ 15:31:47 Author: werner Path: /cvs/gnupg/gnupg Tag: GNUPG-1-9-BRANCH Modified: NEWS configure.ac post release preparations --------------+ NEWS | 4 ++++ configure.ac | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) From cvs at cvs.gnupg.org Fri Oct 1 15:59:10 2004 From: cvs at cvs.gnupg.org (cvs user werner) Date: Fri Oct 1 15:59:17 2004 Subject: gnupg (NEWS configure.ac) Message-ID: Date: Friday, October 1, 2004 @ 15:59:10 Author: werner Path: /cvs/gnupg/gnupg Modified: NEWS configure.ac post release preparations --------------+ NEWS | 4 ++++ configure.ac | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) From cvs at cvs.gnupg.org Fri Oct 1 18:51:19 2004 From: cvs at cvs.gnupg.org (cvs user werner) Date: Fri Oct 1 18:51:29 2004 Subject: GNUPG-1-9-BRANCH gnupg/tools (ChangeLog gpgconf-comp.c) Message-ID: Date: Friday, October 1, 2004 @ 18:51:19 Author: werner Path: /cvs/gnupg/gnupg/tools Tag: GNUPG-1-9-BRANCH Modified: ChangeLog gpgconf-comp.c Made all strings for --log-file read the same. ----------------+ ChangeLog | 4 ++++ gpgconf-comp.c | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) From cvs at cvs.gnupg.org Sat Oct 2 01:09:33 2004 From: cvs at cvs.gnupg.org (cvs user mo) Date: Sat Oct 2 01:09:40 2004 Subject: GNUPG-1-9-BRANCH-MO gnupg/agent (protect.c) Message-ID: Date: Saturday, October 2, 2004 @ 01:09:33 Author: mo Path: /cvs/gnupg/gnupg/agent Tag: GNUPG-1-9-BRANCH-MO Modified: protect.c Updated from HEAD. -----------+ protect.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) From cvs at cvs.gnupg.org Sat Oct 2 01:09:47 2004 From: cvs at cvs.gnupg.org (cvs user mo) Date: Sat Oct 2 01:09:53 2004 Subject: GNUPG-1-9-BRANCH-MO gnupg/agent (findkey.c) Message-ID: Date: Saturday, October 2, 2004 @ 01:09:47 Author: mo Path: /cvs/gnupg/gnupg/agent Tag: GNUPG-1-9-BRANCH-MO Modified: findkey.c Use xtrymalloc instead of gcry_malloc. -----------+ findkey.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) From cvs at cvs.gnupg.org Sat Oct 2 01:11:43 2004 From: cvs at cvs.gnupg.org (cvs user mo) Date: Sat Oct 2 01:11:55 2004 Subject: GNUPG-1-9-BRANCH-MO gnupg/agent (gpg-agent.c) Message-ID: Date: Saturday, October 2, 2004 @ 01:11:43 Author: mo Path: /cvs/gnupg/gnupg/agent Tag: GNUPG-1-9-BRANCH-MO Modified: gpg-agent.c Use a sane stacksize (had unintenionally commited wrong stack size). -------------+ gpg-agent.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) From cvs at cvs.gnupg.org Sat Oct 2 01:12:40 2004 From: cvs at cvs.gnupg.org (cvs user mo) Date: Sat Oct 2 01:12:45 2004 Subject: GNUPG-1-9-BRANCH-MO gnupg/agent (estream.c) Message-ID: Date: Saturday, October 2, 2004 @ 01:12:40 Author: mo Path: /cvs/gnupg/gnupg/agent Tag: GNUPG-1-9-BRANCH-MO Modified: estream.c Updated from Libestream. -----------+ estream.c | 2 ++ 1 files changed, 2 insertions(+) From cvs at cvs.gnupg.org Sat Oct 2 07:40:51 2004 From: cvs at cvs.gnupg.org (cvs user werner) Date: Sat Oct 2 07:40:57 2004 Subject: libassuan/src (3 files) Message-ID: Date: Saturday, October 2, 2004 @ 07:40:51 Author: werner Path: /cvs/gnupg/libassuan/src Modified: ChangeLog assuan-domain-connect.c assuan-socket-connect.c * assuan-socket-connect.c: Define SUN_LEN, AF_LOCAL and PF_LOCAL if they are not available. * assuan-domain-connect.c: Define PF_LOCAL and AF_LOCAL if needed. -------------------------+ ChangeLog | 6 ++++++ assuan-domain-connect.c | 13 ++++++++++++- assuan-socket-connect.c | 22 +++++++++++++++++++++- 3 files changed, 39 insertions(+), 2 deletions(-) From cvs at cvs.gnupg.org Sat Oct 2 12:42:17 2004 From: cvs at cvs.gnupg.org (cvs user mo) Date: Sat Oct 2 12:42:24 2004 Subject: GNUPG-1-9-BRANCH-MO gnupg/agent (findkey.c) Message-ID: Date: Saturday, October 2, 2004 @ 12:42:17 Author: mo Path: /cvs/gnupg/gnupg/agent Tag: GNUPG-1-9-BRANCH-MO Modified: findkey.c Cleaned up comment handling. -----------+ findkey.c | 17 +++++------------ 1 files changed, 5 insertions(+), 12 deletions(-) From cvs at cvs.gnupg.org Sat Oct 2 12:46:29 2004 From: cvs at cvs.gnupg.org (cvs user mo) Date: Sat Oct 2 12:46:34 2004 Subject: GNUPG-1-9-BRANCH-MO gnupg/agent (command-ssh.c) Message-ID: Date: Saturday, October 2, 2004 @ 12:46:29 Author: mo Path: /cvs/gnupg/gnupg/agent Tag: GNUPG-1-9-BRANCH-MO Modified: command-ssh.c * use x* functions instead of gcry_* memory management function * some cleanups * some fixed memory leaks ---------------+ command-ssh.c | 156 ++++++++++++++++++++++++++++---------------------------- 1 files changed, 78 insertions(+), 78 deletions(-) From cvs at cvs.gnupg.org Mon Oct 4 03:17:27 2004 From: cvs at cvs.gnupg.org (cvs user dshaw) Date: Mon Oct 4 03:17:38 2004 Subject: gnupg/g10 (ChangeLog keyedit.c) Message-ID: Date: Monday, October 4, 2004 @ 03:17:27 Author: dshaw Path: /cvs/gnupg/gnupg/g10 Modified: ChangeLog keyedit.c * keyedit.c (print_and_check_one_sig_colon): Fix bad keyids in colon delsig output. Noted by Peter Palfrader. (show_prefs): Do not reference missing selfsig. Noted by Alex Moroz. -----------+ ChangeLog | 7 +++++++ keyedit.c | 24 ++++++++++++++---------- 2 files changed, 21 insertions(+), 10 deletions(-) From cvs at cvs.gnupg.org Mon Oct 4 13:52:42 2004 From: cvs at cvs.gnupg.org (cvs user werner) Date: Mon Oct 4 13:52:48 2004 Subject: GNUPG-1-9-BRANCH gnupg/po (ChangeLog de.po) Message-ID: Date: Monday, October 4, 2004 @ 13:52:42 Author: werner Path: /cvs/gnupg/gnupg/po Tag: GNUPG-1-9-BRANCH Modified: ChangeLog de.po Typo fixes. -----------+ ChangeLog | 4 ++++ de.po | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) From cvs at cvs.gnupg.org Mon Oct 4 15:21:37 2004 From: cvs at cvs.gnupg.org (cvs user werner) Date: Mon Oct 4 15:21:48 2004 Subject: GNUPG-1-9-BRANCH gnupg/sm (ChangeLog misc.c) Message-ID: Date: Monday, October 4, 2004 @ 15:21:37 Author: werner Path: /cvs/gnupg/gnupg/sm Tag: GNUPG-1-9-BRANCH Modified: ChangeLog misc.c (setup_pinentry_env): Try hard to set a default for GPG_TTY. -----------+ ChangeLog | 4 ++++ misc.c | 17 ++++++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) From cvs at cvs.gnupg.org Mon Oct 4 19:25:29 2004 From: cvs at cvs.gnupg.org (cvs user twoaday) Date: Mon Oct 4 19:25:37 2004 Subject: gnupg/g10 (ChangeLog apdu.c) Message-ID: Date: Monday, October 4, 2004 @ 19:25:29 Author: twoaday Path: /cvs/gnupg/gnupg/g10 Modified: ChangeLog apdu.c 2004-10-03 Timo Schulz * apdu.c (apdu_open_remote_reader) [_WIN32]: Do not set ENOSYS. -----------+ ChangeLog | 4 ++++ apdu.c | 2 ++ 2 files changed, 6 insertions(+) From cvs at cvs.gnupg.org Tue Oct 5 16:33:03 2004 From: cvs at cvs.gnupg.org (cvs user dshaw) Date: Tue Oct 5 16:33:13 2004 Subject: gnupg/g10 (ChangeLog keyedit.c keyserver.c passphrase.c) Message-ID: Date: Tuesday, October 5, 2004 @ 16:33:03 Author: dshaw Path: /cvs/gnupg/gnupg/g10 Modified: ChangeLog keyedit.c keyserver.c passphrase.c * passphrase.c (agent_get_passphrase): Use keystrs for agent strings, and fix sprintf warnings. * keyserver.c (keyserver_spawn): Fix BUG() with certain sets of mixed regular and preferred keyserver refreshes. Noted by Sebastian Wiesinger. * keyedit.c (show_key_with_all_names): Show uid validity in menu. --------------+ ChangeLog | 11 +++++++++++ keyedit.c | 17 ++--------------- keyserver.c | 4 ++++ passphrase.c | 34 ++++++++++++++++++++-------------- 4 files changed, 37 insertions(+), 29 deletions(-) From cvs at cvs.gnupg.org Tue Oct 5 17:08:45 2004 From: cvs at cvs.gnupg.org (cvs user marcus) Date: Tue Oct 5 17:08:54 2004 Subject: gpgme/gpgme (ChangeLog op-support.c) Message-ID: Date: Tuesday, October 5, 2004 @ 17:08:45 Author: marcus Path: /cvs/gnupg/gpgme/gpgme Modified: ChangeLog op-support.c 2004-10-05 Marcus Brinkmann * op-support.c (_gpgme_op_data_lookup): Use char pointer for pointer arithmetic. --------------+ ChangeLog | 5 +++++ op-support.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) From cvs at cvs.gnupg.org Wed Oct 6 15:13:51 2004 From: cvs at cvs.gnupg.org (cvs user werner) Date: Wed Oct 6 15:14:00 2004 Subject: GNUPG-1-9-BRANCH gnupg/scd (ChangeLog ccid-driver.c ccid-driver.h) Message-ID: Date: Wednesday, October 6, 2004 @ 15:13:51 Author: werner Path: /cvs/gnupg/gnupg/scd Tag: GNUPG-1-9-BRANCH Modified: ChangeLog ccid-driver.c ccid-driver.h (ccid_open_reader): Store the vendor ID. (ccid_transceive_secure): New. (parse_ccid_descriptor): Workaround for an SCM reader problem. ---------------+ ChangeLog | 10 + ccid-driver.c | 380 ++++++++++++++++++++++++++++++++++++++++++++++++++++---- ccid-driver.h | 5 3 files changed, 369 insertions(+), 26 deletions(-) From cvs at cvs.gnupg.org Wed Oct 6 21:51:46 2004 From: cvs at cvs.gnupg.org (cvs user dshaw) Date: Wed Oct 6 21:51:55 2004 Subject: gnupg/g10 (5 files) Message-ID: Date: Wednesday, October 6, 2004 @ 21:51:46 Author: dshaw Path: /cvs/gnupg/gnupg/g10 Modified: ChangeLog keyedit.c keylist.c keyserver.c mainproc.c * keyedit.c, keylist.c, keyserver.c, mainproc.c: The revoked/expired/expires string change of 2004-09-29 was too simple. Use two styles for each tag. -------------+ ChangeLog | 6 ++++++ keyedit.c | 18 +++++++++--------- keylist.c | 54 +++++++++++++++++++++++++++++++++++++++++++++--------- keyserver.c | 5 ++++- mainproc.c | 12 ++++++++++-- 5 files changed, 74 insertions(+), 21 deletions(-) From cvs at cvs.gnupg.org Wed Oct 6 22:40:07 2004 From: cvs at cvs.gnupg.org (cvs user dshaw) Date: Wed Oct 6 22:40:16 2004 Subject: gnupg/g10 (ChangeLog keyedit.c) Message-ID: Date: Wednesday, October 6, 2004 @ 22:40:07 Author: dshaw Path: /cvs/gnupg/gnupg/g10 Modified: ChangeLog keyedit.c * keyedit.c (sign_uids, ask_revoke_sig): Improve translatability of user ID prompts. (ask_revoke_sig, menu_revsig): Try and use common strings for these two functions so they don't need to be translated twice. -----------+ ChangeLog | 5 +++++ keyedit.c | 52 ++++++++++++++++++++++++++++------------------------ 2 files changed, 33 insertions(+), 24 deletions(-) From cvs at cvs.gnupg.org Wed Oct 6 23:50:24 2004 From: cvs at cvs.gnupg.org (cvs user dshaw) Date: Wed Oct 6 23:50:34 2004 Subject: gnupg/g10 (5 files) Message-ID: Date: Wednesday, October 6, 2004 @ 23:50:24 Author: dshaw Path: /cvs/gnupg/gnupg/g10 Modified: ChangeLog helptext.c keylist.c passphrase.c pkclist.c * helptext.c, pkclist.c (do_we_trust): It is not possible to get here with a revoked or expired key, so BUG() that case. Remove question about overriding revoked/expired. Also --keyid-format-ify. (do_we_trust_pre): Use print_pubkey_info() instead of printing the info ourselves. * passphrase.c (passphrase_to_dek): Improve translatability of user ID prompts. * keylist.c (print_pubkey_info): Use the user ID the pk was selected by, if any. --------------+ ChangeLog | 13 +++ helptext.c | 4 - keylist.c | 14 ++-- passphrase.c | 10 +- pkclist.c | 193 +++++++++++++++++++-------------------------------------- 5 files changed, 92 insertions(+), 142 deletions(-) From cvs at cvs.gnupg.org Thu Oct 7 23:14:31 2004 From: cvs at cvs.gnupg.org (cvs user dshaw) Date: Thu Oct 7 23:14:37 2004 Subject: gnupg/g10 (ChangeLog mainproc.c pkclist.c) Message-ID: Date: Thursday, October 7, 2004 @ 23:14:31 Author: dshaw Path: /cvs/gnupg/gnupg/g10 Modified: ChangeLog mainproc.c pkclist.c * pkclist.c (build_pk_list): Keystrify. * mainproc.c (check_sig_and_print), pkclist.c (do_edit_ownertrust): Improve translatability of user ID prompts. ------------+ ChangeLog | 7 ++++++ mainproc.c | 63 ++++++++++++++++++++++++++++++++++++++--------------------- pkclist.c | 19 +++++++---------- 3 files changed, 56 insertions(+), 33 deletions(-) From cvs at cvs.gnupg.org Fri Oct 8 13:10:47 2004 From: cvs at cvs.gnupg.org (cvs user mo) Date: Fri Oct 8 13:10:55 2004 Subject: GNUPG-1-9-BRANCH gnupg/sm (ChangeLog certchain.c) Message-ID: Date: Friday, October 8, 2004 @ 13:10:47 Author: mo Path: /cvs/gnupg/gnupg/sm Tag: GNUPG-1-9-BRANCH Modified: ChangeLog certchain.c 2004-10-08 Moritz Schulte * certchain.c (gpgsm_validate_chain): Do not use keydb_new() in case the no_chain_validation-return-short-cut is used (fixes memory leak). -------------+ ChangeLog | 6 ++++++ certchain.c | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) From cvs at cvs.gnupg.org Fri Oct 8 23:54:26 2004 From: cvs at cvs.gnupg.org (cvs user dshaw) Date: Fri Oct 8 23:54:32 2004 Subject: gnupg/g10 (ChangeLog encr-data.c) Message-ID: Date: Friday, October 8, 2004 @ 23:54:26 Author: dshaw Path: /cvs/gnupg/gnupg/g10 Modified: ChangeLog encr-data.c * encr-data.c (decrypt_data): Give a warning with a weak key, but still allow to decrypt the message. -------------+ ChangeLog | 5 +++++ encr-data.c | 15 ++++++++++----- 2 files changed, 15 insertions(+), 5 deletions(-) From cvs at cvs.gnupg.org Sun Oct 10 15:13:47 2004 From: cvs at cvs.gnupg.org (cvs user dshaw) Date: Sun Oct 10 15:13:54 2004 Subject: gnupg/g10 (ChangeLog keygen.c) Message-ID: Date: Sunday, October 10, 2004 @ 15:13:47 Author: dshaw Path: /cvs/gnupg/gnupg/g10 Modified: ChangeLog keygen.c * keygen.c (generate_keypair): Fix generating keys with the auth flag. -----------+ ChangeLog | 5 +++++ keygen.c | 7 ++++--- 2 files changed, 9 insertions(+), 3 deletions(-) From cvs at cvs.gnupg.org Sun Oct 10 16:19:40 2004 From: cvs at cvs.gnupg.org (cvs user dshaw) Date: Sun Oct 10 16:19:47 2004 Subject: gnupg/g10 (ChangeLog keygen.c) Message-ID: Date: Sunday, October 10, 2004 @ 16:19:40 Author: dshaw Path: /cvs/gnupg/gnupg/g10 Modified: ChangeLog keygen.c * keygen.c (do_add_key_flags): The spec says that all primary keys MUST be able to certify. Force the certify flag on for primaries (and off for subkeys). -----------+ ChangeLog | 4 ++++ keygen.c | 12 ++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) From cvs at cvs.gnupg.org Sun Oct 10 16:33:37 2004 From: cvs at cvs.gnupg.org (cvs user dshaw) Date: Sun Oct 10 16:33:43 2004 Subject: gnupg/g10 (ChangeLog keygen.c) Message-ID: Date: Sunday, October 10, 2004 @ 16:33:37 Author: dshaw Path: /cvs/gnupg/gnupg/g10 Modified: ChangeLog keygen.c * keygen.c (ask_key_flags): New. (ask_algo): Call it here in --expert mode so we don't need to specify each possible variation of RSA capabilities. -----------+ ChangeLog | 4 + keygen.c | 127 +++++++++++++++++++++++++++++++++++++++++++++--------------- 2 files changed, 101 insertions(+), 30 deletions(-) From cvs at cvs.gnupg.org Sun Oct 10 17:27:14 2004 From: cvs at cvs.gnupg.org (cvs user dshaw) Date: Sun Oct 10 17:27:29 2004 Subject: gnupg/g10 (9 files) Message-ID: Date: Sunday, October 10, 2004 @ 17:27:14 Author: dshaw Path: /cvs/gnupg/gnupg/g10 Modified: ChangeLog card-util.c delkey.c keyedit.c keygen.c openfile.c photoid.c pkclist.c revoke.c * card-util.c, keyedit.c, openfile.c, pkclist.c, delkey.c, keygen.c, photoid.c, revoke.c: Some yes-or-no prompts end in "(y/n)". Some don't. Consistently use y/n everywhere. -------------+ ChangeLog | 4 +++ card-util.c | 18 +++++++++++++--- delkey.c | 4 +-- keyedit.c | 64 ++++++++++++++++++++++++++++++---------------------------- keygen.c | 11 +++++---- openfile.c | 2 - photoid.c | 2 - pkclist.c | 4 +-- revoke.c | 9 ++++---- 9 files changed, 70 insertions(+), 48 deletions(-) From cvs at cvs.gnupg.org Mon Oct 11 10:44:34 2004 From: cvs at cvs.gnupg.org (cvs user werner) Date: Mon Oct 11 10:44:40 2004 Subject: gnupg/keyserver (ChangeLog Makefile.am gpgkeys_finger) Message-ID: Date: Monday, October 11, 2004 @ 10:44:34 Author: werner Path: /cvs/gnupg/gnupg/keyserver Added: gpgkeys_finger Modified: ChangeLog Makefile.am * configure.ac: New option --disable-finger. * keyserver.c (keyserver_spawn): Print an empty string in log_info if the host is not set (e.g. finger). * gpgkeys_finger.c: New. ----------------+ ChangeLog | 4 ++++ Makefile.am | 5 +++-- gpgkeys_finger | 0 3 files changed, 7 insertions(+), 2 deletions(-) From cvs at cvs.gnupg.org Mon Oct 11 10:44:35 2004 From: cvs at cvs.gnupg.org (cvs user werner) Date: Mon Oct 11 10:44:50 2004 Subject: gnupg/g10 (5 files) Message-ID: Date: Monday, October 11, 2004 @ 10:44:35 Author: werner Path: /cvs/gnupg/gnupg/g10 Modified: ChangeLog ccid-driver.c ccid-driver.h iso7816.h keyserver.c * configure.ac: New option --disable-finger. * keyserver.c (keyserver_spawn): Print an empty string in log_info if the host is not set (e.g. finger). * gpgkeys_finger.c: New. ---------------+ ChangeLog | 12 + ccid-driver.c | 380 ++++++++++++++++++++++++++++++++++++++++++++++++++++---- ccid-driver.h | 5 iso7816.h | 2 keyserver.c | 6 5 files changed, 376 insertions(+), 29 deletions(-) From cvs at cvs.gnupg.org Mon Oct 11 10:44:35 2004 From: cvs at cvs.gnupg.org (cvs user werner) Date: Mon Oct 11 10:44:59 2004 Subject: gnupg (ChangeLog configure.ac) Message-ID: Date: Monday, October 11, 2004 @ 10:44:35 Author: werner Path: /cvs/gnupg/gnupg Modified: ChangeLog configure.ac * configure.ac: New option --disable-finger. * keyserver.c (keyserver_spawn): Print an empty string in log_info if the host is not set (e.g. finger). * gpgkeys_finger.c: New. --------------+ ChangeLog | 4 ++++ configure.ac | 13 ++++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) From cvs at cvs.gnupg.org Mon Oct 11 14:45:50 2004 From: cvs at cvs.gnupg.org (cvs user werner) Date: Mon Oct 11 14:45:56 2004 Subject: gnupg/keyserver (gpgkeys_finger gpgkeys_finger.c) Message-ID: Date: Monday, October 11, 2004 @ 14:45:50 Author: werner Path: /cvs/gnupg/gnupg/keyserver Added: gpgkeys_finger.c Removed: gpgkeys_finger Oops commited binary instead of source. ------------------+ gpgkeys_finger | 0 gpgkeys_finger.c | 550 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 550 insertions(+) From cvs at cvs.gnupg.org Mon Oct 11 22:33:22 2004 From: cvs at cvs.gnupg.org (cvs user dshaw) Date: Mon Oct 11 22:33:29 2004 Subject: gnupg/keyserver (5 files) Message-ID: Date: Monday, October 11, 2004 @ 22:33:22 Author: dshaw Path: /cvs/gnupg/gnupg/keyserver Modified: ChangeLog gpgkeys_finger.c gpgkeys_hkp.c gpgkeys_http.c gpgkeys_ldap.c * gpgkeys_finger.c, gpgkeys_hkp.c, gpgkeys_http.c, gpgkeys_ldap.c: Fix a few occurances of "filename" to `filename'. ------------------+ ChangeLog | 5 +++++ gpgkeys_finger.c | 4 ++-- gpgkeys_hkp.c | 14 +++++++------- gpgkeys_http.c | 4 ++-- gpgkeys_ldap.c | 4 ++-- 5 files changed, 18 insertions(+), 13 deletions(-) From cvs at cvs.gnupg.org Mon Oct 11 23:08:37 2004 From: cvs at cvs.gnupg.org (cvs user dshaw) Date: Mon Oct 11 23:08:43 2004 Subject: gnupg/g10 (8 files) Message-ID: Date: Monday, October 11, 2004 @ 23:08:37 Author: dshaw Path: /cvs/gnupg/gnupg/g10 Modified: ChangeLog card-util.c g10.c keyserver.c mainproc.c photoid.c pkclist.c trustdb.c * pkclist.c (do_edit_ownertrust): Use the same translated string for showing the user ID as mainproc.c:print_pkenc_list. * mainproc.c (print_pkenc_list): Allow translating the quotes around the user ID. * card-util.c, g10.c, photoid.c, trustdb.c: The last of the \"%s\" -> `%s' quoting for things that aren't user IDs. * keyserver.c (keyserver_spawn): If there is no keyserver host, print the whole URI since it is self-contained. -------------+ ChangeLog | 14 ++++++++++++++ card-util.c | 2 +- g10.c | 8 ++++---- keyserver.c | 29 +++++++++++++++++++++-------- mainproc.c | 9 +++------ photoid.c | 4 ++-- pkclist.c | 4 ++-- trustdb.c | 8 ++++---- 8 files changed, 51 insertions(+), 27 deletions(-) From cvs at cvs.gnupg.org Tue Oct 12 09:36:38 2004 From: cvs at cvs.gnupg.org (cvs user werner) Date: Tue Oct 12 09:36:48 2004 Subject: libgcrypt/tests (ChangeLog pkbench.c) Message-ID: Date: Tuesday, October 12, 2004 @ 09:36:38 Author: werner Path: /cvs/gnupg/libgcrypt/tests Modified: ChangeLog pkbench.c Beautified ;-) -----------+ ChangeLog | 4 ++++ pkbench.c | 38 +++++++++++++++++++------------------- 2 files changed, 23 insertions(+), 19 deletions(-) From cvs at cvs.gnupg.org Tue Oct 12 09:46:15 2004 From: cvs at cvs.gnupg.org (cvs user wk) Date: Tue Oct 12 09:46:25 2004 Subject: libgcrypt/src (ChangeLog secmem.c secmem.h sexp.c) Message-ID: Date: Tuesday, October 12, 2004 @ 10:55:42 Author: wk Path: /cvs/libgcrypt/libgcrypt/src Modified: ChangeLog secmem.c secmem.h sexp.c * sexp.c (sexp_sscan): Removed C++ style comments. Noted by Yoann Vandoorselaere. * secmem.h (_gcry_secmem_set_flags,_gcry_secmem_get_flags): Removed __pure__. (GCRY_SECMEM_FLAG_NO_WARNING): Put macro value into parens. -----------+ ChangeLog | 13 +++++++++++++ secmem.c | 2 +- secmem.h | 8 ++++---- sexp.c | 2 -- 4 files changed, 18 insertions(+), 7 deletions(-) Index: libgcrypt/src/ChangeLog diff -u libgcrypt/src/ChangeLog:1.156 libgcrypt/src/ChangeLog:1.157 --- libgcrypt/src/ChangeLog:1.156 Mon Aug 23 15:34:51 2004 +++ libgcrypt/src/ChangeLog Tue Oct 12 10:55:42 2004 @@ -1,3 +1,8 @@ +2004-09-21 Werner Koch + + * sexp.c (sexp_sscan): Removed C++ style comments. Noted by Yoann + Vandoorselaere. + 2004-08-23 Moritz Schulte * global.c: Do not include . @@ -10,6 +15,14 @@ * secmem.c (_gcry_secmem_init): Try to lock pool into core not only when running with root privileges. +2004-08-16 Werner Koch + + * secmem.h (_gcry_secmem_set_flags,_gcry_secmem_get_flags): + Removed __pure__. + (GCRY_SECMEM_FLAG_NO_WARNING): Put macro value into parens. + + * secmem.c (_gcry_secmem_init): Defer printing of the warning. + 2004-08-10 Moritz Schulte * gcrypt.h: Include , thanks to Simon Josefsson. Index: libgcrypt/src/secmem.c diff -u libgcrypt/src/secmem.c:1.24 libgcrypt/src/secmem.c:1.25 --- libgcrypt/src/secmem.c:1.24 Sun Aug 22 10:49:31 2004 +++ libgcrypt/src/secmem.c Tue Oct 12 10:55:42 2004 @@ -453,7 +453,7 @@ { if (n < DEFAULT_POOL_SIZE) n = DEFAULT_POOL_SIZE; - if (! pool_okay) + if (!pool_okay) { init_pool (n); lock_pool (pool, n); Index: libgcrypt/src/secmem.h diff -u libgcrypt/src/secmem.h:1.8 libgcrypt/src/secmem.h:1.9 --- libgcrypt/src/secmem.h:1.8 Mon Jun 9 15:47:04 2003 +++ libgcrypt/src/secmem.h Tue Oct 12 10:55:42 2004 @@ -28,11 +28,11 @@ void _gcry_secmem_free (void *a); void _gcry_secmem_dump_stats (void); void _gcry_secmem_set_flags (unsigned flags); -unsigned _gcry_secmem_get_flags(void) GCC_ATTR_PURE; -int _gcry_private_is_secure (const void *p) GCC_ATTR_PURE; +unsigned _gcry_secmem_get_flags(void); +int _gcry_private_is_secure (const void *p); /* Flags for _gcry_secmem_{set,get}_flags. */ -#define GCRY_SECMEM_FLAG_NO_WARNING 1 << 0 -#define GCRY_SECMEM_FLAG_SUSPEND_WARNING 1 << 1 +#define GCRY_SECMEM_FLAG_NO_WARNING (1 << 0) +#define GCRY_SECMEM_FLAG_SUSPEND_WARNING (1 << 1) #endif /* G10_SECMEM_H */ Index: libgcrypt/src/sexp.c diff -u libgcrypt/src/sexp.c:1.41 libgcrypt/src/sexp.c:1.42 --- libgcrypt/src/sexp.c:1.41 Mon Aug 23 15:34:51 2004 +++ libgcrypt/src/sexp.c Tue Oct 12 10:55:42 2004 @@ -972,7 +972,6 @@ *erroff = p - buffer; /* Invalid octal value. */ err = GPG_ERR_SEXP_BAD_QUOTATION; - //return gcry_error (GPG_ERR_SEXP_BAD_QUOTATION); } p += 2; n -= 2; @@ -985,7 +984,6 @@ *erroff = p - buffer; /* Invalid hex value. */ err = GPG_ERR_SEXP_BAD_QUOTATION; - //return gcry_error (GPG_ERR_SEXP_BAD_QUOTATION); } p += 2; n -= 2; From cvs at cvs.gnupg.org Tue Oct 12 11:04:24 2004 From: cvs at cvs.gnupg.org (cvs user wk) Date: Tue Oct 12 11:04:36 2004 Subject: libgcrypt/doc (gcrypt.texi) Message-ID: Date: Tuesday, October 12, 2004 @ 12:13:53 Author: wk Path: /cvs/libgcrypt/libgcrypt/doc Modified: gcrypt.texi Did some spell checking -------------+ gcrypt.texi | 34 +++++++++++++++++----------------- 1 files changed, 17 insertions(+), 17 deletions(-) Index: libgcrypt/doc/gcrypt.texi diff -u libgcrypt/doc/gcrypt.texi:1.42 libgcrypt/doc/gcrypt.texi:1.43 --- libgcrypt/doc/gcrypt.texi:1.42 Tue Aug 24 22:22:46 2004 +++ libgcrypt/doc/gcrypt.texi Tue Oct 12 12:13:53 2004 @@ -88,7 +88,7 @@ * Preparation:: What you should do before using the library. * Generalities:: General library functions and data types. * Handler Functions:: Working with handler functions. -* Symmetric cryptography:: How to use symmetric crytography. +* Symmetric cryptography:: How to use symmetric cryptography. * Hashing:: How to use hashing. * Public Key cryptography (I):: How to use public key cryptography. * Public Key cryptography (II):: How to use public key cryptography, alternatively. @@ -120,12 +120,12 @@ Preparation * Header:: What header file you need to include. * Building sources:: How to build sources using the library. -* Building sources using Automake:: How to build sources with the help auf Automake. +* Building sources using Automake:: How to build sources with the help of Automake. * Initializing the library:: How to initialize the library. * Multi Threading:: How @acronym{Libgcrypt} can be used in a MT environment. Generalities -* Controlling the library:: Controlling @acronym{Libgcrypt}'s behaviour. +* Controlling the library:: Controlling @acronym{Libgcrypt}'s behavior. * Modules:: Description of extension modules. * Error Handling:: Error codes and such. @@ -253,7 +253,7 @@ cryptographic functions that modify a certain context stored in handles. If the user really intents to use such functions from different threads on the same handle, he has to take care of the -serialisation of such functions himself. If not described otherwise, +serialization of such functions himself. If not described otherwise, every function is thread-safe. @acronym{Libgcrypt} depends on the library `libgpg-error', which @@ -274,7 +274,7 @@ @menu * Header:: What header file you need to include. * Building sources:: How to build sources using the library. -* Building sources using Automake:: How to build sources with the help auf Automake. +* Building sources using Automake:: How to build sources with the help of Automake. * Initializing the library:: How to initialize the library. * Multi Threading:: How @acronym{Libgcrypt} can be used in a MT environment. @end menu @@ -419,20 +419,20 @@ instead. Here are some tips what to do if you are writing a library: If your library requires a certain thread package, just initialize -gcrypt to use this thread package. If your library supports multiple +Libgcrypt to use this thread package. If your library supports multiple thread packages, but needs to be configured, you will have to implement a way to determine which thread package the application -wants to use with your library anyway. Then configure gcrypt to use +wants to use with your library anyway. Then configure Libgcrypt to use this thread package. If your library is fully reentrant without any special support by a thread package, then you are lucky indeed. Unfortunately, this does not relieve you from doing either of the two above, or use a third -option. The third option is to let the application initialize gcrypt -for you. Then you are not using gcrypt transparently, though. +option. The third option is to let the application initialize Libgcrypt +for you. Then you are not using Libgcrypt transparently, though. As if this was not difficult enough, a conflict may arise if two -libraries try to initialize gcrypt independently of each others, and +libraries try to initialize Libgcrypt independently of each others, and both such libraries are then linked into the same application. To make it a bit simpler for you, this will probably work, but only if both libraries have the same requirement for the thread package. This @@ -481,7 +481,7 @@ @item GCRY_THREAD_OPTION_PTHREAD_IMPL -This maco defines the following (static) symbols: +This macro defines the following (static) symbols: gcry_pthread_mutex_init, gcry_pthread_mutex_destroy, gcry_mutex_lock, gcry_mutex_unlock, gcry_threads_pthread. @@ -501,7 +501,7 @@ @chapter Generalities @menu -* Controlling the library:: Controlling @acronym{Libgcrypt}'s behaviour. +* Controlling the library:: Controlling @acronym{Libgcrypt}'s behavior. * Modules:: Description of extension modules. * Error Handling:: Error codes and such. @end menu @@ -511,7 +511,7 @@ @deftypefun gcry_error_t gcry_control (enum gcry_ctl_cmds @var{cmd}, ...) -This function can be used to influence the general behaviour of +This function can be used to influence the general behavior of @acronym{Libgcrypt} in several ways. Depending on @var{cmd}, more arguments can or have to be provided. @@ -532,7 +532,7 @@ specification structure' as input and return a value of @code{gcry_module_t} and an ID that is unique in the modules' category. This ID can be used to reference the newly registered -module. After registering a module successfuly, the new functionality +module. After registering a module successfully, the new functionality should be able to be used through the normal functions provided by @acronym{Libgcrypt} until it is unregistered again. @@ -580,7 +580,7 @@ Some error values do not indicate a system error or an error in the operation, but the result of an operation that failed properly. -GnuPG components, including libgcrypt, use an extra library named +GnuPG components, including Libgcrypt, use an extra library named libgpg-error to provide a common error handling scheme. For more information on libgpg-error, see the according manual. @@ -631,7 +631,7 @@ the error value are set to 0, too. Note that in @acronym{Libgcrypt}, the error source is used purely for -diagnostical purposes. Only the error code should be checked to test +diagnostic purposes. Only the error code should be checked to test for a certain outcome of a function. The manual only documents the error code part of an error value. The error source is left unspecified and might be anything. @@ -677,7 +677,7 @@ error numbers it knows about. If @var{err} is an unknown error number, the error code @code{GPG_ERR_UNKNOWN_ERRNO} is used. The following functions can be used to construct error values from system -errnor numbers. +errno numbers. @deftypefun {gcry_error_t} gcry_err_make_from_errno (@w{gcry_err_source_t @var{source}}, @w{int @var{err}}) The function @code{gcry_err_make_from_errno} is like From cvs at cvs.gnupg.org Tue Oct 12 18:41:18 2004 From: cvs at cvs.gnupg.org (cvs user werner) Date: Tue Oct 12 18:41:31 2004 Subject: gnupg/g10 (ChangeLog keygen.c) Message-ID: Date: Tuesday, October 12, 2004 @ 18:41:18 Author: werner Path: /cvs/gnupg/gnupg/g10 Modified: ChangeLog keygen.c (read_parameter_file): Changed to use iobuf based file reading to allow the special file name feature to work. -----------+ ChangeLog | 5 +++++ keygen.c | 37 +++++++++++++++++++------------------ 2 files changed, 24 insertions(+), 18 deletions(-) From cvs at cvs.gnupg.org Tue Oct 12 19:35:50 2004 From: cvs at cvs.gnupg.org (cvs user dshaw) Date: Tue Oct 12 19:35:56 2004 Subject: gnupg/cipher (9 files) Message-ID: Date: Tuesday, October 12, 2004 @ 19:35:50 Author: dshaw Path: /cvs/gnupg/gnupg/cipher Modified: ChangeLog algorithms.h blowfish.c cast5.c cipher.c des.c idea-stub.c rijndael.c twofish.c * algorithms.h, cast5.c, cipher.c, idea-stub.c, twofish.c, blowfish.c, des.c, rijndael.c: Consistently use const for input buffers. --------------+ ChangeLog | 6 ++++++ algorithms.h | 52 +++++++++++++++++++++++++--------------------------- blowfish.c | 38 ++++++++++++++++---------------------- cast5.c | 39 +++++++++++++++------------------------ cipher.c | 15 ++++++--------- des.c | 27 ++++++++++++--------------- idea-stub.c | 16 ++++++++-------- rijndael.c | 27 ++++++++++++--------------- twofish.c | 27 ++++++++++++--------------- 9 files changed, 112 insertions(+), 135 deletions(-) From cvs at cvs.gnupg.org Wed Oct 13 09:10:51 2004 From: cvs at cvs.gnupg.org (cvs user werner) Date: Wed Oct 13 09:10:58 2004 Subject: gnupg/g10 (ChangeLog keygen.c status.c status.h) Message-ID: Date: Wednesday, October 13, 2004 @ 09:10:51 Author: werner Path: /cvs/gnupg/gnupg/g10 Modified: ChangeLog keygen.c status.c status.h * keygen.c (read_parameter_file): New keyword "Handle". This is bug 287. (print_status_key_not_created): New. (print_status_key_created): Add new arg HANDLE. (do_generate_keypair): Print not created status. * status.c, tatus.h (STATUS_KEY_NOT_CREATED): New. -----------+ ChangeLog | 7 +++++ keygen.c | 84 ++++++++++++++++++++++++++++++++++++++++++------------------ status.c | 1 status.h | 1 4 files changed, 68 insertions(+), 25 deletions(-) From cvs at cvs.gnupg.org Wed Oct 13 09:10:51 2004 From: cvs at cvs.gnupg.org (cvs user werner) Date: Wed Oct 13 09:11:05 2004 Subject: gnupg/doc (DETAILS) Message-ID: Date: Wednesday, October 13, 2004 @ 09:10:51 Author: werner Path: /cvs/gnupg/gnupg/doc Modified: DETAILS * keygen.c (read_parameter_file): New keyword "Handle". This is bug 287. (print_status_key_not_created): New. (print_status_key_created): Add new arg HANDLE. (do_generate_keypair): Print not created status. * status.c, tatus.h (STATUS_KEY_NOT_CREATED): New. ---------+ DETAILS | 19 ++++++++++++++++--- 1 files changed, 16 insertions(+), 3 deletions(-) From cvs at cvs.gnupg.org Wed Oct 13 09:11:10 2004 From: cvs at cvs.gnupg.org (cvs user werner) Date: Wed Oct 13 09:11:17 2004 Subject: gnupg/mpi (ChangeLog Makefile.am) Message-ID: Date: Wednesday, October 13, 2004 @ 09:11:10 Author: werner Path: /cvs/gnupg/gnupg/mpi Modified: ChangeLog Makefile.am * Makefile.am (.S.o): Include MPI_SFLAGS. This is our bug 145. -------------+ ChangeLog | 4 ++++ Makefile.am | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) From cvs at cvs.gnupg.org Wed Oct 13 11:59:43 2004 From: cvs at cvs.gnupg.org (cvs user werner) Date: Wed Oct 13 11:59:55 2004 Subject: gnupg/util (ChangeLog fileutil.c iobuf.c) Message-ID: Date: Wednesday, October 13, 2004 @ 11:59:43 Author: werner Path: /cvs/gnupg/gnupg/util Modified: ChangeLog fileutil.c iobuf.c * configure.ac: Actually name the option --disable-finger and not http. * openfile.c (overwrite_filep, make_outfile_name, open_outfile) (open_sigfile): Use iobuf_is_pipe_filename to check for pipes so that special filesnames are taken into account. This is bug 327. * tdbdump.c (import_ownertrust): Ditto. * sign.c (write_plaintext_packet): Ditto. * progress.c (handle_progress): Ditto. * plaintext.c (handle_plaintext): Ditto. * encode.c (encode_simple, encode_crypt): Ditto. * iobuf.c (iobuf_is_pipe_filename): New. * fileutil.c (is_file_compressed): Use it here. ------------+ ChangeLog | 5 +++++ fileutil.c | 2 +- iobuf.c | 10 ++++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) From cvs at cvs.gnupg.org Wed Oct 13 11:59:44 2004 From: cvs at cvs.gnupg.org (cvs user werner) Date: Wed Oct 13 12:00:02 2004 Subject: gnupg/include (iobuf.h) Message-ID: Date: Wednesday, October 13, 2004 @ 11:59:44 Author: werner Path: /cvs/gnupg/gnupg/include Modified: iobuf.h * configure.ac: Actually name the option --disable-finger and not http. * openfile.c (overwrite_filep, make_outfile_name, open_outfile) (open_sigfile): Use iobuf_is_pipe_filename to check for pipes so that special filesnames are taken into account. This is bug 327. * tdbdump.c (import_ownertrust): Ditto. * sign.c (write_plaintext_packet): Ditto. * progress.c (handle_progress): Ditto. * plaintext.c (handle_plaintext): Ditto. * encode.c (encode_simple, encode_crypt): Ditto. * iobuf.c (iobuf_is_pipe_filename): New. * fileutil.c (is_file_compressed): Use it here. ---------+ iobuf.h | 1 + 1 files changed, 1 insertion(+) From cvs at cvs.gnupg.org Wed Oct 13 11:59:44 2004 From: cvs at cvs.gnupg.org (cvs user werner) Date: Wed Oct 13 12:00:11 2004 Subject: gnupg/g10 (7 files) Message-ID: Date: Wednesday, October 13, 2004 @ 11:59:44 Author: werner Path: /cvs/gnupg/gnupg/g10 Modified: ChangeLog encode.c openfile.c plaintext.c progress.c sign.c tdbdump.c * configure.ac: Actually name the option --disable-finger and not http. * openfile.c (overwrite_filep, make_outfile_name, open_outfile) (open_sigfile): Use iobuf_is_pipe_filename to check for pipes so that special filesnames are taken into account. This is bug 327. * tdbdump.c (import_ownertrust): Ditto. * sign.c (write_plaintext_packet): Ditto. * progress.c (handle_progress): Ditto. * plaintext.c (handle_plaintext): Ditto. * encode.c (encode_simple, encode_crypt): Ditto. * iobuf.c (iobuf_is_pipe_filename): New. * fileutil.c (is_file_compressed): Use it here. -------------+ ChangeLog | 11 +++++++++++ encode.c | 6 +++--- openfile.c | 10 +++++----- plaintext.c | 4 ++-- progress.c | 2 +- sign.c | 2 +- tdbdump.c | 2 +- 7 files changed, 24 insertions(+), 13 deletions(-) From cvs at cvs.gnupg.org Wed Oct 13 11:59:46 2004 From: cvs at cvs.gnupg.org (cvs user werner) Date: Wed Oct 13 12:00:19 2004 Subject: gnupg (ChangeLog TODO configure.ac) Message-ID: Date: Wednesday, October 13, 2004 @ 11:59:46 Author: werner Path: /cvs/gnupg/gnupg Modified: ChangeLog TODO configure.ac * configure.ac: Actually name the option --disable-finger and not http. * openfile.c (overwrite_filep, make_outfile_name, open_outfile) (open_sigfile): Use iobuf_is_pipe_filename to check for pipes so that special filesnames are taken into account. This is bug 327. * tdbdump.c (import_ownertrust): Ditto. * sign.c (write_plaintext_packet): Ditto. * progress.c (handle_progress): Ditto. * plaintext.c (handle_plaintext): Ditto. * encode.c (encode_simple, encode_crypt): Ditto. * iobuf.c (iobuf_is_pipe_filename): New. * fileutil.c (is_file_compressed): Use it here. --------------+ ChangeLog | 5 +++++ TODO | 17 +++++------------ configure.ac | 4 ++-- 3 files changed, 12 insertions(+), 14 deletions(-) From cvs at cvs.gnupg.org Wed Oct 13 17:34:52 2004 From: cvs at cvs.gnupg.org (cvs user dshaw) Date: Wed Oct 13 17:34:59 2004 Subject: gnupg/g10 (6 files) Message-ID: Date: Wednesday, October 13, 2004 @ 17:34:52 Author: dshaw Path: /cvs/gnupg/gnupg/g10 Modified: ChangeLog g10.c keyedit.c options.h pkclist.c trustdb.c * pkclist.c (do_edit_ownertrust): Different prompt when we're using direct trust since the meaning is different. * keyedit.c (trustsig_prompt): Change the strings to match the ones in pkclist.c:do_edit_ownertrust to make translation easier. * trustdb.c (trust_model_string, get_validity): Add direct trust model which applies to the key as a whole and not per-uid. * options.h, g10.c (parse_trust_model): New. (main): Call it from here to do string-to-trust-model. -----------+ ChangeLog | 14 ++++++++++++++ g10.c | 27 +++++++++++++++++---------- keyedit.c | 13 ++++++------- options.h | 2 +- pkclist.c | 40 ++++++++++++++++++++++++++-------------- trustdb.c | 9 +++++++++ 6 files changed, 73 insertions(+), 32 deletions(-) From cvs at cvs.gnupg.org Wed Oct 13 20:08:39 2004 From: cvs at cvs.gnupg.org (cvs user werner) Date: Wed Oct 13 20:08:44 2004 Subject: gnupg/util (ChangeLog iobuf.c logger.c) Message-ID: Date: Wednesday, October 13, 2004 @ 20:08:38 Author: werner Path: /cvs/gnupg/gnupg/util Modified: ChangeLog iobuf.c logger.c * configure.ac: Actually name the option --disable-finger and not http. Add option --enable-selinux-support. * logger.c (g10_log_error_f, g10_log_fatal_f, g10_log_info_f) (g10_log_debug_f, print_prefix_f): Removed. * iobuf.c (iobuf_is_pipe_filename): New. (iobuf_get_fd): New. -----------+ ChangeLog | 5 ++++ iobuf.c | 22 ++++++++++++++++++ logger.c | 70 ------------------------------------------------------------ 3 files changed, 27 insertions(+), 70 deletions(-) From cvs at cvs.gnupg.org Wed Oct 13 20:08:39 2004 From: cvs at cvs.gnupg.org (cvs user werner) Date: Wed Oct 13 20:08:53 2004 Subject: gnupg (ChangeLog NEWS THANKS configure.ac) Message-ID: Date: Wednesday, October 13, 2004 @ 20:08:39 Author: werner Path: /cvs/gnupg/gnupg Modified: ChangeLog NEWS THANKS configure.ac * configure.ac: Actually name the option --disable-finger and not http. Add option --enable-selinux-support. * logger.c (g10_log_error_f, g10_log_fatal_f, g10_log_info_f) (g10_log_debug_f, print_prefix_f): Removed. * iobuf.c (iobuf_is_pipe_filename): New. (iobuf_get_fd): New. --------------+ ChangeLog | 2 +- NEWS | 4 ++++ THANKS | 1 + configure.ac | 15 +++++++++++++-- 4 files changed, 19 insertions(+), 3 deletions(-) From cvs at cvs.gnupg.org Wed Oct 13 20:09:10 2004 From: cvs at cvs.gnupg.org (cvs user werner) Date: Wed Oct 13 20:09:16 2004 Subject: gnupg/po (ChangeLog POTFILES.in) Message-ID: Date: Wednesday, October 13, 2004 @ 20:09:10 Author: werner Path: /cvs/gnupg/gnupg/po Modified: ChangeLog POTFILES.in Add dearmor.c -------------+ ChangeLog | 4 ++++ POTFILES.in | 1 + 2 files changed, 5 insertions(+) From cvs at cvs.gnupg.org Wed Oct 13 20:10:06 2004 From: cvs at cvs.gnupg.org (cvs user werner) Date: Wed Oct 13 20:10:12 2004 Subject: gnupg/include (iobuf.h util.h) Message-ID: Date: Wednesday, October 13, 2004 @ 20:10:06 Author: werner Path: /cvs/gnupg/gnupg/include Modified: iobuf.h util.h Added SELInux hacks and did some cleanups. ---------+ iobuf.h | 1 + util.h | 16 ---------------- 2 files changed, 1 insertion(+), 16 deletions(-) From cvs at cvs.gnupg.org Wed Oct 13 20:10:06 2004 From: cvs at cvs.gnupg.org (cvs user werner) Date: Wed Oct 13 20:10:24 2004 Subject: gnupg/g10 (20 files) Message-ID: Date: Wednesday, October 13, 2004 @ 20:10:06 Author: werner Path: /cvs/gnupg/gnupg/g10 Modified: ChangeLog card-util.c dearmor.c decrypt.c encode.c exec.c g10.c import.c keydb.c keygen.c keyring.c main.h misc.c openfile.c photoid.c plaintext.c sign.c tdbdump.c tdbio.c verify.c Added SELInux hacks and did some cleanups. -------------+ ChangeLog | 28 ++++++++++++++ card-util.c | 11 ++++- dearmor.c | 26 ++++++++++--- decrypt.c | 12 ++++++ encode.c | 32 +++++++++++----- exec.c | 13 ++++++ g10.c | 55 +++++++++++++++++++++++----- import.c | 6 +++ keydb.c | 2 - keygen.c | 6 +++ keyring.c | 23 ++++++++++- main.h | 3 + misc.c | 112 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ openfile.c | 12 ++++++ photoid.c | 8 +++- plaintext.c | 12 ++++++ sign.c | 41 +++++++++++++++++---- tdbdump.c | 26 +++++++++---- tdbio.c | 1 verify.c | 12 ++++++ 20 files changed, 395 insertions(+), 46 deletions(-) From cvs at cvs.gnupg.org Wed Oct 13 20:30:29 2004 From: cvs at cvs.gnupg.org (cvs user dshaw) Date: Wed Oct 13 20:30:36 2004 Subject: gnupg/keyserver (8 files) Message-ID: Date: Wednesday, October 13, 2004 @ 20:30:29 Author: dshaw Path: /cvs/gnupg/gnupg/keyserver Added: ksutil.c ksutil.h Modified: ChangeLog Makefile.am gpgkeys_finger.c gpgkeys_hkp.c gpgkeys_http.c gpgkeys_ldap.c * gpgkeys_ldap.c (main), gpgkeys_hkp.c (main), gpgkeys_http.c (main), gpgkeys_finger.c (main): Call timeout functions before performing an action that could block for a long time. * ksutil.h, ksutil.c: New. Right now just contains timeout functions. ------------------+ ChangeLog | 9 +++++++ Makefile.am | 5 ++++ gpgkeys_finger.c | 19 ++++++++++++++- gpgkeys_hkp.c | 29 +++++++++++++++++++++--- gpgkeys_http.c | 25 +++++++++++++++++---- gpgkeys_ldap.c | 24 ++++++++++++++++++++ ksutil.c | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++ ksutil.h | 30 +++++++++++++++++++++++++ 8 files changed, 194 insertions(+), 10 deletions(-) From cvs at cvs.gnupg.org Wed Oct 13 20:32:17 2004 From: cvs at cvs.gnupg.org (cvs user dshaw) Date: Wed Oct 13 20:32:22 2004 Subject: gnupg/include (ChangeLog keyserver.h) Message-ID: Date: Wednesday, October 13, 2004 @ 20:32:17 Author: dshaw Path: /cvs/gnupg/gnupg/include Modified: ChangeLog keyserver.h * keyserver.h: Add KEYSERVER_TIMEOUT. -------------+ ChangeLog | 4 ++++ keyserver.h | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) From cvs at cvs.gnupg.org Wed Oct 13 20:40:14 2004 From: cvs at cvs.gnupg.org (cvs user dshaw) Date: Wed Oct 13 20:40:19 2004 Subject: gnupg/g10 (ChangeLog keyserver.c) Message-ID: Date: Wednesday, October 13, 2004 @ 20:40:14 Author: dshaw Path: /cvs/gnupg/gnupg/g10 Modified: ChangeLog keyserver.c * keyserver.c (keyserver_work): Handle keyserver timeouts. -------------+ ChangeLog | 2 ++ keyserver.c | 4 ++++ 2 files changed, 6 insertions(+) From cvs at cvs.gnupg.org Wed Oct 13 22:39:55 2004 From: cvs at cvs.gnupg.org (cvs user dshaw) Date: Wed Oct 13 22:40:03 2004 Subject: gnupg/g10 (ChangeLog armor.c) Message-ID: Date: Wednesday, October 13, 2004 @ 22:39:55 Author: dshaw Path: /cvs/gnupg/gnupg/g10 Modified: ChangeLog armor.c * armor.c (fake_packet): Allow arbitrary dash-escaped lines as per 2440bis-10. This is bug #158. -----------+ ChangeLog | 3 +++ armor.c | 39 +++++++++++++++++++-------------------- 2 files changed, 22 insertions(+), 20 deletions(-) From cvs at cvs.gnupg.org Thu Oct 14 09:11:57 2004 From: cvs at cvs.gnupg.org (cvs user werner) Date: Thu Oct 14 09:12:06 2004 Subject: gnupg/g10 (11 files) Message-ID: Date: Thursday, October 14, 2004 @ 09:11:57 Author: werner Path: /cvs/gnupg/gnupg/g10 Modified: ChangeLog exec.c keydb.c keygen.c keyring.c main.h misc.c openfile.c plaintext.c sign.c tdbio.c * misc.c (is_secured_filename): New. * keydb.c (maybe_create_keyring) * tdbio.c (tdbio_set_dbname) * plaintext.c (handle_plaintext) * openfile.c (copy_options_file, open_outfile) * exec.c (exec_write) * keygen.c (do_generate_keypair, gen_card_key_with_backup) * sign.c (sign_file, clearsign_file) * keyring.c (create_tmp_file, do_copy): Check for secured files before creating them. * keygen.c (print_status_key_created): s/unsigned char/byte/ due to a strange typedef for RISC OS. Noted by Stefan. -------------+ ChangeLog | 16 ++++++++++++++++ exec.c | 6 +++--- keydb.c | 8 +++++++- keygen.c | 28 ++++++++++++++++++++++------ keyring.c | 21 ++++++++++++++++----- main.h | 1 + misc.c | 35 +++++++++++++++++++++++++++++++++++ openfile.c | 32 +++++++++++++++++++++++--------- plaintext.c | 7 +++++++ sign.c | 16 ++++++++++++++-- tdbio.c | 25 +++++++++++++++---------- 11 files changed, 159 insertions(+), 36 deletions(-) From cvs at cvs.gnupg.org Thu Oct 14 09:20:54 2004 From: cvs at cvs.gnupg.org (cvs user werner) Date: Thu Oct 14 09:21:00 2004 Subject: gnupg/util (ChangeLog iobuf.c) Message-ID: Date: Thursday, October 14, 2004 @ 09:20:54 Author: werner Path: /cvs/gnupg/gnupg/util Modified: ChangeLog iobuf.c (iobuf_get_fd): Removed double check on directfp and cats it to FILEP becuase directfp is actually a void *. Notes by Stefan. -----------+ ChangeLog | 6 ++++++ iobuf.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) From cvs at cvs.gnupg.org Thu Oct 14 09:21:16 2004 From: cvs at cvs.gnupg.org (cvs user werner) Date: Thu Oct 14 09:21:21 2004 Subject: gnupg/m4 (Makefile.in) Message-ID: Date: Thursday, October 14, 2004 @ 09:21:16 Author: werner Path: /cvs/gnupg/gnupg/m4 Modified: Makefile.in * rndunix.c (start_gatherer) [ENABLE_SELINUX_HACKS]: Don't allow logging. * gpgkeys_finger.c (get_key): s/unsigned char/byte/ due to a strange typedef for RISC OS. Noted by Stefan. -------------+ Makefile.in | 1 + 1 files changed, 1 insertion(+) From cvs at cvs.gnupg.org Thu Oct 14 09:21:16 2004 From: cvs at cvs.gnupg.org (cvs user werner) Date: Thu Oct 14 09:21:31 2004 Subject: gnupg/keyserver (ChangeLog gpgkeys_finger.c) Message-ID: Date: Thursday, October 14, 2004 @ 09:21:16 Author: werner Path: /cvs/gnupg/gnupg/keyserver Modified: ChangeLog gpgkeys_finger.c * rndunix.c (start_gatherer) [ENABLE_SELINUX_HACKS]: Don't allow logging. * gpgkeys_finger.c (get_key): s/unsigned char/byte/ due to a strange typedef for RISC OS. Noted by Stefan. ------------------+ ChangeLog | 5 +++++ gpgkeys_finger.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) From cvs at cvs.gnupg.org Thu Oct 14 09:21:16 2004 From: cvs at cvs.gnupg.org (cvs user werner) Date: Thu Oct 14 09:21:38 2004 Subject: gnupg/cipher (ChangeLog rndunix.c) Message-ID: Date: Thursday, October 14, 2004 @ 09:21:16 Author: werner Path: /cvs/gnupg/gnupg/cipher Modified: ChangeLog rndunix.c * rndunix.c (start_gatherer) [ENABLE_SELINUX_HACKS]: Don't allow logging. * gpgkeys_finger.c (get_key): s/unsigned char/byte/ due to a strange typedef for RISC OS. Noted by Stefan. -----------+ ChangeLog | 5 +++++ rndunix.c | 9 ++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) From cvs at cvs.gnupg.org Thu Oct 14 09:21:17 2004 From: cvs at cvs.gnupg.org (cvs user werner) Date: Thu Oct 14 09:21:47 2004 Subject: gnupg (NEWS) Message-ID: Date: Thursday, October 14, 2004 @ 09:21:17 Author: werner Path: /cvs/gnupg/gnupg Modified: NEWS * rndunix.c (start_gatherer) [ENABLE_SELINUX_HACKS]: Don't allow logging. * gpgkeys_finger.c (get_key): s/unsigned char/byte/ due to a strange typedef for RISC OS. Noted by Stefan. ------+ NEWS | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) From cvs at cvs.gnupg.org Thu Oct 14 11:12:36 2004 From: cvs at cvs.gnupg.org (cvs user werner) Date: Thu Oct 14 11:12:43 2004 Subject: GNUPG-1-9-BRANCH gnupg/scd (8 files) Message-ID: Date: Thursday, October 14, 2004 @ 11:12:36 Author: werner Path: /cvs/gnupg/gnupg/scd Tag: GNUPG-1-9-BRANCH Modified: apdu.c apdu.h app-common.h app-openpgp.c ccid-driver.c ccid-driver.h iso7816.c iso7816.h Added ID keywords because these files are often used in other packages. ---------------+ apdu.c | 2 ++ apdu.h | 2 ++ app-common.h | 2 ++ app-openpgp.c | 2 ++ ccid-driver.c | 2 ++ ccid-driver.h | 2 ++ iso7816.c | 13 +++++++++++++ iso7816.h | 4 ++++ 8 files changed, 29 insertions(+) From cvs at cvs.gnupg.org Thu Oct 14 12:48:16 2004 From: cvs at cvs.gnupg.org (cvs user werner) Date: Thu Oct 14 12:48:22 2004 Subject: gnupg/g10 (ChangeLog export.c import.c) Message-ID: Date: Thursday, October 14, 2004 @ 12:48:16 Author: werner Path: /cvs/gnupg/gnupg/g10 Modified: ChangeLog export.c import.c * export.c (do_export_stream) [ENABLE_SELINUX_HACKS]: Don't allow secret key export. * import.c (import_secret_one) [ENABLE_SELINUX_HACKS]: Likewise -----------+ ChangeLog | 4 ++++ export.c | 8 ++++++++ import.c | 11 +++++++++++ 3 files changed, 23 insertions(+) From cvs at cvs.gnupg.org Thu Oct 14 15:22:04 2004 From: cvs at cvs.gnupg.org (cvs user werner) Date: Thu Oct 14 15:22:15 2004 Subject: GNUPG-1-9-BRANCH gnupg/scd (ChangeLog app-openpgp.c) Message-ID: Date: Thursday, October 14, 2004 @ 15:22:04 Author: werner Path: /cvs/gnupg/gnupg/scd Tag: GNUPG-1-9-BRANCH Modified: ChangeLog app-openpgp.c (parse_login_data): New. (app_select_openpgp): Call it. (do_setattr): Reparse it after change. ---------------+ ChangeLog | 6 ++ app-openpgp.c | 137 +++++++++++++++++++++++++++++++++++++++++++------------- 2 files changed, 113 insertions(+), 30 deletions(-) From cvs at cvs.gnupg.org Thu Oct 14 22:13:17 2004 From: cvs at cvs.gnupg.org (cvs user dshaw) Date: Thu Oct 14 22:13:25 2004 Subject: gnupg/g10 (ChangeLog armor.c keyedit.c keylist.c) Message-ID: Date: Thursday, October 14, 2004 @ 22:13:16 Author: dshaw Path: /cvs/gnupg/gnupg/g10 Modified: ChangeLog armor.c keyedit.c keylist.c * keylist.c (list_keyblock_print): Show the fingerprint after the key, not after the first user ID. * keyedit.c (show_key_with_all_names): Don't show validity if we're just printing user IDs for signing. * armor.c (fake_packet): Properly handle the case where the line is dash-space (i.e. a blank line that was quoted). Give a warning for bad dash escaping. -----------+ ChangeLog | 12 +++++++ armor.c | 95 ++++++++++++++++++++++++++++++++++++------------------------ keyedit.c | 46 +++++++++++++++++------------ keylist.c | 53 ++++----------------------------- 4 files changed, 104 insertions(+), 102 deletions(-) From cvs at cvs.gnupg.org Thu Oct 14 22:36:40 2004 From: cvs at cvs.gnupg.org (cvs user dshaw) Date: Thu Oct 14 22:36:46 2004 Subject: gnupg/keyserver (ChangeLog gpgkeys_finger.c) Message-ID: Date: Thursday, October 14, 2004 @ 22:36:40 Author: dshaw Path: /cvs/gnupg/gnupg/keyserver Modified: ChangeLog gpgkeys_finger.c * gpgkeys_finger.c (main): We do not support relay fingering (i.e. "finger://relayhost/user@example.com"), but finger URLs are occasionally miswritten that way. Give an error in this case. ------------------+ ChangeLog | 6 ++++++ gpgkeys_finger.c | 8 ++++++++ 2 files changed, 14 insertions(+) From cvs at cvs.gnupg.org Thu Oct 14 22:47:56 2004 From: cvs at cvs.gnupg.org (cvs user werner) Date: Thu Oct 14 22:48:02 2004 Subject: gnupg/g10 (ChangeLog keygen.c) Message-ID: Date: Thursday, October 14, 2004 @ 22:47:56 Author: werner Path: /cvs/gnupg/gnupg/g10 Modified: ChangeLog keygen.c another s/unsigned char*/byte*/ -----------+ ChangeLog | 6 ++++-- keygen.c | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) From cvs at cvs.gnupg.org Thu Oct 14 23:33:38 2004 From: cvs at cvs.gnupg.org (cvs user dshaw) Date: Thu Oct 14 23:33:45 2004 Subject: gnupg/doc (ChangeLog gpg.sgml) Message-ID: Date: Thursday, October 14, 2004 @ 23:33:38 Author: dshaw Path: /cvs/gnupg/gnupg/doc Modified: ChangeLog gpg.sgml * gpg.sgml: Document using "none" to remove preferred keyservers, the keyserver timeout parameter, and the direct trust model. -----------+ ChangeLog | 5 +++++ gpg.sgml | 33 +++++++++++++++++++++++++-------- 2 files changed, 30 insertions(+), 8 deletions(-) From cvs at cvs.gnupg.org Fri Oct 15 10:16:43 2004 From: cvs at cvs.gnupg.org (cvs user werner) Date: Fri Oct 15 10:16:52 2004 Subject: STABLE-BRANCH-1-2 gnupg/po (sv.po) Message-ID: Date: Friday, October 15, 2004 @ 10:16:43 Author: werner Path: /cvs/gnupg/gnupg/po Tag: STABLE-BRANCH-1-2 Modified: sv.po Updated -------+ sv.po | 2859 ++++++++++++++++++++++++++++++++-------------------------------- 1 files changed, 1437 insertions(+), 1422 deletions(-) From cvs at cvs.gnupg.org Fri Oct 15 11:34:21 2004 From: cvs at cvs.gnupg.org (cvs user werner) Date: Fri Oct 15 11:34:27 2004 Subject: gnupg/scripts (ChangeLog mk-gpg-texi) Message-ID: Date: Friday, October 15, 2004 @ 11:34:21 Author: werner Path: /cvs/gnupg/gnupg/scripts Modified: ChangeLog mk-gpg-texi Fix up the @setfilename lines. -------------+ ChangeLog | 4 ++++ mk-gpg-texi | 40 ++++++++++++++-------------------------- 2 files changed, 18 insertions(+), 26 deletions(-) From cvs at cvs.gnupg.org Fri Oct 15 11:37:49 2004 From: cvs at cvs.gnupg.org (cvs user werner) Date: Fri Oct 15 11:37:54 2004 Subject: gnupg (ChangeLog Makefile.am NEWS configure.ac) Message-ID: Date: Friday, October 15, 2004 @ 11:37:49 Author: werner Path: /cvs/gnupg/gnupg Modified: ChangeLog Makefile.am NEWS configure.ac * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): New. (AUTOMAKE_OPTIONS): New. * configure.ac: Check whether vasprintf needs a replacement. --------------+ ChangeLog | 7 +++++++ Makefile.am | 2 ++ NEWS | 2 ++ configure.ac | 3 ++- 4 files changed, 13 insertions(+), 1 deletion(-) From cvs at cvs.gnupg.org Fri Oct 15 11:38:27 2004 From: cvs at cvs.gnupg.org (cvs user werner) Date: Fri Oct 15 11:38:33 2004 Subject: gnupg/util (ChangeLog vasprintf.c) Message-ID: Date: Friday, October 15, 2004 @ 11:38:27 Author: werner Path: /cvs/gnupg/gnupg/util Added: vasprintf.c Modified: ChangeLog New. Taken from gnupg 1.9. -------------+ ChangeLog | 4 + vasprintf.c | 169 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 173 insertions(+) From cvs at cvs.gnupg.org Fri Oct 15 11:39:10 2004 From: cvs at cvs.gnupg.org (cvs user werner) Date: Fri Oct 15 11:39:15 2004 Subject: gnupg/doc (gpg.texi gpgv.texi) Message-ID: Date: Friday, October 15, 2004 @ 11:39:10 Author: werner Path: /cvs/gnupg/gnupg/doc Modified: gpg.texi gpgv.texi Rebuilt -----------+ gpg.texi | 31 ++++++++++++++++++++++--------- gpgv.texi | 2 +- 2 files changed, 23 insertions(+), 10 deletions(-) From cvs at cvs.gnupg.org Fri Oct 15 11:39:25 2004 From: cvs at cvs.gnupg.org (cvs user werner) Date: Fri Oct 15 11:39:33 2004 Subject: gnupg/g10 (ChangeLog helptext.c keygen.c pkclist.c) Message-ID: Date: Friday, October 15, 2004 @ 11:39:25 Author: werner Path: /cvs/gnupg/gnupg/g10 Modified: ChangeLog helptext.c keygen.c pkclist.c * pkclist.c (do_edit_ownertrust): Add a note to translators. * keygen.c (ask_user_id): Ditto. * helptext.c: Typo fix. ------------+ ChangeLog | 7 +++++++ helptext.c | 2 +- keygen.c | 11 +++++++++++ pkclist.c | 13 ++++++++++++- 4 files changed, 31 insertions(+), 2 deletions(-) From cvs at cvs.gnupg.org Fri Oct 15 11:39:31 2004 From: cvs at cvs.gnupg.org (cvs user werner) Date: Fri Oct 15 11:39:39 2004 Subject: gnupg/include (ChangeLog util.h) Message-ID: Date: Friday, October 15, 2004 @ 11:39:31 Author: werner Path: /cvs/gnupg/gnupg/include Modified: ChangeLog util.h Add asprintf prototype. -----------+ ChangeLog | 4 ++++ util.h | 13 +++++++++++++ 2 files changed, 17 insertions(+) From cvs at cvs.gnupg.org Fri Oct 15 11:40:43 2004 From: cvs at cvs.gnupg.org (cvs user werner) Date: Fri Oct 15 11:41:06 2004 Subject: gnupg/po (33 files) Message-ID: Date: Friday, October 15, 2004 @ 11:40:43 Author: werner Path: /cvs/gnupg/gnupg/po Modified: ChangeLog POTFILES.in be.po ca.po cs.po da.po de.po el.po en@boldquot.gmo en@boldquot.po en@quot.gmo en@quot.po eo.po es.po et.po fi.po fr.po gl.po hu.po id.po it.po ja.po nl.po pl.po pt.po pt_BR.po ro.po ru.po sk.po sv.po tr.po zh_CN.po zh_TW.po * POTFILES.in: Updated. * sv.po: Updated. Merged other files. -----------------+ ChangeLog | 6 POTFILES.in | 70 be.po | 6103 +++++++++++++++++++---------------- ca.po | 8006 +++++++++++++++++++++++++--------------------- cs.po | 7676 ++++++++++++++++++++++++-------------------- da.po | 6961 +++++++++++++++++++++------------------- de.po | 7954 +++++++++++++++++++++++++--------------------- el.po | 7658 ++++++++++++++++++++++++-------------------- en@boldquot.gmo | 0 en@boldquot.po | 7537 +++++++++++++++++++++++-------------------- en@quot.gmo | 0 en@quot.po | 7477 +++++++++++++++++++++++-------------------- eo.po | 7621 +++++++++++++++++++++++--------------------- es.po | 7842 ++++++++++++++++++++++++--------------------- et.po | 7570 +++++++++++++++++++++++-------------------- fi.po | 7649 ++++++++++++++++++++++++-------------------- fr.po | 7930 ++++++++++++++++++++++++--------------------- gl.po | 7893 ++++++++++++++++++++++++--------------------- hu.po | 7621 ++++++++++++++++++++++++-------------------- id.po | 7649 ++++++++++++++++++++++++-------------------- it.po | 7882 ++++++++++++++++++++++++--------------------- ja.po | 7549 +++++++++++++++++++++++-------------------- nl.po | 7692 ++++++++++++++++++++++++-------------------- pl.po | 7894 ++++++++++++++++++++++++--------------------- pt.po | 7635 ++++++++++++++++++++++++-------------------- pt_BR.po | 7483 +++++++++++++++++++++++-------------------- ro.po | 7674 ++++++++++++++++++++++++-------------------- ru.po | 7566 +++++++++++++++++++++++-------------------- sk.po | 8708 +++++++++++++++++++++++++++----------------------- sv.po | 9310 ++++++++++++++++++++++++++++-------------------------- tr.po | 7684 ++++++++++++++++++++++++-------------------- zh_CN.po | 7498 +++++++++++++++++++++++-------------------- zh_TW.po | 7535 +++++++++++++++++++++++-------------------- 33 files changed, 121202 insertions(+), 102131 deletions(-) From cvs at cvs.gnupg.org Fri Oct 15 11:55:39 2004 From: cvs at cvs.gnupg.org (cvs user werner) Date: Fri Oct 15 11:55:45 2004 Subject: gnupg/keyserver (ChangeLog Makefile.am) Message-ID: Date: Friday, October 15, 2004 @ 11:55:39 Author: werner Path: /cvs/gnupg/gnupg/keyserver Modified: ChangeLog Makefile.am * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): New. (AUTOMAKE_OPTIONS): New. * configure.ac: Check whether vasprintf needs a replacement. * app-openpgp.c (parse_login_data): New. (app_select_openpgp): Call it. (do_setattr): Reparse it after change. * Makefile.am: Add ksutil.h. -------------+ ChangeLog | 4 ++++ Makefile.am | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) From cvs at cvs.gnupg.org Fri Oct 15 11:55:39 2004 From: cvs at cvs.gnupg.org (cvs user werner) Date: Fri Oct 15 11:55:53 2004 Subject: gnupg/g10 (ChangeLog app-openpgp.c) Message-ID: Date: Friday, October 15, 2004 @ 11:55:39 Author: werner Path: /cvs/gnupg/gnupg/g10 Modified: ChangeLog app-openpgp.c * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): New. (AUTOMAKE_OPTIONS): New. * configure.ac: Check whether vasprintf needs a replacement. * app-openpgp.c (parse_login_data): New. (app_select_openpgp): Call it. (do_setattr): Reparse it after change. * Makefile.am: Add ksutil.h. ---------------+ ChangeLog | 4 + app-openpgp.c | 143 +++++++++++++++++++++++++++++++++++++++++++------------- 2 files changed, 115 insertions(+), 32 deletions(-) From cvs at cvs.gnupg.org Fri Oct 15 11:55:39 2004 From: cvs at cvs.gnupg.org (cvs user werner) Date: Fri Oct 15 11:56:01 2004 Subject: gnupg (Makefile.am configure.ac) Message-ID: Date: Friday, October 15, 2004 @ 11:55:39 Author: werner Path: /cvs/gnupg/gnupg Modified: Makefile.am configure.ac * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): New. (AUTOMAKE_OPTIONS): New. * configure.ac: Check whether vasprintf needs a replacement. * app-openpgp.c (parse_login_data): New. (app_select_openpgp): Call it. (do_setattr): Reparse it after change. * Makefile.am: Add ksutil.h. --------------+ Makefile.am | 2 +- configure.ac | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) From cvs at cvs.gnupg.org Fri Oct 15 13:51:05 2004 From: cvs at cvs.gnupg.org (cvs user dshaw) Date: Fri Oct 15 13:51:11 2004 Subject: gnupg (ChangeLog NEWS) Message-ID: Date: Friday, October 15, 2004 @ 13:51:04 Author: dshaw Path: /cvs/gnupg/gnupg Modified: ChangeLog NEWS * NEWS: Note gpgkeys_finger, keyserver timeouts, and the direct trust model. -----------+ ChangeLog | 5 +++++ NEWS | 13 +++++++++++++ 2 files changed, 18 insertions(+) From cvs at cvs.gnupg.org Fri Oct 15 14:19:06 2004 From: cvs at cvs.gnupg.org (cvs user werner) Date: Fri Oct 15 14:19:12 2004 Subject: gnupg/keyserver (7 files) Message-ID: Date: Friday, October 15, 2004 @ 14:19:06 Author: werner Path: /cvs/gnupg/gnupg/keyserver Modified: ChangeLog gpgkeys_finger.c gpgkeys_hkp.c gpgkeys_http.c gpgkeys_ldap.c gpgkeys_mailto.in gpgkeys_test.in * gpgkeys_ldap.c (main, show_help): Kludge to implement standard GNU options. Factored help printing out. * gpgkeys_finger.c (main, show_help): Ditto. * gpgkeys_hkp.c (main, show_help): Ditto. * gpgkeys_http.c (main, show_help): Ditto. * gpgkeys_test.in, gpgkeys_mailto.in: Implement --version and --help. -------------------+ ChangeLog | 7 +++++++ gpgkeys_finger.c | 24 +++++++++++++++++++++--- gpgkeys_hkp.c | 24 +++++++++++++++++++++--- gpgkeys_http.c | 24 +++++++++++++++++++++--- gpgkeys_ldap.c | 25 ++++++++++++++++++++++--- gpgkeys_mailto.in | 25 ++++++++++++++++++++++++- gpgkeys_test.in | 22 +++++++++++++++++++++- 7 files changed, 137 insertions(+), 14 deletions(-) From cvs at cvs.gnupg.org Fri Oct 15 15:16:57 2004 From: cvs at cvs.gnupg.org (cvs user werner) Date: Fri Oct 15 15:17:08 2004 Subject: gnupg/g10 (8 files) Message-ID: Date: Friday, October 15, 2004 @ 15:16:57 Author: werner Path: /cvs/gnupg/gnupg/g10 Modified: ChangeLog apdu.c cardglue.c ccid-driver.c keyedit.c passphrase.c status.c status.h * README: Mentioned --enable-selinux-support. * status.h (STATUS_NEED_PASSPHRASE_PIN): New. * status.c (get_status_string): Added. * passphrase.c (ask_passphrase): Moved status printing to .. * cardglue.c (pin_cb): .. here and issue new status message. * keyedit.c (sign_uids): Don't include the leading LF in the translatable string but print them separately. * apdu.c (apdu_open_remote_reader) [_WIN32]: We don't have ENOSYS. ---------------+ ChangeLog | 10 ++++++++++ apdu.c | 8 ++++++-- cardglue.c | 4 ++++ ccid-driver.c | 2 ++ keyedit.c | 40 ++++++++++++++++++++++++++++------------ passphrase.c | 3 --- status.c | 1 + status.h | 1 + 8 files changed, 52 insertions(+), 17 deletions(-) From cvs at cvs.gnupg.org Fri Oct 15 15:16:58 2004 From: cvs at cvs.gnupg.org (cvs user werner) Date: Fri Oct 15 15:17:17 2004 Subject: gnupg/doc (DETAILS) Message-ID: Date: Friday, October 15, 2004 @ 15:16:58 Author: werner Path: /cvs/gnupg/gnupg/doc Modified: DETAILS * README: Mentioned --enable-selinux-support. * status.h (STATUS_NEED_PASSPHRASE_PIN): New. * status.c (get_status_string): Added. * passphrase.c (ask_passphrase): Moved status printing to .. * cardglue.c (pin_cb): .. here and issue new status message. * keyedit.c (sign_uids): Don't include the leading LF in the translatable string but print them separately. * apdu.c (apdu_open_remote_reader) [_WIN32]: We don't have ENOSYS. ---------+ DETAILS | 5 ++++- 1 files changed, 4 insertions(+), 1 deletion(-) From cvs at cvs.gnupg.org Fri Oct 15 15:16:59 2004 From: cvs at cvs.gnupg.org (cvs user werner) Date: Fri Oct 15 15:17:26 2004 Subject: gnupg (ChangeLog NEWS README configure.ac) Message-ID: Date: Friday, October 15, 2004 @ 15:16:59 Author: werner Path: /cvs/gnupg/gnupg Modified: ChangeLog NEWS README configure.ac * README: Mentioned --enable-selinux-support. * status.h (STATUS_NEED_PASSPHRASE_PIN): New. * status.c (get_status_string): Added. * passphrase.c (ask_passphrase): Moved status printing to .. * cardglue.c (pin_cb): .. here and issue new status message. * keyedit.c (sign_uids): Don't include the leading LF in the translatable string but print them separately. * apdu.c (apdu_open_remote_reader) [_WIN32]: We don't have ENOSYS. --------------+ ChangeLog | 6 ++++++ NEWS | 2 +- README | 6 +++++- configure.ac | 4 ++-- 4 files changed, 14 insertions(+), 4 deletions(-) From cvs at cvs.gnupg.org Fri Oct 15 15:22:13 2004 From: cvs at cvs.gnupg.org (cvs user werner) Date: Fri Oct 15 15:22:30 2004 Subject: gnupg/po (31 files) Message-ID: Date: Friday, October 15, 2004 @ 15:22:13 Author: werner Path: /cvs/gnupg/gnupg/po Modified: be.po ca.po cs.po da.po de.po el.po en@boldquot.gmo en@boldquot.po en@quot.gmo en@quot.po eo.po es.po et.po fi.po fr.po gl.po hu.po id.po it.po ja.po nl.po pl.po pt.po pt_BR.po ro.po ru.po sk.po sv.po tr.po zh_CN.po zh_TW.po Updated. -----------------+ be.po | 517 ++++++++++++++++++++++++------------------------- ca.po | 527 ++++++++++++++++++++++++-------------------------- cs.po | 527 ++++++++++++++++++++++++-------------------------- da.po | 522 ++++++++++++++++++++++++------------------------- de.po | 527 ++++++++++++++++++++++++-------------------------- el.po | 527 ++++++++++++++++++++++++-------------------------- en@boldquot.gmo | 0 en@boldquot.po | 567 +++++++++++++++++++++++++----------------------------- en@quot.gmo | 0 en@quot.po | 567 +++++++++++++++++++++++++----------------------------- eo.po | 524 ++++++++++++++++++++++++------------------------- es.po | 527 ++++++++++++++++++++++++-------------------------- et.po | 527 ++++++++++++++++++++++++-------------------------- fi.po | 527 ++++++++++++++++++++++++-------------------------- fr.po | 529 ++++++++++++++++++++++++-------------------------- gl.po | 527 ++++++++++++++++++++++++-------------------------- hu.po | 527 ++++++++++++++++++++++++-------------------------- id.po | 527 ++++++++++++++++++++++++-------------------------- it.po | 527 ++++++++++++++++++++++++-------------------------- ja.po | 527 ++++++++++++++++++++++++-------------------------- nl.po | 527 ++++++++++++++++++++++++-------------------------- pl.po | 527 ++++++++++++++++++++++++-------------------------- pt.po | 527 ++++++++++++++++++++++++-------------------------- pt_BR.po | 519 ++++++++++++++++++++++++------------------------- ro.po | 527 ++++++++++++++++++++++++-------------------------- ru.po | 527 ++++++++++++++++++++++++-------------------------- sk.po | 527 ++++++++++++++++++++++++-------------------------- sv.po | 529 ++++++++++++++++++++++++-------------------------- tr.po | 527 ++++++++++++++++++++++++-------------------------- zh_CN.po | 527 ++++++++++++++++++++++++-------------------------- zh_TW.po | 527 ++++++++++++++++++++++++-------------------------- 31 files changed, 7561 insertions(+), 7780 deletions(-) From cvs at cvs.gnupg.org Fri Oct 15 15:46:19 2004 From: cvs at cvs.gnupg.org (cvs user werner) Date: Fri Oct 15 15:46:24 2004 Subject: gnupg (NEWS configure.ac) Message-ID: Date: Friday, October 15, 2004 @ 15:46:19 Author: werner Path: /cvs/gnupg/gnupg Modified: NEWS configure.ac post release preparations --------------+ NEWS | 4 ++++ configure.ac | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) From cvs at cvs.gnupg.org Fri Oct 15 15:47:39 2004 From: cvs at cvs.gnupg.org (cvs user werner) Date: Fri Oct 15 15:47:45 2004 Subject: gnupg/po (4 files) Message-ID: Date: Friday, October 15, 2004 @ 15:47:39 Author: werner Path: /cvs/gnupg/gnupg/po Removed: en@boldquot.gmo en@boldquot.po en@quot.gmo en@quot.po Removed these generated files. -----------------+ en@boldquot.gmo | 0 en@boldquot.po | 5923 ------------------------------------------------------ en@quot.gmo | 0 en@quot.po | 5908 ----------------------------------------------------- 4 files changed, 11831 deletions(-) From cvs at cvs.gnupg.org Fri Oct 15 18:05:30 2004 From: cvs at cvs.gnupg.org (cvs user wk) Date: Fri Oct 15 18:05:39 2004 Subject: gnupg (TODO) Message-ID: Date: Friday, October 15, 2004 @ 18:08:15 Author: wk Path: /cvs/gnupg/gnupg Modified: TODO test ------+ TODO | 1 + 1 files changed, 1 insertion(+) Index: gnupg/TODO diff -u gnupg/TODO:1.174 gnupg/TODO:1.175 --- gnupg/TODO:1.174 Fri Oct 15 18:05:32 2004 +++ gnupg/TODO Fri Oct 15 18:08:15 2004 @@ -121,3 +121,4 @@ * New option --file-remove path-to-wipe-program ? + From cvs at cvs.gnupg.org Fri Oct 15 18:08:04 2004 From: cvs at cvs.gnupg.org (cvs user wk) Date: Fri Oct 15 18:08:11 2004 Subject: GNUPG-1-9-BRANCH gnupg (NEWS) Message-ID: Date: Friday, October 15, 2004 @ 18:10:50 Author: wk Path: /cvs/gnupg/gnupg Tag: GNUPG-1-9-BRANCH Modified: NEWS Fixed copyright years ------+ NEWS | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) Index: gnupg/NEWS diff -u gnupg/NEWS:1.165.2.52 gnupg/NEWS:1.165.2.53 --- gnupg/NEWS:1.165.2.52 Fri Oct 1 15:31:46 2004 +++ gnupg/NEWS Fri Oct 15 18:10:50 2004 @@ -2,6 +2,7 @@ ------------------------------------------------- + Noteworthy changes in version 1.9.11 (2004-10-01) ------------------------------------------------- @@ -186,7 +187,7 @@ development branch. - Copyright 2002, 2003 Free Software Foundation, Inc. + Copyright 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 From cvs at cvs.gnupg.org Fri Oct 15 19:52:54 2004 From: cvs at cvs.gnupg.org (cvs user wk) Date: Fri Oct 15 19:53:04 2004 Subject: gnupg/doc (ChangeLog DETAILS) Message-ID: Date: Friday, October 15, 2004 @ 19:55:41 Author: wk Path: /cvs/gnupg/gnupg/doc Modified: ChangeLog DETAILS Document IMPORT_CHECK. -----------+ ChangeLog | 4 ++++ DETAILS | 4 ++++ 2 files changed, 8 insertions(+) Index: gnupg/doc/ChangeLog diff -u gnupg/doc/ChangeLog:1.81 gnupg/doc/ChangeLog:1.82 --- gnupg/doc/ChangeLog:1.81 Thu Oct 14 23:33:38 2004 +++ gnupg/doc/ChangeLog Fri Oct 15 19:55:41 2004 @@ -1,3 +1,7 @@ +2004-10-15 Werner Koch + + * DETAILS: Document IMPORT_CHECK. + 2004-10-14 David Shaw * gpg.sgml: Document using "none" to remove preferred keyservers, Index: gnupg/doc/DETAILS diff -u gnupg/doc/DETAILS:1.84 gnupg/doc/DETAILS:1.85 --- gnupg/doc/DETAILS:1.84 Fri Oct 15 15:16:57 2004 +++ gnupg/doc/DETAILS Fri Oct 15 19:55:41 2004 @@ -364,6 +364,10 @@ NO_SECKEY The key is not available + IMPORT_CHECK + This status is emitted in interactive mode right before + the "import.okay" prompt. + IMPORTED The keyid and name of the signature just imported From cvs at cvs.gnupg.org Sat Oct 16 18:01:29 2004 From: cvs at cvs.gnupg.org (cvs user dshaw) Date: Sat Oct 16 18:01:40 2004 Subject: gnupg/keyserver (ChangeLog gpgkeys_finger.c) Message-ID: Date: Saturday, October 16, 2004 @ 18:04:19 Author: dshaw Path: /cvs/gnupg/gnupg/keyserver Modified: ChangeLog gpgkeys_finger.c * gpgkeys_finger.c [_WIN32] (connect_server): Fix typo. ------------------+ ChangeLog | 4 ++++ gpgkeys_finger.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) Index: gnupg/keyserver/ChangeLog diff -u gnupg/keyserver/ChangeLog:1.87 gnupg/keyserver/ChangeLog:1.88 --- gnupg/keyserver/ChangeLog:1.87 Fri Oct 15 14:19:06 2004 +++ gnupg/keyserver/ChangeLog Sat Oct 16 18:04:19 2004 @@ -1,3 +1,7 @@ +2004-10-16 David Shaw + + * gpgkeys_finger.c [_WIN32] (connect_server): Fix typo. + 2004-10-15 Werner Koch * gpgkeys_ldap.c (main, show_help): Kludge to implement standard Index: gnupg/keyserver/gpgkeys_finger.c diff -u gnupg/keyserver/gpgkeys_finger.c:1.6 gnupg/keyserver/gpgkeys_finger.c:1.7 --- gnupg/keyserver/gpgkeys_finger.c:1.6 Fri Oct 15 14:19:06 2004 +++ gnupg/keyserver/gpgkeys_finger.c Sat Oct 16 18:04:19 2004 @@ -121,7 +121,7 @@ /* Win32 gethostbyname doesn't handle IP addresses internally, so we try inet_addr first on that platform only. */ if ((l = inet_addr (server)) != SOCKET_ERROR) - memcpy (&ad.sin_addr, &l, sizeof l); + memcpy (&addr.sin_addr, &l, sizeof l); else if ((hp = gethostbyname (server))) { if (hp->h_addrtype != AF_INET) From cvs at cvs.gnupg.org Sat Oct 16 23:28:43 2004 From: cvs at cvs.gnupg.org (cvs user dshaw) Date: Sat Oct 16 23:28:57 2004 Subject: gnupg/util (ChangeLog http.c) Message-ID: Date: Saturday, October 16, 2004 @ 23:31:36 Author: dshaw Path: /cvs/gnupg/gnupg/util Modified: ChangeLog http.c * http.c (connect_server): [_WIN32] actually fill in the sin_addr so we aren't always talking to localhost. Add some general sanity checking of parameters learned from gethostbyname(). -----------+ ChangeLog | 6 ++++++ http.c | 14 +++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) Index: gnupg/util/ChangeLog diff -u gnupg/util/ChangeLog:1.158 gnupg/util/ChangeLog:1.159 --- gnupg/util/ChangeLog:1.158 Fri Oct 15 11:38:27 2004 +++ gnupg/util/ChangeLog Sat Oct 16 23:31:36 2004 @@ -1,3 +1,9 @@ +2004-10-16 David Shaw + + * http.c (connect_server): [_WIN32] actually fill in the sin_addr + so we aren't always talking to localhost. Add some general sanity + checking of parameters learned from gethostbyname(). + 2004-10-15 Werner Koch * vasprintf.c: New. Taken from gnupg 1.9. Index: gnupg/util/http.c diff -u gnupg/util/http.c:1.26 gnupg/util/http.c:1.27 --- gnupg/util/http.c:1.26 Fri Sep 10 23:16:47 2004 +++ gnupg/util/http.c Sat Oct 16 23:31:36 2004 @@ -780,6 +780,7 @@ addr.sin_family=AF_INET; addr.sin_port=htons(port); + memcpy(&addr.sin_addr,&inaddr,sizeof(inaddr)); if(connect(sock,(struct sockaddr *)&addr,sizeof(addr))==0) return sock; @@ -797,7 +798,6 @@ { /* We're using SRV, so append the tags */ char srvname[MAXDNAME]; - strcpy(srvname,"_hkp._tcp."); strncat(srvname,server,MAXDNAME-11); srvname[MAXDNAME-1]='\0'; @@ -872,11 +872,23 @@ } addr.sin_family=host->h_addrtype; + if(addr.sin_family!=AF_INET) + { + log_error("%s: unknown address family\n",srvlist[srv].target); + return -1; + } + addr.sin_port=htons(srvlist[srv].port); /* Try all A records until one responds. */ while(host->h_addr_list[i]) { + if(host->h_length!=4) + { + log_error("%s: illegal address length\n",srvlist[srv].target); + return -1; + } + memcpy(&addr.sin_addr,host->h_addr_list[i],host->h_length); if(connect(sock,(struct sockaddr *)&addr,sizeof(addr))==0) From cvs at cvs.gnupg.org Sun Oct 17 00:45:27 2004 From: cvs at cvs.gnupg.org (cvs user dshaw) Date: Sun Oct 17 00:45:40 2004 Subject: gnupg/g10 (ChangeLog parse-packet.c) Message-ID: Date: Sunday, October 17, 2004 @ 00:48:20 Author: dshaw Path: /cvs/gnupg/gnupg/g10 Modified: ChangeLog parse-packet.c * parse-packet.c (parse_one_sig_subpkt, enum_sig_subpkt): Don't BUG() on unknown subpackets. Rather, just return them silently. ----------------+ ChangeLog | 5 +++++ parse-packet.c | 17 +++++++---------- 2 files changed, 12 insertions(+), 10 deletions(-) Index: gnupg/g10/ChangeLog diff -u gnupg/g10/ChangeLog:1.621 gnupg/g10/ChangeLog:1.622 --- gnupg/g10/ChangeLog:1.621 Fri Oct 15 15:16:57 2004 +++ gnupg/g10/ChangeLog Sun Oct 17 00:48:20 2004 @@ -1,3 +1,8 @@ +2004-10-16 David Shaw + + * parse-packet.c (parse_one_sig_subpkt, enum_sig_subpkt): Don't + BUG() on unknown subpackets. Rather, just return them silently. + 2004-10-15 Werner Koch * status.h (STATUS_NEED_PASSPHRASE_PIN): New. Index: gnupg/g10/parse-packet.c diff -u gnupg/g10/parse-packet.c:1.113 gnupg/g10/parse-packet.c:1.114 --- gnupg/g10/parse-packet.c:1.113 Thu Sep 9 14:42:10 2004 +++ gnupg/g10/parse-packet.c Sun Oct 17 00:48:20 2004 @@ -955,10 +955,9 @@ } /**************** - * Returns: >= 0 offset into buffer - * -1 unknown type - * -2 unsupported type - * -3 subpacket too short + * Returns: >= 0 use this offset into buffer + * -1 explicitly reject returning this type + * -2 subpacket too short */ int parse_one_sig_subpkt( const byte *buffer, size_t n, int type ) @@ -1008,9 +1007,9 @@ if ( n != 2 ) break; return 0; - default: return -1; + default: return 0; } - return -3; + return -2; } @@ -1130,13 +1129,11 @@ *ret_n = n; offset = parse_one_sig_subpkt(buffer, n, type ); switch( offset ) { - case -3: - log_error("subpacket of type %d too short\n", type); - return NULL; case -2: + log_error("subpacket of type %d too short\n", type); return NULL; case -1: - BUG(); /* not yet needed */ + return NULL; default: break; } From cvs at cvs.gnupg.org Sun Oct 17 15:25:42 2004 From: cvs at cvs.gnupg.org (cvs user wk) Date: Sun Oct 17 15:41:25 2004 Subject: gnupg/g10 (ChangeLog passphrase.c) Message-ID: Date: Sunday, October 17, 2004 @ 15:28:37 Author: wk Path: /cvs/gnupg/gnupg/g10 Modified: ChangeLog passphrase.c (agent_get_passphrase): Cast UIDLEN to int. Noted by Christian Cornelssen. --------------+ ChangeLog | 9 +++++++-- passphrase.c | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) Index: gnupg/g10/ChangeLog diff -u gnupg/g10/ChangeLog:1.622 gnupg/g10/ChangeLog:1.623 --- gnupg/g10/ChangeLog:1.622 Sun Oct 17 00:48:20 2004 +++ gnupg/g10/ChangeLog Sun Oct 17 15:28:37 2004 @@ -1,3 +1,8 @@ +2004-10-17 Werner Koch + + * passphrase.c (agent_get_passphrase): Cast UIDLEN to int. Noted + by Christian Cornelssen. + 2004-10-16 David Shaw * parse-packet.c (parse_one_sig_subpkt, enum_sig_subpkt): Don't @@ -3154,8 +3159,8 @@ (import_one): Use it here. Use merge_keys_and_selfsig in the interactive mode to avoid wrong key information. - * status.h: Add new status code. - * status.c: Ditto. + * status.h: Add new status code. + * status.c: Ditto. 2002-12-13 David Shaw Index: gnupg/g10/passphrase.c diff -u gnupg/g10/passphrase.c:1.63 gnupg/g10/passphrase.c:1.64 --- gnupg/g10/passphrase.c:1.63 Fri Oct 15 15:16:57 2004 +++ gnupg/g10/passphrase.c Sun Oct 17 15:28:37 2004 @@ -700,7 +700,7 @@ + uidlen + 15 + strlen(algo_name) + keystrlen() + strlen (timestr) + strlen (maink) ); sprintf (atext, PROMPTSTRING, - uidlen, uid, + (int)uidlen, uid, nbits_from_pk (pk), algo_name, keystr(&keyid[0]), timestr, maink ); m_free (uid); From cvs at cvs.gnupg.org Sun Oct 17 15:43:57 2004 From: cvs at cvs.gnupg.org (cvs user mo) Date: Sun Oct 17 15:44:03 2004 Subject: GNUPG-1-9-BRANCH-MO gnupg/agent (ChangeLog command-ssh.c) Message-ID: Date: Sunday, October 17, 2004 @ 15:43:57 Author: mo Path: /cvs/gnupg/gnupg/agent Tag: GNUPG-1-9-BRANCH-MO Modified: ChangeLog command-ssh.c 2004-10-17 Moritz Schulte * command-ssh.c (ssh_key_modifier_rsa): Check for p being greater than q, not for p and q not being equal. * command-ssh.c (ssh_sexp_construct): New variable: j; make sure that the order of MPIs in the generated S-Expression is correct when dealing with secret keys. ---------------+ ChangeLog | 9 +++++++++ command-ssh.c | 10 +++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) From cvs at cvs.gnupg.org Sun Oct 17 17:16:12 2004 From: cvs at cvs.gnupg.org (cvs user dshaw) Date: Sun Oct 17 17:16:22 2004 Subject: gnupg/g10 (ChangeLog keylist.c) Message-ID: Date: Sunday, October 17, 2004 @ 17:16:12 Author: dshaw Path: /cvs/gnupg/gnupg/g10 Modified: ChangeLog keylist.c * keylist.c (print_one_subpacket): The flags field should be hex. -----------+ ChangeLog | 4 ++++ keylist.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) From cvs at cvs.gnupg.org Mon Oct 18 17:48:39 2004 From: cvs at cvs.gnupg.org (cvs user dshaw) Date: Mon Oct 18 17:48:48 2004 Subject: gnupg/util (ChangeLog http.c) Message-ID: Date: Monday, October 18, 2004 @ 17:51:43 Author: dshaw Path: /cvs/gnupg/gnupg/util Modified: ChangeLog http.c * http.c (connect_server, send_request): Use the URI scheme as the SRV tag rather than hard-coding _hkp. -----------+ ChangeLog | 5 +++++ http.c | 38 ++++++++++++++++++++++---------------- 2 files changed, 27 insertions(+), 16 deletions(-) Index: gnupg/util/ChangeLog diff -u gnupg/util/ChangeLog:1.159 gnupg/util/ChangeLog:1.160 --- gnupg/util/ChangeLog:1.159 Sat Oct 16 23:31:36 2004 +++ gnupg/util/ChangeLog Mon Oct 18 17:51:43 2004 @@ -1,3 +1,8 @@ +2004-10-18 David Shaw + + * http.c (connect_server, send_request): Use the URI scheme as the + SRV tag rather than hard-coding _hkp. + 2004-10-16 David Shaw * http.c (connect_server): [_WIN32] actually fill in the sin_addr Index: gnupg/util/http.c diff -u gnupg/util/http.c:1.27 gnupg/util/http.c:1.28 --- gnupg/util/http.c:1.27 Sat Oct 16 23:31:36 2004 +++ gnupg/util/http.c Mon Oct 18 17:51:43 2004 @@ -72,7 +72,8 @@ static byte *build_rel_path( PARSED_URI uri ); static int parse_response( HTTP_HD hd ); -static int connect_server(const char *server, ushort port, unsigned int flags); +static int connect_server( const char *server, ushort port, unsigned int flags, + const char *srvtag ); static int write_server( int sock, const char *data, size_t length ); #ifdef _WIN32 @@ -309,13 +310,12 @@ *p2++ = 0; strlwr( p ); uri->scheme = p; - uri->port = 80; - if( !strcmp( uri->scheme, "http" ) ) - ; - else if( !strcmp( uri->scheme, "x-hkp" ) ) /* same as HTTP */ - uri->port = 11371; + if(strcmp(uri->scheme,"http")==0) + uri->port = 80; + else if(strcmp(uri->scheme,"hkp")==0) + uri->port = 11371; else - return G10ERR_INVALID_URI; /* Unsupported scheme */ + return G10ERR_INVALID_URI; /* Unsupported scheme */ p = p2; @@ -525,7 +525,7 @@ return G10ERR_NETWORK; } hd->sock = connect_server( *uri->host? uri->host : "localhost", - uri->port? uri->port : 80, 0 ); + uri->port? uri->port : 80, 0, NULL ); if(uri->auth) { char *x=make_radix64_string(uri->auth,strlen(uri->auth)); @@ -538,7 +538,7 @@ } else { - hd->sock = connect_server( server, port, hd->flags ); + hd->sock = connect_server( server, port, hd->flags, hd->uri->scheme ); if(hd->uri->auth) { char *x=make_radix64_string(hd->uri->auth,strlen(hd->uri->auth)); @@ -755,7 +755,8 @@ static int -connect_server( const char *server, ushort port, unsigned int flags ) +connect_server( const char *server, ushort port, unsigned int flags, + const char *srvtag ) { int sock=-1,srv,srvcount=0,connected=0,hostfound=0; struct srventry *srvlist=NULL; @@ -794,14 +795,19 @@ #ifdef USE_DNS_SRV /* Do the SRV thing */ - if(flags&HTTP_FLAG_TRY_SRV) + if(flags&HTTP_FLAG_TRY_SRV && srvtag) { /* We're using SRV, so append the tags */ - char srvname[MAXDNAME]; - strcpy(srvname,"_hkp._tcp."); - strncat(srvname,server,MAXDNAME-11); - srvname[MAXDNAME-1]='\0'; - srvcount=getsrv(srvname,&srvlist); + if(1+strlen(srvtag)+6+strlen(server)+1<=MAXDNAME) + { + char srvname[MAXDNAME]; + + strcpy(srvname,"_"); + strcat(srvname,srvtag); + strcat(srvname,"._tcp."); + strcat(srvname,server); + srvcount=getsrv(srvname,&srvlist); + } } #endif From cvs at cvs.gnupg.org Mon Oct 18 17:50:24 2004 From: cvs at cvs.gnupg.org (cvs user dshaw) Date: Mon Oct 18 17:50:31 2004 Subject: gnupg/keyserver (ChangeLog gpgkeys_hkp.c) Message-ID: Date: Monday, October 18, 2004 @ 17:53:28 Author: dshaw Path: /cvs/gnupg/gnupg/keyserver Modified: ChangeLog gpgkeys_hkp.c * gpgkeys_hkp.c (send_key, get_key, search_key): Use "hkp" instead of "x-hkp" so it can be used as a SRV tag. ---------------+ ChangeLog | 5 +++++ gpgkeys_hkp.c | 7 +++---- 2 files changed, 8 insertions(+), 4 deletions(-) Index: gnupg/keyserver/ChangeLog diff -u gnupg/keyserver/ChangeLog:1.88 gnupg/keyserver/ChangeLog:1.89 --- gnupg/keyserver/ChangeLog:1.88 Sat Oct 16 18:04:19 2004 +++ gnupg/keyserver/ChangeLog Mon Oct 18 17:53:28 2004 @@ -1,3 +1,8 @@ +2004-10-18 David Shaw + + * gpgkeys_hkp.c (send_key, get_key, search_key): Use "hkp" instead + of "x-hkp" so it can be used as a SRV tag. + 2004-10-16 David Shaw * gpgkeys_finger.c [_WIN32] (connect_server): Fix typo. Index: gnupg/keyserver/gpgkeys_hkp.c diff -u gnupg/keyserver/gpgkeys_hkp.c:1.43 gnupg/keyserver/gpgkeys_hkp.c:1.44 --- gnupg/keyserver/gpgkeys_hkp.c:1.43 Fri Oct 15 14:19:06 2004 +++ gnupg/keyserver/gpgkeys_hkp.c Mon Oct 18 17:53:28 2004 @@ -153,8 +153,7 @@ iobuf_flush_temp(temp); - sprintf(request,"x-hkp://%s%s%s/pks/add", - host,port[0]?":":"",port[0]?port:""); + sprintf(request,"hkp://%s%s%s/pks/add",host,port[0]?":":"",port[0]?port:""); if(verbose>2) fprintf(console,"gpgkeys: HTTP URL is `%s'\n",request); @@ -257,7 +256,7 @@ return KEYSERVER_NO_MEMORY; } - sprintf(request,"x-hkp://%s%s%s/pks/lookup?op=get&options=mr&search=%s", + sprintf(request,"hkp://%s%s%s/pks/lookup?op=get&options=mr&search=%s", host,port[0]?":":"",port[0]?port:"", search); if(verbose>2) @@ -679,7 +678,7 @@ goto fail; } - sprintf(request,"x-hkp://%s%s%s/pks/lookup?op=index&options=mr&search=%s", + sprintf(request,"hkp://%s%s%s/pks/lookup?op=index&options=mr&search=%s", host,port[0]?":":"",port[0]?port:"",search); if(verbose>2) From cvs at cvs.gnupg.org Wed Oct 20 10:52:12 2004 From: cvs at cvs.gnupg.org (cvs user wk) Date: Wed Oct 20 10:52:18 2004 Subject: GNUPG-1-9-BRANCH gnupg/kbx (keybox-openpgp.c) Message-ID: Date: Wednesday, October 20, 2004 @ 10:55:26 Author: wk Path: /cvs/gnupg/gnupg/kbx Tag: GNUPG-1-9-BRANCH Modified: keybox-openpgp.c typo fix ------------------+ keybox-openpgp.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: gnupg/kbx/keybox-openpgp.c diff -u gnupg/kbx/keybox-openpgp.c:1.1.2.1 gnupg/kbx/keybox-openpgp.c:1.1.2.2 --- gnupg/kbx/keybox-openpgp.c:1.1.2.1 Tue Aug 24 21:55:47 2004 +++ gnupg/kbx/keybox-openpgp.c Wed Oct 20 10:55:26 2004 @@ -301,7 +301,7 @@ else { /* Its a pitty that we need to prefix the buffer with the tag - and a length header: We can't simply psss it to the fast + and a length header: We can't simply pass it to the fast hashing fucntion for that reason. It might be a good idea to have a scatter-gather enabled hash function. What we do here is to use a static buffer if this one is large enough and From cvs at cvs.gnupg.org Wed Oct 20 11:36:42 2004 From: cvs at cvs.gnupg.org (cvs user wk) Date: Wed Oct 20 11:51:28 2004 Subject: gnupg/g10 (9 files) Message-ID: Date: Wednesday, October 20, 2004 @ 11:39:56 Author: wk Path: /cvs/gnupg/gnupg/g10 Modified: ChangeLog apdu.c apdu.h app-common.h app-openpgp.c ccid-driver.c ccid-driver.h iso7816.c iso7816.h * apdu.c (apdu_open_reader): Load pcsc_get_status_change fucntion. (pcsc_get_status): Implemented. (reset_pcsc_reader): Implemented. (open_pcsc_reader): Succeed even with no card inserted. (open_ccid_reader): Set LAST_STATUS. * iso7816.c (iso7816_select_application): Always use 0 for P1. ---------------+ ChangeLog | 14 + apdu.c | 486 +++++++++++++++++++++++++++++++++++++++++++++++++++----- apdu.h | 2 app-common.h | 12 - app-openpgp.c | 2 ccid-driver.c | 4 ccid-driver.h | 2 iso7816.c | 22 +- iso7816.h | 2 9 files changed, 496 insertions(+), 50 deletions(-) Index: gnupg/g10/ChangeLog diff -u gnupg/g10/ChangeLog:1.623 gnupg/g10/ChangeLog:1.624 --- gnupg/g10/ChangeLog:1.623 Sun Oct 17 15:28:37 2004 +++ gnupg/g10/ChangeLog Wed Oct 20 11:39:56 2004 @@ -1,3 +1,17 @@ +2004-10-20 Werner Koch + + * apdu.c (apdu_open_reader): Load pcsc_get_status_change fucntion. + (pcsc_get_status): Implemented. + (reset_pcsc_reader): Implemented. + (open_pcsc_reader): Succeed even with no card inserted. + (open_ccid_reader): Set LAST_STATUS. + + * iso7816.c (iso7816_select_application): Always use 0 for P1. + +2004-10-18 Werner Koch + + * ccid-driver.c (ccid_get_atr): Reset T=1 state info. + 2004-10-17 Werner Koch * passphrase.c (agent_get_passphrase): Cast UIDLEN to int. Noted Index: gnupg/g10/apdu.c diff -u gnupg/g10/apdu.c:1.15 gnupg/g10/apdu.c:1.16 --- gnupg/g10/apdu.c:1.15 Fri Oct 15 15:16:57 2004 +++ gnupg/g10/apdu.c Wed Oct 20 11:39:56 2004 @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: apdu.c,v 1.15 2004/10/15 13:16:57 werner Exp $ + * $Id: apdu.c,v 1.16 2004/10/20 09:39:56 wk Exp $ */ #include @@ -125,6 +125,8 @@ rapdu_t handle; } rapdu; #endif /*USE_G10CODE_RAPDU*/ + char *rdrname; /* Name of the connected reader or NULL if unknown. */ + int last_status; int status; unsigned char atr[33]; size_t atrlen; /* A zero length indicates that the ATR has @@ -169,13 +171,47 @@ #define PCSC_UNPOWER_CARD 2 #define PCSC_EJECT_CARD 3 -struct pcsc_io_request_s { +#define PCSC_UNKNOWN 0x0001 +#define PCSC_ABSENT 0x0002 /* Card is absent. */ +#define PCSC_PRESENT 0x0004 /* Card is present. */ +#define PCSC_SWALLOWED 0x0008 /* Card is present and electrical connected. */ +#define PCSC_POWERED 0x0010 /* Card is powered. */ +#define PCSC_NEGOTIABLE 0x0020 /* Card is awaiting PTS. */ +#define PCSC_SPECIFIC 0x0040 /* Card is ready for use. */ + +#define PCSC_STATE_UNAWARE 0x0000 /* Want status. */ +#define PCSC_STATE_IGNORE 0x0001 /* Ignore this reader. */ +#define PCSC_STATE_CHANGED 0x0002 /* State has changed. */ +#define PCSC_STATE_UNKNOWN 0x0004 /* Reader unknown. */ +#define PCSC_STATE_UNAVAILABLE 0x0008 /* Status unavailable. */ +#define PCSC_STATE_EMPTY 0x0010 /* Card removed. */ +#define PCSC_STATE_PRESENT 0x0020 /* Card inserted. */ +#define PCSC_STATE_ATRMATCH 0x0040 /* ATR matches card. */ +#define PCSC_STATE_EXCLUSIVE 0x0080 /* Exclusive Mode. */ +#define PCSC_STATE_INUSE 0x0100 /* Shared mode. */ +#define PCSC_STATE_MUTE 0x0200 /* Unresponsive card. */ + + +struct pcsc_io_request_s +{ unsigned long protocol; unsigned long pci_len; }; typedef struct pcsc_io_request_s *pcsc_io_request_t; +struct pcsc_readerstate_s +{ + const char *reader; + void *user_data; + unsigned long current_state; + unsigned long event_state; + unsigned long atrlen; + unsigned char atr[33]; +}; + +typedef struct pcsc_readerstate_s *pcsc_readerstate_t; + long (* DLSTDCALL pcsc_establish_context) (unsigned long scope, const void *reserved1, const void *reserved2, @@ -184,12 +220,21 @@ long (* DLSTDCALL pcsc_list_readers) (unsigned long context, const char *groups, char *readers, unsigned long*readerslen); +long (* DLSTDCALL pcsc_get_status_change) (unsigned long context, + unsigned long timeout, + pcsc_readerstate_t readerstates, + unsigned long nreaderstates); long (* DLSTDCALL pcsc_connect) (unsigned long context, const char *reader, unsigned long share_mode, unsigned long preferred_protocols, unsigned long *r_card, unsigned long *r_active_protocol); +long (* DLSTDCALL pcsc_reconnect) (unsigned long card, + unsigned long share_mode, + unsigned long preferred_protocols, + unsigned long initialization, + unsigned long *r_active_protocol); long (* DLSTDCALL pcsc_disconnect) (unsigned long card, unsigned long disposition); long (* DLSTDCALL pcsc_status) (unsigned long card, @@ -211,7 +256,6 @@ - /* Helper @@ -254,11 +298,13 @@ reader_table[reader].dump_status_reader = NULL; reader_table[reader].used = 1; + reader_table[reader].last_status = 0; #ifdef NEED_PCSC_WRAPPER reader_table[reader].pcsc.req_fd = -1; reader_table[reader].pcsc.rsp_fd = -1; reader_table[reader].pcsc.pid = (pid_t)(-1); #endif + return reader; } @@ -662,18 +708,293 @@ } - static int -pcsc_get_status (int slot, unsigned int *status) +reset_pcsc_reader (int slot) { - *status = 1|2|4; /* FIXME!!!! */ +#ifdef NEED_PCSC_WRAPPER + long err; + reader_table_t slotp; + size_t len; + int i, n; + unsigned char msgbuf[9]; + + slotp = reader_table + slot; + + if (slotp->pcsc.req_fd == -1 + || slotp->pcsc.rsp_fd == -1 + || slotp->pcsc.pid == (pid_t)(-1) ) + { + log_error ("pcsc_get_status: pcsc-wrapper not running\n"); + return SW_HOST_CARD_IO_ERROR; + } + + msgbuf[0] = 0x05; /* RESET command. */ + len = 0; + msgbuf[1] = (len >> 24); + msgbuf[2] = (len >> 16); + msgbuf[3] = (len >> 8); + msgbuf[4] = (len ); + if ( writen (slotp->pcsc.req_fd, msgbuf, 5) ) + { + log_error ("error sending PC/SC RESET request: %s\n", + strerror (errno)); + goto command_failed; + } + + /* Read the response. */ + if ((i=readn (slotp->pcsc.rsp_fd, msgbuf, 9, &len)) || len != 9) + { + log_error ("error receiving PC/SC RESET response: %s\n", + i? strerror (errno) : "premature EOF"); + goto command_failed; + } + len = (msgbuf[1] << 24) | (msgbuf[2] << 16) | (msgbuf[3] << 8 ) | msgbuf[4]; + if (msgbuf[0] != 0x81 || len < 4) + { + log_error ("invalid response header from PC/SC received\n"); + goto command_failed; + } + len -= 4; /* Already read the error code. */ + if (len > DIM (slotp->atr)) + { + log_error ("PC/SC returned a too large ATR (len=%x)\n", len); + goto command_failed; + } + err = (msgbuf[5] << 24) | (msgbuf[6] << 16) | (msgbuf[7] << 8 ) | msgbuf[8]; + if (err) + { + log_error ("PC/SC RESET failed: %s\n", pcsc_error_string (err)); + goto command_failed; + } + + /* The open fucntion may return a zero for the ATR length to + indicate that no card is present. */ + n = len; + if (n) + { + if ((i=readn (slotp->pcsc.rsp_fd, slotp->atr, n, &len)) || len != n) + { + log_error ("error receiving PC/SC RESET response: %s\n", + i? strerror (errno) : "premature EOF"); + goto command_failed; + } + } + slotp->atrlen = len; + + return 0; + + command_failed: + close (slotp->pcsc.req_fd); + close (slotp->pcsc.rsp_fd); + slotp->pcsc.req_fd = -1; + slotp->pcsc.rsp_fd = -1; + kill (slotp->pcsc.pid, SIGTERM); + slotp->pcsc.pid = (pid_t)(-1); + slotp->used = 0; + return -1; + +#else /* !NEED_PCSC_WRAPPER */ + long err; + char reader[250]; + unsigned long nreader, atrlen; + unsigned long card_state, card_protocol; + + if (reader_table[slot].pcsc.card) + { + err = pcsc_disconnect (reader_table[slot].pcsc.card, PCSC_LEAVE_CARD); + if (err) + { + log_error ("pcsc_disconnect failed: %s (0x%lx)\n", + pcsc_error_string (err), err); + return SW_HOST_CARD_IO_ERROR; + } + reader_table[slot].pcsc.card = 0; + } + + err = pcsc_connect (reader_table[slot].pcsc.context, + reader_table[slot].rdrname, + PCSC_SHARE_EXCLUSIVE, + PCSC_PROTOCOL_T0|PCSC_PROTOCOL_T1, + &reader_table[slot].pcsc.card, + &reader_table[slot].pcsc.protocol); + if (err) + { + log_error ("pcsc_connect failed: %s (0x%lx)\n", + pcsc_error_string (err), err); + reader_table[slot].pcsc.card = 0; + return SW_HOST_CARD_IO_ERROR; + } + + + atrlen = 33; + nreader = sizeof reader - 1; + err = pcsc_status (reader_table[slot].pcsc.card, + reader, &nreader, + &card_state, &card_protocol, + reader_table[slot].atr, &atrlen); + if (err) + { + log_error ("pcsc_status failed: %s (0x%lx)\n", + pcsc_error_string (err), err); + reader_table[slot].atrlen = 0; + return SW_HOST_CARD_IO_ERROR; + } + if (atrlen >= DIM (reader_table[0].atr)) + log_bug ("ATR returned by pcsc_status is too large\n"); + reader_table[slot].atrlen = atrlen; + return 0; +#endif /* !NEED_PCSC_WRAPPER */ } + static int -reset_pcsc_reader (int slot) +pcsc_get_status (int slot, unsigned int *status) { - return SW_HOST_NOT_SUPPORTED; +#ifdef NEED_PCSC_WRAPPER + long err; + reader_table_t slotp; + size_t len, full_len; + int i, n; + unsigned char msgbuf[9]; + unsigned char buffer[12]; + + slotp = reader_table + slot; + + if (slotp->pcsc.req_fd == -1 + || slotp->pcsc.rsp_fd == -1 + || slotp->pcsc.pid == (pid_t)(-1) ) + { + log_error ("pcsc_get_status: pcsc-wrapper not running\n"); + return SW_HOST_CARD_IO_ERROR; + } + + msgbuf[0] = 0x04; /* STATUS command. */ + len = 0; + msgbuf[1] = (len >> 24); + msgbuf[2] = (len >> 16); + msgbuf[3] = (len >> 8); + msgbuf[4] = (len ); + if ( writen (slotp->pcsc.req_fd, msgbuf, 5) ) + { + log_error ("error sending PC/SC STATUS request: %s\n", + strerror (errno)); + goto command_failed; + } + + /* Read the response. */ + if ((i=readn (slotp->pcsc.rsp_fd, msgbuf, 9, &len)) || len != 9) + { + log_error ("error receiving PC/SC STATUS response: %s\n", + i? strerror (errno) : "premature EOF"); + goto command_failed; + } + len = (msgbuf[1] << 24) | (msgbuf[2] << 16) | (msgbuf[3] << 8 ) | msgbuf[4]; + if (msgbuf[0] != 0x81 || len < 4) + { + log_error ("invalid response header from PC/SC received\n"); + goto command_failed; + } + len -= 4; /* Already read the error code. */ + err = (msgbuf[5] << 24) | (msgbuf[6] << 16) | (msgbuf[7] << 8 ) | msgbuf[8]; + if (err) + { + log_error ("pcsc_status failed: %s (0x%lx)\n", + pcsc_error_string (err), err); + return SW_HOST_CARD_IO_ERROR; + } + + full_len = len; + + n = 8 < len ? 8 : len; + if ((i=readn (slotp->pcsc.rsp_fd, buffer, n, &len)) || len != 8) + { + log_error ("error receiving PC/SC STATUS response: %s\n", + i? strerror (errno) : "premature EOF"); + goto command_failed; + } + + full_len -= len; + /* Newer versions of the wrapper might send more status bytes. + Read them. */ + while (full_len) + { + unsigned char dummybuf[128]; + + n = full_len < DIM (dummybuf) ? full_len : DIM (dummybuf); + if ((i=readn (slotp->pcsc.rsp_fd, dummybuf, n, &len)) || len != n) + { + log_error ("error receiving PC/SC TRANSMIT response: %s\n", + i? strerror (errno) : "premature EOF"); + goto command_failed; + } + full_len -= n; + } + + /* We are lucky: The wrapper already returns the data in the + required format. */ + *status = buffer[3]; + + return 0; + + command_failed: + close (slotp->pcsc.req_fd); + close (slotp->pcsc.rsp_fd); + slotp->pcsc.req_fd = -1; + slotp->pcsc.rsp_fd = -1; + kill (slotp->pcsc.pid, SIGTERM); + slotp->pcsc.pid = (pid_t)(-1); + slotp->used = 0; + return -1; + +#else /*!NEED_PCSC_WRAPPER*/ + + long err; + struct pcsc_readerstate_s rdrstates[1]; + + memset (rdrstates, 0, sizeof *rdrstates); + rdrstates[0].reader = reader_table[slot].rdrname; + rdrstates[0].current_state = PCSC_STATE_UNAWARE; + err = pcsc_get_status_change (reader_table[slot].pcsc.context, + 0, + rdrstates, 1); + if (err == 0x8010000a) /* Timeout. */ + err = 0; + if (err) + { + log_error ("pcsc_get_status_change failed: %s (0x%lx)\n", + pcsc_error_string (err), err); + return SW_HOST_CARD_IO_ERROR; + } + + + /* log_debug */ + /* ("pcsc_get_status_change: %s%s%s%s%s%s%s%s%s%s\n", */ + /* (rdrstates[0].event_state & PCSC_STATE_IGNORE)? " ignore":"", */ + /* (rdrstates[0].event_state & PCSC_STATE_CHANGED)? " changed":"", */ + /* (rdrstates[0].event_state & PCSC_STATE_UNKNOWN)? " unknown":"", */ + /* (rdrstates[0].event_state & PCSC_STATE_UNAVAILABLE)?" unavail":"", */ + /* (rdrstates[0].event_state & PCSC_STATE_EMPTY)? " empty":"", */ + /* (rdrstates[0].event_state & PCSC_STATE_PRESENT)? " present":"", */ + /* (rdrstates[0].event_state & PCSC_STATE_ATRMATCH)? " atr":"", */ + /* (rdrstates[0].event_state & PCSC_STATE_EXCLUSIVE)? " excl":"", */ + /* (rdrstates[0].event_state & PCSC_STATE_INUSE)? " unuse":"", */ + /* (rdrstates[0].event_state & PCSC_STATE_MUTE)? " mute":"" ); */ + + *status = 0; + if ( (rdrstates[0].event_state & PCSC_STATE_PRESENT) ) + *status |= 2; + if ( !(rdrstates[0].event_state & PCSC_STATE_MUTE) ) + *status |= 4; + /* We indicate a useful card if it is not in use by another + application. This is because we only use exclusive access + mode. */ + if ( (*status & 6) == 6 + && !(rdrstates[0].event_state & PCSC_STATE_INUSE) ) + *status |= 1; + + return 0; +#endif /*!NEED_PCSC_WRAPPER*/ } @@ -889,6 +1210,8 @@ #else /*!NEED_PCSC_WRAPPER*/ pcsc_release_context (reader_table[slot].pcsc.context); + xfree (reader_table[slot].rdrname); + reader_table[slot].rdrname = NULL; reader_table[slot].used = 0; return 0; #endif /*!NEED_PCSC_WRAPPER*/ @@ -999,8 +1322,14 @@ slotp->pcsc.rsp_fd = rp[0]; /* Wait for the intermediate child to terminate. */ - while ( (i=pth_waitpid (pid, NULL, 0)) == -1 && errno == EINTR) +#ifdef USE_GNU_PTH +#define WAIT pth_waitpid +#else +#define WAIT waitpid +#endif + while ( (i=WAIT (pid, NULL, 0)) == -1 && errno == EINTR) ; +#undef X /* Now send the open request. */ msgbuf[0] = 0x01; /* OPEN command. */ @@ -1041,12 +1370,23 @@ log_error ("PC/SC OPEN failed: %s\n", pcsc_error_string (err)); goto command_failed; } + + slotp->last_status = 0; + + /* The open fucntion may return a zero for the ATR length to + indicate that no card is present. */ n = len; - if ((i=readn (slotp->pcsc.rsp_fd, slotp->atr, n, &len)) || len != n) + if (n) { - log_error ("error receiving PC/SC OPEN response: %s\n", - i? strerror (errno) : "premature EOF"); - goto command_failed; + if ((i=readn (slotp->pcsc.rsp_fd, slotp->atr, n, &len)) || len != n) + { + log_error ("error receiving PC/SC OPEN response: %s\n", + i? strerror (errno) : "premature EOF"); + goto command_failed; + } + /* If we got to here we know that a card is present + and usable. Thus remember this. */ + slotp->last_status = (1|2|4| 0x8000); } slotp->atrlen = len; @@ -1132,41 +1472,63 @@ p += strlen (p) + 1; } + reader_table[slot].rdrname = xtrymalloc (strlen (portstr? portstr : list)+1); + if (!reader_table[slot].rdrname) + { + log_error ("error allocating memory for reader name\n"); + pcsc_release_context (reader_table[slot].pcsc.context); + reader_table[slot].used = 0; + return -1; + } + strcpy (reader_table[slot].rdrname, portstr? portstr : list); + xfree (list); + err = pcsc_connect (reader_table[slot].pcsc.context, - portstr? portstr : list, + reader_table[slot].rdrname, PCSC_SHARE_EXCLUSIVE, PCSC_PROTOCOL_T0|PCSC_PROTOCOL_T1, &reader_table[slot].pcsc.card, &reader_table[slot].pcsc.protocol); - if (err) + if (err == 0x8010000c) /* No smartcard. */ + reader_table[slot].pcsc.card = 0; + else if (err) { log_error ("pcsc_connect failed: %s (0x%lx)\n", pcsc_error_string (err), err); pcsc_release_context (reader_table[slot].pcsc.context); + xfree (reader_table[slot].rdrname); + reader_table[slot].rdrname = NULL; reader_table[slot].used = 0; xfree (list); return -1; } - - atrlen = 32; - /* (We need to pass a dummy buffer. We use LIST because it ought to - be large enough.) */ - err = pcsc_status (reader_table[slot].pcsc.card, - list, &listlen, - &card_state, &card_protocol, - reader_table[slot].atr, &atrlen); - xfree (list); - if (err) + + reader_table[slot].atrlen = 0; + reader_table[slot].last_status = 0; + if (!err) { - log_error ("pcsc_status failed: %s (0x%lx)\n", - pcsc_error_string (err), err); - pcsc_release_context (reader_table[slot].pcsc.context); - reader_table[slot].used = 0; - return -1; + char reader[250]; + unsigned long readerlen; + + atrlen = 32; + readerlen = sizeof reader -1 ; + err = pcsc_status (reader_table[slot].pcsc.card, + reader, &readerlen, + &card_state, &card_protocol, + reader_table[slot].atr, &atrlen); + if (err) + log_error ("pcsc_status failed: %s (0x%lx) %lu\n", + pcsc_error_string (err), err, readerlen); + else + { + if (atrlen >= DIM (reader_table[0].atr)) + log_bug ("ATR returned by pcsc_status is too large\n"); + reader_table[slot].atrlen = atrlen; + /* If we got to here we know that a card is present + and usable. Thus remember this. */ + reader_table[slot].last_status = (1|2|4| 0x8000); + } } - if (atrlen >= DIM (reader_table[0].atr)) - log_bug ("ATR returned by pcsc_status is too large\n"); - reader_table[slot].atrlen = atrlen; reader_table[slot].close_reader = close_pcsc_reader; reader_table[slot].reset_reader = reset_pcsc_reader; @@ -1311,6 +1673,12 @@ slotp->atrlen = 0; err = 0; } + else + { + /* If we got to here we know that a card is present + and usable. Thus remember this. */ + reader_table[slot].last_status = (1|2|4| 0x8000); + } reader_table[slot].close_reader = close_ccid_reader; reader_table[slot].shutdown_reader = shutdown_ccid_reader; @@ -1971,11 +2339,21 @@ if (!pcsc_list_readers) pcsc_list_readers = dlsym (handle, "SCardListReadersA"); #endif + pcsc_get_status_change = dlsym (handle, "SCardGetStatusChange"); +#ifdef _WIN32 + if (!pcsc_get_status_change) + pcsc_get_status_change = dlsym (handle, "SCardGetStatusChangeA"); +#endif pcsc_connect = dlsym (handle, "SCardConnect"); #ifdef _WIN32 if (!pcsc_connect) pcsc_connect = dlsym (handle, "SCardConnectA"); #endif + pcsc_reconnect = dlsym (handle, "SCardReconnect"); +#ifdef _WIN32 + if (!pcsc_reconnect) + pcsc_reconnect = dlsym (handle, "SCardReconnectA"); +#endif pcsc_disconnect = dlsym (handle, "SCardDisconnect"); pcsc_status = dlsym (handle, "SCardStatus"); #ifdef _WIN32 @@ -1990,7 +2368,9 @@ if (!pcsc_establish_context || !pcsc_release_context || !pcsc_list_readers + || !pcsc_get_status_change || !pcsc_connect + || !pcsc_reconnect || !pcsc_disconnect || !pcsc_status || !pcsc_begin_transaction @@ -2001,11 +2381,13 @@ /* Note that set_timeout is currently not used and also not available under Windows. */ log_error ("apdu_open_reader: invalid PC/SC driver " - "(%d%d%d%d%d%d%d%d%d%d)\n", + "(%d%d%d%d%d%d%d%d%d%d%d%d)\n", !!pcsc_establish_context, !!pcsc_release_context, !!pcsc_list_readers, + !!pcsc_get_status_change, !!pcsc_connect, + !!pcsc_reconnect, !!pcsc_disconnect, !!pcsc_status, !!pcsc_begin_transaction, @@ -2106,9 +2488,17 @@ if ((sw = lock_slot (slot))) return sw; + reader_table[slot].last_status = 0; if (reader_table[slot].reset_reader) sw = reader_table[slot].reset_reader (slot); + if (!sw) + { + /* If we got to here we know that a card is present + and usable. Thus remember this. */ + reader_table[slot].last_status = (1|2|4| 0x8000); + } + unlock_slot (slot); return sw; } @@ -2143,7 +2533,16 @@ /* We don't have an ATR or a card is present though inactive: do a reset now. */ if (reader_table[slot].reset_reader) - sw = reader_table[slot].reset_reader (slot); + { + reader_table[slot].last_status = 0; + sw = reader_table[slot].reset_reader (slot); + if (!sw) + { + /* If we got to here we know that a card is present + and usable. Thus remember this. */ + reader_table[slot].last_status = (1|2|4| 0x8000); + } + } } } @@ -2205,7 +2604,22 @@ unlock_slot (slot); if (sw) - return sw; + { + reader_table[slot].last_status = 0; + return sw; + } + + /* Keep track of changes. We use one extra bit to test whether we + have checked the status at least once. */ + if ( s != (reader_table[slot].last_status & 0x07ff) + || !reader_table[slot].last_status ) + { + reader_table[slot].change_counter++; + /* Make sure that the ATR is invalid so that a reset will be by + activate. */ + reader_table[slot].atrlen = 0; + } + reader_table[slot].last_status = (s | 0x8000); if (status) *status = s; Index: gnupg/g10/apdu.h diff -u gnupg/g10/apdu.h:1.5 gnupg/g10/apdu.h:1.6 --- gnupg/g10/apdu.h:1.5 Mon Sep 20 15:15:37 2004 +++ gnupg/g10/apdu.h Wed Oct 20 11:39:56 2004 @@ -16,6 +16,8 @@ * 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 + * + * $Id: apdu.h,v 1.6 2004/10/20 09:39:56 wk Exp $ */ #ifndef APDU_H Index: gnupg/g10/app-common.h diff -u gnupg/g10/app-common.h:1.5 gnupg/g10/app-common.h:1.6 --- gnupg/g10/app-common.h:1.5 Thu Sep 23 15:32:31 2004 +++ gnupg/g10/app-common.h Wed Oct 20 11:39:56 2004 @@ -16,6 +16,8 @@ * 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 + * + * $Id: app-common.h,v 1.6 2004/10/20 09:39:56 wk Exp $ */ #ifndef GNUPG_SCD_APP_COMMON_H @@ -95,6 +97,7 @@ /*-- app.c --*/ app_t select_application (ctrl_t ctrl, int slot, const char *name); void release_application (app_t app); +int app_munge_serialno (app_t app); int app_get_serial_and_stamp (app_t app, char **serial, time_t *stamp); int app_write_learn_status (app_t app, ctrl_t ctrl); int app_readcert (app_t app, const char *certid, @@ -143,7 +146,6 @@ unsigned char **fpr1, unsigned char **fpr2, unsigned char **fpr3); -#endif /* GNUPG_MAJOR_VERSION != 1 */ int app_openpgp_storekey (app_t app, int keyno, unsigned char *template, size_t template_len, time_t created_at, @@ -154,16 +156,18 @@ int app_openpgp_readkey (app_t app, int keyno, unsigned char **m, size_t *mlen, unsigned char **e, size_t *elen); -#if GNUPG_MAJOR_VERSION == 1 -#else /*-- app-nks.c --*/ int app_select_nks (app_t app); /*-- app-dinsig.c --*/ int app_select_dinsig (app_t app); +/*-- app-p15.c --*/ +int app_select_p15 (app_t app); + + +#endif -#endif /* GNUPG_MAJOR_VERSION != 1 */ #endif /*GNUPG_SCD_APP_COMMON_H*/ Index: gnupg/g10/app-openpgp.c diff -u gnupg/g10/app-openpgp.c:1.15 gnupg/g10/app-openpgp.c:1.16 --- gnupg/g10/app-openpgp.c:1.15 Fri Oct 15 11:55:39 2004 +++ gnupg/g10/app-openpgp.c Wed Oct 20 11:39:56 2004 @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: app-openpgp.c,v 1.15 2004/10/15 09:55:39 werner Exp $ + * $Id: app-openpgp.c,v 1.16 2004/10/20 09:39:56 wk Exp $ */ #include Index: gnupg/g10/ccid-driver.c diff -u gnupg/g10/ccid-driver.c:1.18 gnupg/g10/ccid-driver.c:1.19 --- gnupg/g10/ccid-driver.c:1.18 Fri Oct 15 15:16:57 2004 +++ gnupg/g10/ccid-driver.c Wed Oct 20 11:39:56 2004 @@ -52,7 +52,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: ccid-driver.c,v 1.18 2004/10/15 13:16:57 werner Exp $ + * $Id: ccid-driver.c,v 1.19 2004/10/20 09:39:56 wk Exp $ */ @@ -1307,6 +1307,8 @@ /* Note that we ignore the error code on purpose. */ bulk_in (handle, msg, sizeof msg, &msglen, RDR_to_PC_Parameters, seqno); + handle->t1_ns = 0; + handle->t1_nr = 0; /* Send an S-Block with our maximun IFSD to the CCID. */ if (!handle->auto_ifsd) Index: gnupg/g10/ccid-driver.h diff -u gnupg/g10/ccid-driver.h:1.8 gnupg/g10/ccid-driver.h:1.9 --- gnupg/g10/ccid-driver.h:1.8 Mon Oct 11 10:44:34 2004 +++ gnupg/g10/ccid-driver.h Wed Oct 20 11:39:56 2004 @@ -50,6 +50,8 @@ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED * OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $Id: ccid-driver.h,v 1.9 2004/10/20 09:39:56 wk Exp $ */ #ifndef CCID_DRIVER_H Index: gnupg/g10/iso7816.c diff -u gnupg/g10/iso7816.c:1.4 gnupg/g10/iso7816.c:1.5 --- gnupg/g10/iso7816.c:1.4 Thu Sep 9 20:18:34 2004 +++ gnupg/g10/iso7816.c Wed Oct 20 11:39:56 2004 @@ -16,6 +16,8 @@ * 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 + * + * $Id: iso7816.c,v 1.5 2004/10/20 09:39:56 wk Exp $ */ #include @@ -103,6 +105,17 @@ return gpg_error (ec); } +/* Map a status word from the APDU layer to a gpg-error code. */ +gpg_error_t +iso7816_map_sw (int sw) +{ + /* All APDU functions should return 0x9000 on success but for + historical reasons of the implementation some return 0 to + indicate success. We allow for that here. */ + return sw? map_sw (sw) : 0; +} + + /* This function is specialized version of the SELECT FILE command. SLOT is the card and reader as created for example by apdu_open_reader (), AID is a buffer of size AIDLEN holding the @@ -113,15 +126,8 @@ gpg_error_t iso7816_select_application (int slot, const char *aid, size_t aidlen) { - static char const openpgp_aid[] = { 0xD2, 0x76, 0x00, 0x01, 0x24, 0x01 }; int sw; - int p1 = 0x0C; /* No FCI to be returned. */ - - if (aidlen == sizeof openpgp_aid - && !memcmp (aid, openpgp_aid, sizeof openpgp_aid)) - p1 = 0; /* The current openpgp cards don't allow 0x0c. */ - - sw = apdu_send_simple (slot, 0x00, CMD_SELECT_FILE, 4, p1, aidlen, aid); + sw = apdu_send_simple (slot, 0x00, CMD_SELECT_FILE, 4, 0, aidlen, aid); return map_sw (sw); } Index: gnupg/g10/iso7816.h diff -u gnupg/g10/iso7816.h:1.4 gnupg/g10/iso7816.h:1.5 --- gnupg/g10/iso7816.h:1.4 Mon Oct 11 10:44:34 2004 +++ gnupg/g10/iso7816.h Wed Oct 20 11:39:56 2004 @@ -16,6 +16,8 @@ * 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 + * + * $Id: iso7816.h,v 1.5 2004/10/20 09:39:56 wk Exp $ */ #ifndef ISO7816_H From cvs at cvs.gnupg.org Thu Oct 21 03:07:32 2004 From: cvs at cvs.gnupg.org (cvs user dshaw) Date: Thu Oct 21 03:07:44 2004 Subject: gnupg/g10 (ChangeLog g10.c) Message-ID: Date: Thursday, October 21, 2004 @ 03:10:49 Author: dshaw Path: /cvs/gnupg/gnupg/g10 Modified: ChangeLog g10.c * g10.c (parse_list_options): Fix non-constant initializer so we can build with C89. -----------+ ChangeLog | 15 +++++---------- g10.c | 7 ++++++- 2 files changed, 11 insertions(+), 11 deletions(-) Index: gnupg/g10/ChangeLog diff -u gnupg/g10/ChangeLog:1.624 gnupg/g10/ChangeLog:1.625 --- gnupg/g10/ChangeLog:1.624 Wed Oct 20 11:39:56 2004 +++ gnupg/g10/ChangeLog Thu Oct 21 03:10:48 2004 @@ -1,16 +1,11 @@ -2004-10-20 Werner Koch +2004-10-20 David Shaw - * apdu.c (apdu_open_reader): Load pcsc_get_status_change fucntion. - (pcsc_get_status): Implemented. - (reset_pcsc_reader): Implemented. - (open_pcsc_reader): Succeed even with no card inserted. - (open_ccid_reader): Set LAST_STATUS. + * g10.c (parse_list_options): Fix non-constant initializer so we + can build with C89. - * iso7816.c (iso7816_select_application): Always use 0 for P1. +2004-10-17 David Shaw -2004-10-18 Werner Koch - - * ccid-driver.c (ccid_get_atr): Reset T=1 state info. + * keylist.c (print_one_subpacket): The flags field should be hex. 2004-10-17 Werner Koch Index: gnupg/g10/g10.c diff -u gnupg/g10/g10.c:1.285 gnupg/g10/g10.c:1.286 --- gnupg/g10/g10.c:1.285 Wed Oct 13 20:10:06 2004 +++ gnupg/g10/g10.c Thu Oct 21 03:10:49 2004 @@ -1463,10 +1463,15 @@ {"show-unusable-subkeys",LIST_SHOW_UNUSABLE_SUBKEYS,NULL}, {"show-keyring",LIST_SHOW_KEYRING,NULL}, {"show-sig-expire",LIST_SHOW_SIG_EXPIRE,NULL}, - {"show-sig-subpackets",LIST_SHOW_SIG_SUBPACKETS,&subpackets}, + {"show-sig-subpackets",LIST_SHOW_SIG_SUBPACKETS,NULL}, {NULL,0,NULL} }; + /* C99 allows for non-constant initializers, but we'd like to + compile everywhere, so fill in the show-sig-subpackets argument + here. */ + lopts[12].value=&subpackets; + if(parse_options(str,&opt.list_options,lopts,1)) { if(opt.list_options&LIST_SHOW_SIG_SUBPACKETS) From cvs at cvs.gnupg.org Thu Oct 21 18:53:03 2004 From: cvs at cvs.gnupg.org (cvs user wk) Date: Thu Oct 21 18:53:22 2004 Subject: gnupg (12 files) Message-ID: Date: Thursday, October 21, 2004 @ 18:56:23 Author: wk Path: /cvs/gnupg/gnupg Modified: AUTHORS ChangeLog NEWS configure.ac g10/ChangeLog g10/app-common.h g10/app-openpgp.c g10/card-util.c include/ChangeLog include/util.h util/ChangeLog Removed: util/vasprintf.c * configure.ac: Remove the check for asprintf * app-common.h (app_openpgp_storekey: Add prototype. * app-openpgp.c (do_sign): Replace asprintf by direct allocation. This avoids problems with missing vasprintf implementations. * card-util.c (generate_card_keys): Add a #warning for gnupg 1.9 and use the same string there. * util.h [!HAVE_VASPRINTF]: Removed prototype. * vasprintf.c: Removed. It was used only at one place and I don't want to get into build problems in 1.4. -------------------+ AUTHORS | 5 + ChangeLog | 4 + NEWS | 2 configure.ac | 4 - g10/ChangeLog | 10 +++ g10/app-common.h | 9 ++ g10/app-openpgp.c | 9 ++ g10/card-util.c | 6 - include/ChangeLog | 4 + include/util.h | 9 -- util/ChangeLog | 5 + util/vasprintf.c | 169 ---------------------------------------------------- 12 files changed, 50 insertions(+), 186 deletions(-) Index: gnupg/AUTHORS diff -u gnupg/AUTHORS:1.35 gnupg/AUTHORS:1.36 --- gnupg/AUTHORS:1.35 Fri Oct 1 12:11:42 2004 +++ gnupg/AUTHORS Thu Oct 21 18:56:22 2004 @@ -9,6 +9,8 @@ Birger Langkjer Translations [da] +Britov Ivanovich Translations [ru] + Daniel Resare Translations [sv] David Shaw Assigns past and future changes. @@ -58,6 +60,9 @@ Paul Eggert (configuration macros for LFS) +Pavel I. Shajdo Translations [ru] + (man pages) + Pedro Morais Translations [pt_PT] Rémi Guyomarch Assigns past and future changes. Index: gnupg/ChangeLog diff -u gnupg/ChangeLog:1.213 gnupg/ChangeLog:1.214 --- gnupg/ChangeLog:1.213 Fri Oct 15 15:16:58 2004 +++ gnupg/ChangeLog Thu Oct 21 18:56:22 2004 @@ -1,3 +1,7 @@ +2004-10-21 Werner Koch + + * configure.ac: Remove the check for asprintf + 2004-10-15 Werner Koch Released 1.3.91. Index: gnupg/NEWS diff -u gnupg/NEWS:1.219 gnupg/NEWS:1.220 --- gnupg/NEWS:1.219 Fri Oct 15 15:46:19 2004 +++ gnupg/NEWS Thu Oct 21 18:56:22 2004 @@ -1,5 +1,7 @@ Noteworthy changes in version 1.3.92 ------------------------------------------------- + + * Added Russian man page. Thanks to Pawel I. Shajdo. Noteworthy changes in version 1.3.91 (2004-10-15) Index: gnupg/configure.ac diff -u gnupg/configure.ac:1.105 gnupg/configure.ac:1.106 --- gnupg/configure.ac:1.105 Fri Oct 15 15:46:19 2004 +++ gnupg/configure.ac Thu Oct 21 18:56:22 2004 @@ -19,7 +19,7 @@ dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA dnl dnl (Process this file with autoconf to produce a configure script.) -dnlAC_REVISION($Revision: 1.105 $)dnl +dnlAC_REVISION($Revision: 1.106 $)dnl AC_PREREQ(2.59) min_automake_version="1.7.9" @@ -799,7 +799,7 @@ AC_CHECK_FUNCS(atexit raise getpagesize strftime nl_langinfo setlocale) AC_CHECK_FUNCS(waitpid wait4 sigaction sigprocmask rand pipe stat getaddrinfo) AC_REPLACE_FUNCS(mkdtemp timegm) -AC_REPLACE_FUNCS(vasprintf) + AC_CHECK_TYPES([struct sigaction, sigset_t],,,[#include ]) # See if getopt is in libiberty. This is of course not optimal since Index: gnupg/g10/ChangeLog diff -u gnupg/g10/ChangeLog:1.625 gnupg/g10/ChangeLog:1.626 --- gnupg/g10/ChangeLog:1.625 Thu Oct 21 03:10:48 2004 +++ gnupg/g10/ChangeLog Thu Oct 21 18:56:22 2004 @@ -1,3 +1,13 @@ +2004-10-21 Werner Koch + + * app-common.h (app_openpgp_storekey: Add prototype. + + * app-openpgp.c (do_sign): Replace asprintf by direct allocation. + This avoids problems with missing vasprintf implementations. + + * card-util.c (generate_card_keys): Add a #warning for gnupg 1.9 + and use the same string there. + 2004-10-20 David Shaw * g10.c (parse_list_options): Fix non-constant initializer so we Index: gnupg/g10/app-common.h diff -u gnupg/g10/app-common.h:1.6 gnupg/g10/app-common.h:1.7 --- gnupg/g10/app-common.h:1.6 Wed Oct 20 11:39:56 2004 +++ gnupg/g10/app-common.h Thu Oct 21 18:56:22 2004 @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: app-common.h,v 1.6 2004/10/20 09:39:56 wk Exp $ + * $Id: app-common.h,v 1.7 2004/10/21 16:56:22 wk Exp $ */ #ifndef GNUPG_SCD_APP_COMMON_H @@ -88,6 +88,13 @@ #if GNUPG_MAJOR_VERSION == 1 int app_select_openpgp (app_t app); int app_get_serial_and_stamp (app_t app, char **serial, time_t *stamp); +int app_openpgp_storekey (app_t app, int keyno, + unsigned char *template, size_t template_len, + time_t created_at, + const unsigned char *m, size_t mlen, + const unsigned char *e, size_t elen, + int (*pincb)(void*, const char *, char **), + void *pincb_arg); #else /*-- app-help.c --*/ gpg_error_t app_help_get_keygrip_string (ksba_cert_t cert, char *hexkeygrip); Index: gnupg/g10/app-openpgp.c diff -u gnupg/g10/app-openpgp.c:1.16 gnupg/g10/app-openpgp.c:1.17 --- gnupg/g10/app-openpgp.c:1.16 Wed Oct 20 11:39:56 2004 +++ gnupg/g10/app-openpgp.c Thu Oct 21 18:56:22 2004 @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: app-openpgp.c,v 1.16 2004/10/20 09:39:56 wk Exp $ + * $Id: app-openpgp.c,v 1.17 2004/10/21 16:56:22 wk Exp $ */ #include @@ -1298,10 +1298,15 @@ { char *prompt; - if (asprintf (&prompt, _("PIN [sigs done: %lu]"), sigcount) < 0) +#define PROMPTSTRING _("PIN [sigs done: %lu]") + + prompt = malloc (strlen (PROMPTSTRING) + 50); + if (!prompt) return gpg_error_from_errno (errno); + sprintf (prompt, PROMPTSTRING, sigcount); rc = pincb (pincb_arg, prompt, &pinvalue); free (prompt); +#undef PROMPTSTRING } if (rc) { Index: gnupg/g10/card-util.c diff -u gnupg/g10/card-util.c:1.17 gnupg/g10/card-util.c:1.18 --- gnupg/g10/card-util.c:1.17 Wed Oct 13 20:10:06 2004 +++ gnupg/g10/card-util.c Thu Oct 21 18:56:22 2004 @@ -895,10 +895,10 @@ m_free(answer); } #else - /* Does 1.9 have answer_is_yes_no_default() ? */ - want_backup = !(cpr_get_answer_is_yes + want_backup = cpr_get_answer_is_yes ( "cardedit.genkeys.backup_enc", - _("Inhibit off-card backup of encryption key? (y/N) "))); + _("Make off-card backup of encryption key? (Y/n) ")); +#warning we need answer_is_yes_no_default() #endif if ( (info.fpr1valid && !fpr_is_zero (info.fpr1)) Index: gnupg/include/ChangeLog diff -u gnupg/include/ChangeLog:1.76 gnupg/include/ChangeLog:1.77 --- gnupg/include/ChangeLog:1.76 Fri Oct 15 11:39:31 2004 +++ gnupg/include/ChangeLog Thu Oct 21 18:56:22 2004 @@ -1,3 +1,7 @@ +2004-10-21 Werner Koch + + * util.h [!HAVE_VASPRINTF]: Removed prototype. + 2004-10-15 Werner Koch * util.h [!HAVE_VASPRINTF]: Add asprintf prototype. Index: gnupg/include/util.h diff -u gnupg/include/util.h:1.77 gnupg/include/util.h:1.78 --- gnupg/include/util.h:1.77 Fri Oct 15 11:39:31 2004 +++ gnupg/include/util.h Thu Oct 21 18:56:22 2004 @@ -245,15 +245,6 @@ /*-- Replacement functions from funcname.c --*/ -#if !HAVE_VASPRINTF -int asprintf (char **result, const char *format, ...) -#if defined (__riscos__) \ - || (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 5 )) - __attribute__ ((format (printf,2,3))) -#endif - ; - -#endif /******** some macros ************/ Index: gnupg/util/ChangeLog diff -u gnupg/util/ChangeLog:1.160 gnupg/util/ChangeLog:1.161 --- gnupg/util/ChangeLog:1.160 Mon Oct 18 17:51:43 2004 +++ gnupg/util/ChangeLog Thu Oct 21 18:56:21 2004 @@ -1,3 +1,8 @@ +2004-10-21 Werner Koch + + * vasprintf.c: Removed. It was used only at one place and I don't + want to get into build problems in 1.4. + 2004-10-18 David Shaw * http.c (connect_server, send_request): Use the URI scheme as the Index: gnupg/util/vasprintf.c diff -u gnupg/util/vasprintf.c:1.1 gnupg/util/vasprintf.c:removed --- gnupg/util/vasprintf.c:1.1 Fri Oct 15 11:38:27 2004 +++ gnupg/util/vasprintf.c Thu Oct 21 18:56:23 2004 @@ -1,169 +0,0 @@ -/* Like vsprintf but provides a pointer to malloc'd storage, which must - be freed by the caller. - Copyright (C) 1994, 2002 Free Software Foundation, Inc. - -This file is part of the libiberty library. -Libiberty 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 of the License, or (at your option) any later version. - -Libiberty 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 libiberty; see the file COPYING.LIB. 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 -#include -#include -#include - -#ifdef TEST -int global_total_width; -#endif - -int -vasprintf (char **result, const char *format, va_list args) -{ - const char *p = format; - /* Add one to make sure that it is never zero, which might cause malloc - to return NULL. */ - int total_width = strlen (format) + 1; - va_list ap; - -#ifdef va_copy - va_copy (ap, args); -#else -#ifdef __va_copy - __va_copy (ap, args); -#else - memcpy (&ap, args, sizeof (va_list)); -#endif /* __va_copy */ -#endif /* va_copy */ - - while (*p != '\0') - { - if (*p++ == '%') - { - while (strchr ("-+ #0", *p)) - ++p; - if (*p == '*') - { - ++p; - total_width += abs (va_arg (ap, int)); - } - else - total_width += strtoul (p, (char**)&p, 10); - if (*p == '.') - { - ++p; - if (*p == '*') - { - ++p; - total_width += abs (va_arg (ap, int)); - } - else - total_width += strtoul (p, (char**)&p, 10); - } - while (strchr ("hlL", *p)) - ++p; - /* Should be big enough for any format specifier except %s - and floats. */ - total_width += 30; - switch (*p) - { - case 'd': - case 'i': - case 'o': - case 'u': - case 'x': - case 'X': - case 'c': - (void) va_arg (ap, int); - break; - case 'f': - case 'e': - case 'E': - case 'g': - case 'G': - (void) va_arg (ap, double); - /* Since an ieee double can have an exponent of 307, we'll - make the buffer wide enough to cover the gross case. */ - total_width += 307; - break; - case 's': - { - char *tmp = va_arg (ap, char *); - if (tmp) - total_width += strlen (tmp); - else /* in case the vsprintf does prints a text */ - total_width += 25; /* e.g. "(null pointer reference)" */ - } - break; - case 'p': - case 'n': - (void) va_arg (ap, char *); - break; - } - } - } -#ifdef TEST - global_total_width = total_width; -#endif - *result = malloc (total_width); - if (*result != NULL) - return vsprintf (*result, format, args); - else - return 0; -} - - -int -asprintf (char **buf, const char *fmt, ...) -{ - int status; - va_list ap; - - va_start (ap, fmt); - status = vasprintf (buf, fmt, ap); - va_end (ap); - return status; -} - - -#ifdef TEST -void -checkit (const char* format, ...) -{ - va_list args; - char *result; - - va_start (args, format); - vasprintf (&result, format, args); - if (strlen (result) < global_total_width) - printf ("PASS: "); - else - printf ("FAIL: "); - printf ("%d %s\n", global_total_width, result); -} - -int -main (void) -{ - checkit ("%d", 0x12345678); - checkit ("%200d", 5); - checkit ("%.300d", 6); - checkit ("%100.150d", 7); - checkit ("%s", "jjjjjjjjjiiiiiiiiiiiiiiioooooooooooooooooppppppppppppaa\n\ -777777777777777777333333333333366666666666622222222222777777777777733333"); - checkit ("%f%s%d%s", 1.0, "foo", 77, "asdjffffffffffffffiiiiiiiiiiixxxxx"); -} -#endif /* TEST */ From cvs at cvs.gnupg.org Thu Oct 21 21:11:44 2004 From: cvs at cvs.gnupg.org (cvs user dshaw) Date: Thu Oct 21 21:11:52 2004 Subject: gnupg (ChangeLog acinclude.m4) Message-ID: Date: Thursday, October 21, 2004 @ 21:15:07 Author: dshaw Path: /cvs/gnupg/gnupg Modified: ChangeLog acinclude.m4 * acinclude.m4: aclocal 1.9 wants quoting on AC_DEFUN arguments. --------------+ ChangeLog | 4 ++++ acinclude.m4 | 20 ++++++++++---------- 2 files changed, 14 insertions(+), 10 deletions(-) Index: gnupg/ChangeLog diff -u gnupg/ChangeLog:1.214 gnupg/ChangeLog:1.215 --- gnupg/ChangeLog:1.214 Thu Oct 21 18:56:22 2004 +++ gnupg/ChangeLog Thu Oct 21 21:15:07 2004 @@ -1,3 +1,7 @@ +2004-10-21 David Shaw + + * acinclude.m4: aclocal 1.9 wants quoting on AC_DEFUN arguments. + 2004-10-21 Werner Koch * configure.ac: Remove the check for asprintf Index: gnupg/acinclude.m4 diff -u gnupg/acinclude.m4:1.40 gnupg/acinclude.m4:1.41 --- gnupg/acinclude.m4:1.40 Thu May 20 05:19:25 2004 +++ gnupg/acinclude.m4 Thu Oct 21 21:15:07 2004 @@ -28,7 +28,7 @@ dnl GNUPG_CHECK_TYPEDEF(TYPE, HAVE_NAME) dnl Check whether a typedef exists and create a #define $2 if it exists dnl -AC_DEFUN(GNUPG_CHECK_TYPEDEF, +AC_DEFUN([GNUPG_CHECK_TYPEDEF], [ AC_MSG_CHECKING(for $1 typedef) AC_CACHE_VAL(gnupg_cv_typedef_$1, [AC_TRY_COMPILE([#define _GNU_SOURCE 1 @@ -46,7 +46,7 @@ dnl GNUPG_CHECK_GNUMAKE dnl -AC_DEFUN(GNUPG_CHECK_GNUMAKE, +AC_DEFUN([GNUPG_CHECK_GNUMAKE], [ if ${MAKE-make} --version 2>/dev/null | grep '^GNU ' >/dev/null 2>&1; then : @@ -64,7 +64,7 @@ dnl GNUPG_CHECK_FAQPROG dnl -AC_DEFUN(GNUPG_CHECK_FAQPROG, +AC_DEFUN([GNUPG_CHECK_FAQPROG], [ AC_MSG_CHECKING(for faqprog.pl) if faqprog.pl -V 2>/dev/null | grep '^faqprog.pl ' >/dev/null 2>&1; then working_faqprog=yes @@ -91,7 +91,7 @@ dnl GNUPG_CHECK_DOCBOOK_TO_TEXI dnl -AC_DEFUN(GNUPG_CHECK_DOCBOOK_TO_TEXI, +AC_DEFUN([GNUPG_CHECK_DOCBOOK_TO_TEXI], [ AC_CHECK_PROG(DOCBOOK_TO_TEXI, docbook2texi, yes, no) AC_MSG_CHECKING(for sgml to texi tools) @@ -109,7 +109,7 @@ dnl GNUPG_CHECK_ENDIAN dnl define either LITTLE_ENDIAN_HOST or BIG_ENDIAN_HOST dnl -define(GNUPG_CHECK_ENDIAN, +define([GNUPG_CHECK_ENDIAN], [ tmp_assumed_endian=big if test "$cross_compiling" = yes; then @@ -458,7 +458,7 @@ ################################################################ # GNUPG_PROG_NM - find the path to a BSD-compatible name lister -AC_DEFUN(GNUPG_PROG_NM, +AC_DEFUN([GNUPG_PROG_NM], [AC_MSG_CHECKING([for BSD-compatible nm]) AC_CACHE_VAL(ac_cv_path_NM, [if test -n "$NM"; then @@ -492,7 +492,7 @@ # GNUPG_SYS_NM_PARSE - Check for command ro grab the raw symbol name followed # by C symbol name from nm. -AC_DEFUN(GNUPG_SYS_NM_PARSE, +AC_DEFUN([GNUPG_SYS_NM_PARSE], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([GNUPG_PROG_NM])dnl # Check for command to grab the raw symbol name followed by C symbol from nm. @@ -659,14 +659,14 @@ ]) # GNUPG_SYS_LIBTOOL_CYGWIN32 - find tools needed on cygwin32 -AC_DEFUN(GNUPG_SYS_LIBTOOL_CYGWIN32, +AC_DEFUN([GNUPG_SYS_LIBTOOL_CYGWIN32], [AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(AS, as, false) ]) # GNUPG_SYS_SYMBOL_UNDERSCORE - does the compiler prefix global symbols # with an underscore? -AC_DEFUN(GNUPG_SYS_SYMBOL_UNDERSCORE, +AC_DEFUN([GNUPG_SYS_SYMBOL_UNDERSCORE], [tmp_do_check="no" case "${target}" in i386-emx-os2 | i[3456]86-pc-os2*emx | i386-pc-msdosdjgpp) @@ -727,7 +727,7 @@ dnl Stolen from gcc dnl Define MKDIR_TAKES_ONE_ARG if mkdir accepts only one argument instead dnl of the usual 2. -AC_DEFUN(GNUPG_FUNC_MKDIR_TAKES_ONE_ARG, +AC_DEFUN([GNUPG_FUNC_MKDIR_TAKES_ONE_ARG], [AC_CHECK_HEADERS(sys/stat.h unistd.h direct.h) AC_CACHE_CHECK([if mkdir takes one argument], gnupg_cv_mkdir_takes_one_arg, [AC_TRY_COMPILE([ From cvs at cvs.gnupg.org Thu Oct 21 21:15:25 2004 From: cvs at cvs.gnupg.org (cvs user dshaw) Date: Thu Oct 21 21:15:32 2004 Subject: gnupg/g10 (ChangeLog app-openpgp.c g10.c mainproc.c options.h) Message-ID: Date: Thursday, October 21, 2004 @ 21:18:48 Author: dshaw Path: /cvs/gnupg/gnupg/g10 Modified: ChangeLog app-openpgp.c g10.c mainproc.c options.h * options.h, g10.c (main), mainproc.c (check_sig_and_print): Rename verify-option show-validity to show-uid-validity to match the similar list-option. * app-openpgp.c (verify_chv3): Fix typo. ---------------+ ChangeLog | 10 +++++++++- app-openpgp.c | 4 ++-- g10.c | 7 ++++--- mainproc.c | 4 ++-- options.h | 2 +- 5 files changed, 18 insertions(+), 9 deletions(-) Index: gnupg/g10/ChangeLog diff -u gnupg/g10/ChangeLog:1.626 gnupg/g10/ChangeLog:1.627 --- gnupg/g10/ChangeLog:1.626 Thu Oct 21 18:56:22 2004 +++ gnupg/g10/ChangeLog Thu Oct 21 21:18:47 2004 @@ -1,6 +1,14 @@ +2004-10-21 David Shaw + + * options.h, g10.c (main), mainproc.c (check_sig_and_print): + Rename verify-option show-validity to show-uid-validity to match + the similar list-option. + + * app-openpgp.c (verify_chv3): Fix typo. + 2004-10-21 Werner Koch - * app-common.h (app_openpgp_storekey: Add prototype. + * app-common.h (app_openpgp_storekey): Add prototype. * app-openpgp.c (do_sign): Replace asprintf by direct allocation. This avoids problems with missing vasprintf implementations. Index: gnupg/g10/app-openpgp.c diff -u gnupg/g10/app-openpgp.c:1.17 gnupg/g10/app-openpgp.c:1.18 --- gnupg/g10/app-openpgp.c:1.17 Thu Oct 21 18:56:22 2004 +++ gnupg/g10/app-openpgp.c Thu Oct 21 21:18:47 2004 @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: app-openpgp.c,v 1.17 2004/10/21 16:56:22 wk Exp $ + * $Id: app-openpgp.c,v 1.18 2004/10/21 19:18:47 dshaw Exp $ */ #include @@ -824,7 +824,7 @@ if (strlen (pinvalue) < 6) { - log_error (_("prassphrase (CHV%d) is too short;" + log_error (_("passphrase (CHV%d) is too short;" " minimum length is %d\n"), 3, 6); xfree (pinvalue); return gpg_error (GPG_ERR_BAD_PIN); Index: gnupg/g10/g10.c diff -u gnupg/g10/g10.c:1.286 gnupg/g10/g10.c:1.287 --- gnupg/g10/g10.c:1.286 Thu Oct 21 03:10:49 2004 +++ gnupg/g10/g10.c Thu Oct 21 21:18:47 2004 @@ -1468,8 +1468,9 @@ }; /* C99 allows for non-constant initializers, but we'd like to - compile everywhere, so fill in the show-sig-subpackets argument - here. */ + compile everywhere, so fill in the show-sig-subpackets argument + here. Note that if the parse_options array changes, we'll have + to change the subscript here. */ lopts[12].value=&subpackets; if(parse_options(str,&opt.list_options,lopts,1)) @@ -2328,7 +2329,7 @@ {"show-standard-notations",VERIFY_SHOW_STD_NOTATIONS,NULL}, {"show-user-notations",VERIFY_SHOW_USER_NOTATIONS,NULL}, {"show-keyserver-urls",VERIFY_SHOW_KEYSERVER_URLS,NULL}, - {"show-validity",VERIFY_SHOW_VALIDITY,NULL}, + {"show-uid-validity",VERIFY_SHOW_UID_VALIDITY,NULL}, {"show-unusable-uids",VERIFY_SHOW_UNUSABLE_UIDS,NULL}, {NULL,0,NULL} }; Index: gnupg/g10/mainproc.c diff -u gnupg/g10/mainproc.c:1.160 gnupg/g10/mainproc.c:1.161 --- gnupg/g10/mainproc.c:1.160 Mon Oct 11 23:08:37 2004 +++ gnupg/g10/mainproc.c Thu Oct 21 21:18:47 2004 @@ -1485,7 +1485,7 @@ m_free(p); - if(opt.verify_options&VERIFY_SHOW_VALIDITY) + if(opt.verify_options&VERIFY_SHOW_UID_VALIDITY) fprintf(log_stream()," [%s]\n",trust_value_to_string(valid)); else fputs("\n", log_stream() ); @@ -1568,7 +1568,7 @@ log_info(_(" aka \"%s\""),p); m_free(p); - if(opt.verify_options&VERIFY_SHOW_VALIDITY) + if(opt.verify_options&VERIFY_SHOW_UID_VALIDITY) { const char *valid; if(un->pkt->pkt.user_id->is_revoked) Index: gnupg/g10/options.h diff -u gnupg/g10/options.h:1.125 gnupg/g10/options.h:1.126 --- gnupg/g10/options.h:1.125 Wed Oct 13 17:34:52 2004 +++ gnupg/g10/options.h Thu Oct 21 21:18:47 2004 @@ -272,7 +272,7 @@ #define VERIFY_SHOW_USER_NOTATIONS (1<<3) #define VERIFY_SHOW_NOTATIONS (VERIFY_SHOW_STD_NOTATIONS|VERIFY_SHOW_USER_NOTATIONS) #define VERIFY_SHOW_KEYSERVER_URLS (1<<4) -#define VERIFY_SHOW_VALIDITY (1<<5) +#define VERIFY_SHOW_UID_VALIDITY (1<<5) #define VERIFY_SHOW_UNUSABLE_UIDS (1<<6) #define KEYSERVER_INCLUDE_REVOKED (1<<0) From cvs at cvs.gnupg.org Fri Oct 22 11:36:23 2004 From: cvs at cvs.gnupg.org (cvs user wk) Date: Fri Oct 22 11:36:35 2004 Subject: GNUPG-1-9-BRANCH gnupg/agent (ChangeLog gpg-agent.c) Message-ID: Date: Friday, October 22, 2004 @ 11:39:47 Author: wk Path: /cvs/gnupg/gnupg/agent Tag: GNUPG-1-9-BRANCH Modified: ChangeLog gpg-agent.c (parse_rereadable_options): Return "not handled" when the log file has not beend hadled. This is will let the main option processing continue. Fixed a bug introduced on 2004-09-4 resulting in logging to stderr until a HUP has been given. (main): Don't close the listen FD. -------------+ ChangeLog | 8 ++++++++ gpg-agent.c | 12 +++++++----- 2 files changed, 15 insertions(+), 5 deletions(-) Index: gnupg/agent/ChangeLog diff -u gnupg/agent/ChangeLog:1.59.2.42 gnupg/agent/ChangeLog:1.59.2.43 --- gnupg/agent/ChangeLog:1.59.2.42 Thu Sep 30 16:34:33 2004 +++ gnupg/agent/ChangeLog Fri Oct 22 11:39:47 2004 @@ -1,3 +1,11 @@ +2004-10-22 Werner Koch + + * gpg-agent.c (parse_rereadable_options): Return "not handled" + when the log file has not beend hadled. This is will let the main + option processing continue. Fixed a bug introduced on 2004-09-4 + resulting in logging to stderr until a HUP has been given. + (main): Don't close the listen FD. + 2004-09-30 Werner Koch * Makefile.am: Adjusted from gettext 1.14. Index: gnupg/agent/gpg-agent.c diff -u gnupg/agent/gpg-agent.c:1.31.2.18 gnupg/agent/gpg-agent.c:1.31.2.19 --- gnupg/agent/gpg-agent.c:1.31.2.18 Thu Sep 9 09:27:56 2004 +++ gnupg/agent/gpg-agent.c Fri Oct 22 11:39:47 2004 @@ -166,7 +166,7 @@ static const char *debug_level; /* Keep track of the current log file so that we can avoid updating - the log file afte a SIGHUP if id didn't changed. Malloced. */ + the log file after a SIGHUP if it didn't changed. Malloced. */ static char *current_logfile; /* Local prototypes. */ @@ -362,9 +362,10 @@ case oDebugLevel: debug_level = pargs->r.ret_str; break; case oLogFile: - if (reread - && (!current_logfile || !pargs->r.ret_str - || strcmp (current_logfile, pargs->r.ret_str))) + if (!reread) + return 0; /* not handeld */ + if (!current_logfile || !pargs->r.ret_str + || strcmp (current_logfile, pargs->r.ret_str)) { log_set_file (pargs->r.ret_str); xfree (current_logfile); @@ -416,6 +417,7 @@ int gpgconf_list = 0; gpg_error_t err; + set_strusage (my_strusage); gcry_control (GCRYCTL_SUSPEND_SECMEM_WARN); /* Please note that we may running SUID(ROOT), so be very CAREFUL @@ -861,7 +863,7 @@ /* Close stdin, stdout and stderr unless it is the log stream */ for (i=0; i <= 2; i++) { - if (!log_test_fd (i) ) + if (!log_test_fd (i) && i != fd ) close (i); } if (setsid() == -1) From cvs at cvs.gnupg.org Fri Oct 22 11:37:34 2004 From: cvs at cvs.gnupg.org (cvs user wk) Date: Fri Oct 22 11:37:49 2004 Subject: GNUPG-1-9-BRANCH gnupg/g10 (card-util.c) Message-ID: Date: Friday, October 22, 2004 @ 11:41:01 Author: wk Path: /cvs/gnupg/gnupg/g10 Tag: GNUPG-1-9-BRANCH Modified: card-util.c Updated from 1.3 -------------+ card-util.c | 617 +++++++++++++++++++++++++++++++++++++++++++++------------- 1 files changed, 488 insertions(+), 129 deletions(-) Index: gnupg/g10/card-util.c diff -u gnupg/g10/card-util.c:1.1.2.15 gnupg/g10/card-util.c:1.1.2.16 --- gnupg/g10/card-util.c:1.1.2.15 Thu Jul 1 19:42:09 2004 +++ gnupg/g10/card-util.c Fri Oct 22 11:41:01 2004 @@ -34,6 +34,7 @@ #include "status.h" #include "options.h" #include "main.h" +#include "keyserver-internal.h" #if GNUPG_MAJOR_VERSION == 1 #include "cardglue.h" #else @@ -46,7 +47,7 @@ /* Change the PIN of a an OpenPGP card. This is an interactive function. */ void -change_pin (int chvno) +change_pin (int chvno, int allow_admin) { struct agent_card_info_s info; int rc; @@ -70,52 +71,61 @@ return; } - for (;;) + if(!allow_admin) { - char *answer; - - tty_printf ("\n"); - tty_printf ("1 - change PIN\n" - "2 - unblock PIN\n" - "3 - change Admin PIN\n" - "Q - quit\n"); - tty_printf ("\n"); - - answer = cpr_get("cardutil.change_pin.menu",_("Your selection? ")); - cpr_kill_prompt(); - if (strlen (answer) != 1) - continue; - - rc = 0; - if (*answer == '1') - { - rc = agent_scd_change_pin (1); - if (rc) - tty_printf ("Error changing the PIN: %s\n", gpg_strerror (rc)); - else - tty_printf ("PIN changed.\n"); - } - else if (*answer == '2') - { - rc = agent_scd_change_pin (101); - if (rc) - tty_printf ("Error unblocking the PIN: %s\n", gpg_strerror (rc)); - else - tty_printf ("PIN unblocked and new PIN set.\n"); - } - else if (*answer == '3') - { - rc = agent_scd_change_pin (3); - if (rc) - tty_printf ("Error changing the PIN: %s\n", gpg_strerror (rc)); - else - tty_printf ("PIN changed.\n"); - } - else if (*answer == 'q' || *answer == 'Q') - { - break; - } + rc = agent_scd_change_pin (1); + if (rc) + tty_printf ("Error changing the PIN: %s\n", gpg_strerror (rc)); + else + tty_printf ("PIN changed.\n"); } + else + for (;;) + { + char *answer; + + tty_printf ("\n"); + tty_printf ("1 - change PIN\n" + "2 - unblock PIN\n" + "3 - change Admin PIN\n" + "Q - quit\n"); + tty_printf ("\n"); + + answer = cpr_get("cardutil.change_pin.menu",_("Your selection? ")); + cpr_kill_prompt(); + if (strlen (answer) != 1) + continue; + + rc = 0; + if (*answer == '1') + { + rc = agent_scd_change_pin (1); + if (rc) + tty_printf ("Error changing the PIN: %s\n", gpg_strerror (rc)); + else + tty_printf ("PIN changed.\n"); + } + else if (*answer == '2') + { + rc = agent_scd_change_pin (101); + if (rc) + tty_printf ("Error unblocking the PIN: %s\n", gpg_strerror (rc)); + else + tty_printf ("PIN unblocked and new PIN set.\n"); + } + else if (*answer == '3') + { + rc = agent_scd_change_pin (3); + if (rc) + tty_printf ("Error changing the PIN: %s\n", gpg_strerror (rc)); + else + tty_printf ("PIN changed.\n"); + } + else if (*answer == 'q' || *answer == 'Q') + { + break; + } + } } static const char * @@ -511,6 +521,49 @@ } static int +fetch_url(void) +{ + int rc; + struct agent_card_info_s info; + + memset(&info,0,sizeof(info)); + + rc=agent_scd_getattr("PUBKEY-URL",&info); + if(rc) + log_error("error retrieving URL from card: %s\n",gpg_strerror(rc)); + else if(info.pubkey_url) + { + struct keyserver_spec *spec=NULL; + + rc=agent_scd_getattr("KEY-FPR",&info); + if(rc) + log_error("error retrieving key fingerprint from card: %s\n", + gpg_strerror(rc)); + else + { + spec=parse_keyserver_uri(info.pubkey_url,0,NULL,0); + if(spec && info.fpr1valid) + { + /* This is not perfectly right. Currently, all card + fingerprints are 20 digits, but what about + fingerprints for a future v5 key? We should get the + length from somewhere lower in the code. In any + event, the fpr/keyid is not meaningful for straight + HTTP fetches, but using it allows the card to point + to HKP and LDAP servers as well. */ + rc=keyserver_import_fprint(info.fpr1,20,spec); + free_keyserver_spec(spec); + } + } + } + else + log_error("no URL set on card\n"); + + return rc; +} + + +static int change_login (const char *args) { char *data; @@ -524,17 +577,24 @@ for (args++; spacep (args); args++) ; fp = fopen (args, "rb"); + if (fp && is_secured_file (fileno (fp))) + { + fclose (fp); + fp = NULL; + errno = EPERM; + } if (!fp) { - tty_printf ("can't open `%s': %s\n", args, strerror (errno)); + tty_printf (_("can't open `%s': %s\n"), args, strerror (errno)); return -1; } + data = xmalloc (254); n = fread (data, 1, 254, fp); fclose (fp); if (n < 0) { - tty_printf ("error reading `%s': %s\n", args, strerror (errno)); + tty_printf (_("error reading `%s': %s\n"), args, strerror (errno)); xfree (data); return -1; } @@ -705,26 +765,142 @@ } -static void -generate_card_keys (const char *serialno) +/* Helper for the key generation/edit functions. */ +static int +get_info_for_key_operation (struct agent_card_info_s *info) { - struct agent_card_info_s info; int rc; - int forced_chv1; - memset (&info, 0, sizeof info); - rc = agent_scd_getattr ("KEY-FPR", &info); - if (!rc) - rc = agent_scd_getattr ("SERIALNO", &info); + memset (info, 0, sizeof *info); + rc = agent_scd_getattr ("SERIALNO", info); + if (rc || !info->serialno || strncmp (info->serialno, "D27600012401", 12) + || strlen (info->serialno) != 32 ) + { + log_error (_("key operation not possible: %s\n"), + rc ? gpg_strerror (rc) : _("not an OpenPGP card")); + return rc? rc: -1; + } + rc = agent_scd_getattr ("KEY-FPR", info); if (!rc) - rc = agent_scd_getattr ("CHV-STATUS", &info); + rc = agent_scd_getattr ("CHV-STATUS", info); if (!rc) - rc = agent_scd_getattr ("DISP-NAME", &info); + rc = agent_scd_getattr ("DISP-NAME", info); if (rc) + log_error (_("error getting current key info: %s\n"), gpg_strerror (rc)); + return rc; +} + + +/* Helper for the key generation/edit functions. */ +static int +check_pin_for_key_operation (struct agent_card_info_s *info, int *forced_chv1) +{ + int rc = 0; + + *forced_chv1 = !info->chv1_cached; + if (*forced_chv1) + { /* 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); + if (rc) + { + log_error ("error clearing forced signature PIN flag: %s\n", + gpg_strerror (rc)); + *forced_chv1 = 0; + } + } + + if (!rc) { - log_error ("error getting current key info: %s\n", gpg_strerror (rc)); - return; + /* Check the PIN now, so that we won't get asked later for each + binding signature. */ + rc = agent_scd_checkpin (info->serialno); + if (rc) + log_error ("error checking the PIN: %s\n", gpg_strerror (rc)); } + return rc; +} + +/* Helper for the key generation/edit functions. */ +static void +restore_forced_chv1 (int *forced_chv1) +{ + int rc; + + if (*forced_chv1) + { /* Switch back to forced state. */ + rc = agent_scd_setattr ("CHV-STATUS-1", "", 1); + if (rc) + { + log_error ("error setting forced signature PIN flag: %s\n", + gpg_strerror (rc)); + } + } +} + +/* Helper for the key generation/edit functions. */ +static void +show_card_key_info (struct agent_card_info_s *info) +{ + tty_fprintf (NULL, "Signature key ....:"); + print_sha1_fpr (NULL, info->fpr1valid? info->fpr1:NULL); + tty_fprintf (NULL, "Encryption key....:"); + print_sha1_fpr (NULL, info->fpr2valid? info->fpr2:NULL); + tty_fprintf (NULL, "Authentication key:"); + print_sha1_fpr (NULL, info->fpr3valid? info->fpr3:NULL); + tty_printf ("\n"); +} + + +/* Helper for the key generation/edit functions. */ +static int +replace_existing_key_p (struct agent_card_info_s *info, int keyno) +{ + assert (keyno >= 0 && keyno <= 3); + + if ((keyno == 1 && info->fpr1valid) + || (keyno == 2 && info->fpr2valid) + || (keyno == 3 && info->fpr3valid)) + { + tty_printf ("\n"); + log_info ("WARNING: such a key has already been stored on the card!\n"); + tty_printf ("\n"); + if ( !cpr_get_answer_is_yes( "cardedit.genkeys.replace_key", + _("Replace existing key? (y/N) "))) + return -1; + } + return 0; +} + + + +static void +generate_card_keys (const char *serialno) +{ + struct agent_card_info_s info; + int forced_chv1; + int want_backup; + + if (get_info_for_key_operation (&info)) + return; + +#if GNUPG_MAJOR_VERSION == 1 + { + char *answer=cpr_get("cardedit.genkeys.backup_enc", + _("Make off-card backup of encryption key? (Y/n) ")); + + want_backup=answer_is_yes_no_default(answer,1); + cpr_kill_prompt(); + m_free(answer); + } +#else + /* Does 1.9 have answer_is_yes_no_default() ? */ + want_backup = !(cpr_get_answer_is_yes + ( "cardedit.genkeys.backup_enc", + _("Inhibit off-card backup of encryption key? (y/N) "))); +#endif + if ( (info.fpr1valid && !fpr_is_zero (info.fpr1)) || (info.fpr2valid && !fpr_is_zero (info.fpr2)) || (info.fpr3valid && !fpr_is_zero (info.fpr3))) @@ -733,7 +909,7 @@ log_info ("NOTE: keys are already stored on the card!\n"); tty_printf ("\n"); if ( !cpr_get_answer_is_yes( "cardedit.genkeys.replace_keys", - _("Replace existing keys? "))) + _("Replace existing keys? (y/N) "))) { agent_release_card_info (&info); return; @@ -743,47 +919,207 @@ { tty_printf ("\n"); tty_printf (_("Please note that the factory settings of the PINs are\n" - " PIN = \"%s\" Admin PIN = \"%s\"\n" + " PIN = `%s' Admin PIN = `%s'\n" "You should change them using the command --change-pin\n"), "123456", "12345678"); tty_printf ("\n"); } - forced_chv1 = !info.chv1_cached; - if (forced_chv1) - { /* 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); - if (rc) + if (check_pin_for_key_operation (&info, &forced_chv1)) + goto leave; + + generate_keypair (NULL, info.serialno, + want_backup? opt.homedir:NULL); + + leave: + agent_release_card_info (&info); + restore_forced_chv1 (&forced_chv1); +} + + +/* This fucntion is used by the key edit menu to generate an arbitrary + subkey. */ +int +card_generate_subkey (KBNODE pub_keyblock, KBNODE sec_keyblock) +{ + struct agent_card_info_s info; + int okay = 0; + int forced_chv1 = 0; + int keyno; + + if (get_info_for_key_operation (&info)) + return 0; + + show_card_key_info (&info); + + tty_printf (_("Please select the type of key to generate:\n")); + + tty_printf (_(" (1) Signature key\n")); + tty_printf (_(" (2) Encryption key\n")); + tty_printf (_(" (3) Authentication key\n")); + + for (;;) + { + char *answer = cpr_get ("cardedit.genkeys.subkeytype", + _("Your selection? ")); + cpr_kill_prompt(); + if (*answer == CONTROL_D) { - log_error ("error clearing forced signature PIN flag: %s\n", - gpg_strerror (rc)); - return; + xfree (answer); + goto leave; } + keyno = *answer? atoi(answer): 0; + xfree(answer); + if (keyno >= 1 && keyno <= 3) + break; /* Okay. */ + tty_printf(_("Invalid selection.\n")); } - /* Check the PIN now, so that we won't get asked later for each - binding signature. */ - rc = agent_scd_checkpin (serialno); - if (rc) - log_error ("error checking the PIN: %s\n", gpg_strerror (rc)); - else - generate_keypair (NULL, info.serialno); + if (replace_existing_key_p (&info, keyno)) + goto leave; + if (check_pin_for_key_operation (&info, &forced_chv1)) + goto leave; + + okay = generate_card_subkeypair (pub_keyblock, sec_keyblock, + keyno, info.serialno); + + leave: agent_release_card_info (&info); - if (forced_chv1) - { /* Switch back to forced state. */ - rc = agent_scd_setattr ("CHV-STATUS-1", "", 1); - if (rc) + restore_forced_chv1 (&forced_chv1); + return okay; +} + + +/* Store the subkey at NODE into the smartcard and modify NODE to + carry the serrialno stuff instead of the actual secret key + parameters. */ +int +card_store_subkey (KBNODE node, int use) +{ + struct agent_card_info_s info; + int okay = 0; + int rc; + int keyno, i; + PKT_secret_key *copied_sk = NULL; + PKT_secret_key *sk; + size_t n; + const char *s; + int allow_keyno[3]; + + assert (node->pkt->pkttype == PKT_SECRET_KEY + || node->pkt->pkttype == PKT_SECRET_SUBKEY); + sk = node->pkt->pkt.secret_key; + + if (get_info_for_key_operation (&info)) + return 0; + + show_card_key_info (&info); + + if (!is_RSA (sk->pubkey_algo) || nbits_from_sk (sk) != 1024 ) + { + tty_printf ("You may only store a 1024 bit RSA key on the card\n"); + tty_printf ("\n"); + goto leave; + } + + allow_keyno[0] = (!use || (use & (PUBKEY_USAGE_SIG))); + allow_keyno[1] = (!use || (use & (PUBKEY_USAGE_ENC))); + allow_keyno[2] = (!use || (use & (PUBKEY_USAGE_SIG|PUBKEY_USAGE_AUTH))); + + tty_printf (_("Please select where to store the key:\n")); + + if (allow_keyno[0]) + tty_printf (_(" (1) Signature key\n")); + if (allow_keyno[1]) + tty_printf (_(" (2) Encryption key\n")); + if (allow_keyno[2]) + tty_printf (_(" (3) Authentication key\n")); + + for (;;) + { + char *answer = cpr_get ("cardedit.genkeys.storekeytype", + _("Your selection? ")); + cpr_kill_prompt(); + if (*answer == CONTROL_D || !*answer) { - log_error ("error setting forced signature PIN flag: %s\n", - gpg_strerror (rc)); - return; + xfree (answer); + goto leave; } + keyno = *answer? atoi(answer): 0; + xfree(answer); + if (keyno >= 1 && keyno <= 3 && allow_keyno[keyno-1]) + break; /* Okay. */ + tty_printf(_("Invalid selection.\n")); + } + + if (replace_existing_key_p (&info, keyno)) + goto leave; + + /* Unprotect key. */ + switch (is_secret_key_protected (sk) ) + { + case 0: /* Not protected. */ + break; + case -1: + log_error (_("unknown key protection algorithm\n")); + goto leave; + default: + if (sk->protect.s2k.mode == 1001) + { + log_error (_("secret parts of key are not available\n")); + goto leave; + } + if (sk->protect.s2k.mode == 1002) + { + log_error (_("secret key already stored on a card\n")); + goto leave; + } + /* We better copy the key before we unprotect it. */ + copied_sk = sk = copy_secret_key (NULL, sk); + rc = check_secret_key (sk, 0); + if (rc) + goto leave; } + + rc = save_unprotected_key_to_card (sk, keyno); + if (rc) + goto leave; + + /* Get back to the maybe protected original secret key. */ + if (copied_sk) + { + free_secret_key (copied_sk); + copied_sk = NULL; + } + sk = node->pkt->pkt.secret_key; + + /* Get rid of the secret key parameters and store the serial numer. */ + n = pubkey_get_nskey (sk->pubkey_algo); + for (i=pubkey_get_npkey (sk->pubkey_algo); i < n; i++) + { + mpi_free (sk->skey[i]); + sk->skey[i] = NULL; + } + i = pubkey_get_npkey (sk->pubkey_algo); + sk->skey[i] = mpi_set_opaque (NULL, xstrdup ("dummydata"), 10); + sk->is_protected = 1; + sk->protect.s2k.mode = 1002; + s = info.serialno; + for (sk->protect.ivlen=0; sk->protect.ivlen < 16 && *s && s[1]; + sk->protect.ivlen++, s += 2) + sk->protect.iv[sk->protect.ivlen] = xtoi_2 (s); + + okay = 1; + + leave: + if (copied_sk) + free_secret_key (copied_sk); + agent_release_card_info (&info); + return okay; } + /* Menu to edit all user changeable values on an OpenPGP card. Only Key creation is not handled here. */ void @@ -791,8 +1127,8 @@ { enum cmdids { cmdNOP = 0, - cmdQUIT, cmdHELP, cmdLIST, cmdDEBUG, - cmdNAME, cmdURL, cmdLOGIN, cmdLANG, cmdSEX, cmdCAFPR, + cmdQUIT, cmdADMIN, cmdHELP, cmdLIST, cmdDEBUG, + cmdNAME, cmdURL, cmdFETCH, cmdLOGIN, cmdLANG, cmdSEX, cmdCAFPR, cmdFORCESIG, cmdGENERATE, cmdPASSWD, cmdINVCMD }; @@ -800,34 +1136,38 @@ static struct { const char *name; enum cmdids id; + int admin_only; const char *desc; } cmds[] = { - { N_("quit") , cmdQUIT , N_("quit this menu") }, - { N_("q") , cmdQUIT , NULL }, - { N_("help") , cmdHELP , N_("show this help") }, - { "?" , cmdHELP , NULL }, - { N_("list") , cmdLIST , N_("list all available data") }, - { N_("l") , cmdLIST , NULL }, - { N_("debug") , cmdDEBUG , NULL }, - { N_("name") , cmdNAME , N_("change card holder's name") }, - { N_("url") , cmdURL , N_("change URL to retrieve key") }, - { N_("login") , cmdLOGIN , N_("change the login name") }, - { N_("lang") , cmdLANG , N_("change the language preferences") }, - { N_("sex") , cmdSEX , N_("change card holder's sex") }, - { N_("cafpr"), cmdCAFPR, N_("change a CA fingerprint") }, + { N_("quit") , cmdQUIT , 0, N_("quit this menu") }, + { N_("q") , cmdQUIT , 0, NULL }, + { N_("admin") , cmdADMIN , 0, N_("show admin commands") }, + { N_("help") , cmdHELP , 0, N_("show this help") }, + { "?" , cmdHELP , 0, NULL }, + { N_("list") , cmdLIST , 0, N_("list all available data") }, + { N_("l") , cmdLIST , 0, NULL }, + { N_("debug") , cmdDEBUG , 0, NULL }, + { N_("name") , cmdNAME , 1, N_("change card holder's name") }, + { N_("url") , cmdURL , 1, N_("change URL to retrieve key") }, + { N_("fetch") , cmdFETCH , 0, + N_("fetch the key specified in the card URL") }, + { N_("login") , cmdLOGIN , 1, N_("change the login name") }, + { N_("lang") , cmdLANG , 1, N_("change the language preferences") }, + { N_("sex") , cmdSEX , 1, N_("change card holder's sex") }, + { N_("cafpr"), cmdCAFPR, 1, N_("change a CA fingerprint") }, { N_("forcesig"), - cmdFORCESIG, N_("toggle the signature force PIN flag") }, + cmdFORCESIG, 1, N_("toggle the signature force PIN flag") }, { N_("generate"), - cmdGENERATE, N_("generate new keys") }, - { N_("passwd"), cmdPASSWD, N_("menu to change or unblock the PIN") }, - { NULL, cmdINVCMD } + cmdGENERATE, 1, N_("generate new keys") }, + { N_("passwd"), cmdPASSWD, 0, N_("menu to change or unblock the PIN") }, + { NULL, cmdINVCMD, 0, NULL } }; enum cmdids cmd = cmdNOP; int have_commands = !!commands; int redisplay = 1; char *answer = NULL; - int did_checkpin = 0; + int did_checkpin = 0, allow_admin=0; char serialnobuf[50]; @@ -845,6 +1185,7 @@ const char *arg_string = ""; char *p; int i; + int cmd_admin_only; tty_printf("\n"); if (redisplay ) @@ -887,61 +1228,79 @@ } trim_spaces(answer); } - while( *answer == '#' ); + while ( *answer == '#' ); arg_number = 0; /* Yes, here is the init which egcc complains about */ + cmd_admin_only = 0; if (!*answer) cmd = cmdLIST; /* Default to the list command */ else if (*answer == CONTROL_D) cmd = cmdQUIT; - else { - if ((p=strchr (answer,' '))) - { - *p++ = 0; - trim_spaces (answer); - trim_spaces (p); - arg_number = atoi(p); - arg_string = p; - } - - for (i=0; cmds[i].name; i++ ) - if (!ascii_strcasecmp (answer, cmds[i].name )) - break; + else + { + if ((p=strchr (answer,' '))) + { + *p++ = 0; + trim_spaces (answer); + trim_spaces (p); + arg_number = atoi(p); + arg_string = p; + } + + for (i=0; cmds[i].name; i++ ) + if (!ascii_strcasecmp (answer, cmds[i].name )) + break; - cmd = cmds[i].id; - } - + cmd = cmds[i].id; + cmd_admin_only = cmds[i].admin_only; + } + + if (!allow_admin && cmd_admin_only) + { + tty_printf ("\n"); + tty_printf (_("Admin-only command\n")); + continue; + } switch (cmd) { case cmdHELP: for (i=0; cmds[i].name; i++ ) - if (cmds[i].desc) + if(cmds[i].desc + && (!cmds[i].admin_only || (cmds[i].admin_only && allow_admin))) tty_printf("%-10s %s\n", cmds[i].name, _(cmds[i].desc) ); break; + case cmdADMIN: + allow_admin=!allow_admin; + break; + case cmdLIST: redisplay = 1; break; case cmdNAME: - change_name (); + change_name (); break; case cmdURL: - change_url (); + change_url (); break; + case cmdFETCH: + fetch_url(); + break; + case cmdLOGIN: - change_login (arg_string); + change_login (arg_string); break; case cmdLANG: - change_lang (); + change_lang (); break; case cmdSEX: - change_sex (); + change_sex (); break; case cmdCAFPR: @@ -961,7 +1320,7 @@ break; case cmdPASSWD: - change_pin (0); + change_pin (0, allow_admin); did_checkpin = 0; /* Need to reset it of course. */ break; From cvs at cvs.gnupg.org Fri Oct 22 11:37:57 2004 From: cvs at cvs.gnupg.org (cvs user wk) Date: Fri Oct 22 11:38:11 2004 Subject: GNUPG-1-9-BRANCH gnupg/jnlib (ChangeLog logging.c) Message-ID: Date: Friday, October 22, 2004 @ 11:41:24 Author: wk Path: /cvs/gnupg/gnupg/jnlib Tag: GNUPG-1-9-BRANCH Modified: ChangeLog logging.c * logging.c (do_logv): Use set_log_stream to setup a default. (log_set_file): Factored code out to .. (set_file_fd): .. New function to allow using a file descriptor. (log_set_fd): Make use of new fucntion. (fun_writer): Reworked. -----------+ ChangeLog | 8 + logging.c | 306 ++++++++++++++++++++++++++++++++++++------------------------ 2 files changed, 194 insertions(+), 120 deletions(-) Index: gnupg/jnlib/ChangeLog diff -u gnupg/jnlib/ChangeLog:1.3.2.15 gnupg/jnlib/ChangeLog:1.3.2.16 --- gnupg/jnlib/ChangeLog:1.3.2.15 Wed Aug 18 15:21:56 2004 +++ gnupg/jnlib/ChangeLog Fri Oct 22 11:41:24 2004 @@ -1,3 +1,11 @@ +2004-10-21 Werner Koch + + * logging.c (do_logv): Use set_log_stream to setup a default. + (log_set_file): Factored code out to .. + (set_file_fd): .. New function to allow using a file descriptor. + (log_set_fd): Make use of new fucntion. + (fun_writer): Reworked. + 2004-08-18 Werner Koch * stringhelp.c (print_sanitized_utf8_string): Actually implement Index: gnupg/jnlib/logging.c diff -u gnupg/jnlib/logging.c:1.2.2.8 gnupg/jnlib/logging.c:1.2.2.9 --- gnupg/jnlib/logging.c:1.2.2.8 Mon Jun 21 11:50:22 2004 +++ gnupg/jnlib/logging.c Fri Oct 22 11:41:24 2004 @@ -37,14 +37,20 @@ #include #include #include +#include +#include #ifdef __MINGW32__ # include #endif + #define JNLIB_NEED_LOG_LOGV 1 #include "libjnlib-config.h" #include "logging.h" +#if defined (HAVE_FOPENCOOKIE) || defined (HAVE_FUNOPEN) +#define USE_FUNWRITER 1 +#endif static FILE *logstream; static int log_socket = -1; @@ -94,10 +100,12 @@ /* The follwing 3 functions are used by funopen to write logs to a socket. */ -#if defined (HAVE_FOPENCOOKIE) || defined (HAVE_FUNOPEN) +#ifdef USE_FUNWRITER struct fun_cookie_s { int fd; int quiet; + int want_socket; + int is_socket; char name[1]; }; @@ -135,64 +143,78 @@ processes often close stderr and by writing to file descriptor 2 we might send the log message to a file not intended for logging (e.g. a pipe or network connection). */ - if (cookie->fd == -1) + if (cookie->want_socket && cookie->fd == -1) { /* Not yet open or meanwhile closed due to an error. */ - struct sockaddr_un addr; - size_t addrlen; - + cookie->is_socket = 0; cookie->fd = socket (PF_LOCAL, SOCK_STREAM, 0); if (cookie->fd == -1) { if (!cookie->quiet && !running_detached) fprintf (stderr, "failed to create socket for logging: %s\n", strerror(errno)); - goto failure; } - log_socket = cookie->fd; + else + { + struct sockaddr_un addr; + size_t addrlen; + + memset (&addr, 0, sizeof addr); + addr.sun_family = PF_LOCAL; + strncpy (addr.sun_path, cookie->name, sizeof (addr.sun_path)-1); + addr.sun_path[sizeof (addr.sun_path)-1] = 0; + addrlen = (offsetof (struct sockaddr_un, sun_path) + + strlen (addr.sun_path) + 1); - memset (&addr, 0, sizeof addr); - addr.sun_family = PF_LOCAL; - strncpy (addr.sun_path, cookie->name, sizeof (addr.sun_path)-1); - addr.sun_path[sizeof (addr.sun_path)-1] = 0; - addrlen = (offsetof (struct sockaddr_un, sun_path) - + strlen (addr.sun_path) + 1); + if (connect (cookie->fd, (struct sockaddr *) &addr, addrlen) == -1) + { + if (!cookie->quiet && !running_detached) + fprintf (stderr, "can't connect to `%s': %s\n", + cookie->name, strerror(errno)); + close (cookie->fd); + cookie->fd = -1; + } + } - if (connect (cookie->fd, (struct sockaddr *) &addr, addrlen) == -1) + if (cookie->fd == -1) { - log_socket = -1; - if (!cookie->quiet && !running_detached) - fprintf (stderr, "can't connect to `%s': %s\n", - cookie->name, strerror(errno)); - close (cookie->fd); - cookie->fd = -1; - goto failure; + if (!running_detached) + { + if (!cookie->quiet) + { + fputs ("switching logging to stderr\n", stderr); + cookie->quiet = 1; + } + cookie->fd = fileno (stderr); + } + } + else /* Connection has been established. */ + { + cookie->quiet = 0; + cookie->is_socket = 1; } - /* Connection established. */ - cookie->quiet = 0; } - - if (!writen (cookie->fd, buffer, size)) - return size; /* Okay. */ - log_socket = -1; - if (!running_detached) - fprintf (stderr, "error writing to `%s': %s\n", - cookie->name, strerror(errno)); - close (cookie->fd); - cookie->fd = -1; + log_socket = cookie->fd; + if (cookie->fd != -1 && !writen (cookie->fd, buffer, size)) + return size; /* Okay. */ - failure: - if (!running_detached) + if (!running_detached && cookie->fd != -1) { - if (!cookie->quiet) - { - fputs ("switching logging to stderr\n", stderr); - cookie->quiet = 1; - } - - fwrite (buffer, size, 1, stderr); + if (*cookie->name) + fprintf (stderr, "error writing to `%s': %s\n", + cookie->name, strerror(errno)); + else + fprintf (stderr, "error writing to file descriptor %d: %s\n", + cookie->fd, strerror(errno)); + } + if (cookie->is_socket && cookie->fd != -1) + { + close (cookie->fd); + cookie->fd = -1; + log_socket = -1; } + return size; } @@ -204,113 +226,151 @@ if (cookie->fd != -1) close (cookie->fd); jnlib_free (cookie); + log_socket = -1; return 0; } -#endif /* HAVE_FOPENCOOKIE || HAVE_FUNOPEN */ +#endif /*USE_FUNWRITER*/ - -/* Set the file to write log to. The special names NULL and "-" may - be used to select stderr and names formatted like - "socket:///home/foo/mylogs" may be used to write the logging to the - socket "/home/foo/mylogs". If the connection to the socket fails - or a write error is detected, the function writes to stderr and - tries the next time again to connect the socket. - */ -void -log_set_file (const char *name) +/* Common function to either set the logging to a file or a file + descriptor. */ +static void +set_file_fd (const char *name, int fd) { FILE *fp; + int want_socket; +#ifdef USE_FUNWRITER + struct fun_cookie_s *cookie; +#endif - force_prefixes = 0; - if (name && !strncmp (name, "socket://", 9) && name[9]) + if (name && !strcmp (name, "-")) { -#if defined (HAVE_FOPENCOOKIE)|| defined (HAVE_FUNOPEN) - struct fun_cookie_s *cookie; - - cookie = jnlib_xmalloc (sizeof *cookie + strlen (name+9)); - cookie->fd = -1; - cookie->quiet = 0; - strcpy (cookie->name, name+9); - -#ifdef HAVE_FOPENCOOKIE - { - cookie_io_functions_t io = { NULL }; - io.write = fun_writer; - io.close = fun_closer; + name = NULL; + fd = fileno (stderr); + } - fp = fopencookie (cookie, "w", io); - } -#else /*!HAVE_FOPENCOOKIE*/ - { - fp = funopen (cookie, NULL, fun_writer, NULL, fun_closer); - } -#endif /*!HAVE_FOPENCOOKIE*/ -#else /* Neither fopencookie nor funopen. */ - { - fprintf (stderr, "system does not support logging to a socket - " - "using stderr\n"); - fp = stderr; - } -#endif /* Neither fopencookie nor funopen. */ - - /* We always need to print the prefix and the pid, so that the - server reading the socket can do something meaningful. */ - force_prefixes = 1; - /* On success close the old logstream right now, so that we are - really sure it has been closed. */ - if (fp && logstream) - { - if (logstream != stderr && logstream != stdout) - fclose (logstream); - logstream = NULL; - } + if (name) + { + want_socket = (!strncmp (name, "socket://", 9) && name[9]); + if (want_socket) + name += 9; } else - fp = (name && strcmp(name,"-"))? fopen (name, "a") : stderr; - if (!fp) { - fprintf (stderr, "failed to open log file `%s': %s\n", - name? name:"[stderr]", strerror(errno)); - return; + want_socket = 0; } - setvbuf (fp, NULL, _IOLBF, 0); - - if (logstream && logstream != stderr && logstream != stdout) - fclose (logstream); - logstream = fp; - missing_lf = 0; -} +#ifdef USE_FUNWRITER + cookie = jnlib_xmalloc (sizeof *cookie + (name? strlen (name):0)); + strcpy (cookie->name, name? name:""); + cookie->quiet = 0; + cookie->is_socket = 0; + cookie->want_socket = want_socket; + if (!name) + cookie->fd = fd; + else if (want_socket) + cookie->fd = -1; + else + { + do + cookie->fd = open (name, O_WRONLY|O_APPEND|O_CREAT, + (S_IRUSR|S_IRGRP|S_IROTH|S_IWUSR|S_IWGRP|S_IWOTH)); + while (cookie->fd == -1 && errno == EINTR); + } + log_socket = cookie->fd; -void -log_set_fd (int fd) -{ - FILE *fp; +#ifdef HAVE_FOPENCOOKIE + { + cookie_io_functions_t io = { NULL }; + io.write = fun_writer; + io.close = fun_closer; + + fp = fopencookie (cookie, "w", io); + } +#else /*!HAVE_FOPENCOOKIE*/ + fp = funopen (cookie, NULL, fun_writer, NULL, fun_closer); +#endif /*!HAVE_FOPENCOOKIE*/ - force_prefixes = 0; - if (fd == 1) +#else /*!USE_FUNWRITER*/ + + /* The system does not feature custom streams. Thus fallback to + plain stdio. */ + if (want_socket) + { + fprintf (stderr, "system does not support logging to a socket - " + "using stderr\n"); + fp = stderr; + } + else if (name) + fp = fopen (name, "a"); + else if (fd == 1) fp = stdout; else if (fd == 2) fp = stderr; else fp = fdopen (fd, "a"); + + log_socket = -1; + +#endif /*!USE_FUNWRITER*/ + + /* On success close the old logstream right now, so that we are + really sure it has been closed. */ + if (fp && logstream) + { + if (logstream != stderr && logstream != stdout) + fclose (logstream); + logstream = NULL; + } + if (!fp) { - fprintf (stderr, "failed to fdopen log fd %d: %s\n", - fd, strerror(errno)); - return; + if (name) + fprintf (stderr, "failed to open log file `%s': %s\n", + name, strerror(errno)); + else + fprintf (stderr, "failed to fdopen file descriptor %d: %s\n", + fd, strerror(errno)); + /* We need to make sure that there is a log stream. We use stderr. */ + fp = stderr; } - setvbuf (fp, NULL, _IOLBF, 0); + else + setvbuf (fp, NULL, _IOLBF, 0); if (logstream && logstream != stderr && logstream != stdout) - fclose( logstream); + fclose (logstream); logstream = fp; + + /* We always need to print the prefix and the pid for socket mode, + so that the server reading the socket can do something + meaningful. */ + force_prefixes = want_socket; + missing_lf = 0; } +/* Set the file to write log to. The special names NULL and "-" may + be used to select stderr and names formatted like + "socket:///home/foo/mylogs" may be used to write the logging to the + socket "/home/foo/mylogs". If the connection to the socket fails + or a write error is detected, the function writes to stderr and + tries the next time again to connect the socket. + */ +void +log_set_file (const char *name) +{ + set_file_fd (name? name: "-", -1); +} + +void +log_set_fd (int fd) +{ + set_file_fd (NULL, fd); +} + + void log_set_prefix (const char *text, unsigned int flags) { @@ -351,9 +411,10 @@ int log_test_fd (int fd) { - if (fileno (logstream?logstream:stderr) == fd) + int tmp = fileno (logstream); + if ( tmp != -1 && tmp == fd) return 1; - if (log_socket == fd) + if (log_socket != -1 && log_socket == fd) return 1; return 0; } @@ -367,15 +428,20 @@ FILE * log_get_stream () { + /* FIXME: We should not return stderr here but initialize the log + stream properly. This might break more things than using stderr, + though */ return logstream?logstream:stderr; } - static void do_logv (int level, const char *fmt, va_list arg_ptr) { if (!logstream) - logstream = stderr; + { + log_set_file (NULL); /* Make sure a log stream has been set. */ + assert (logstream); + } if (missing_lf && level != JNLIB_LOG_CONT) putc('\n', logstream ); From cvs at cvs.gnupg.org Fri Oct 22 11:38:30 2004 From: cvs at cvs.gnupg.org (cvs user wk) Date: Fri Oct 22 11:38:39 2004 Subject: GNUPG-1-9-BRANCH gnupg/scd (ChangeLog app-common.h app-openpgp.c) Message-ID: Date: Friday, October 22, 2004 @ 11:41:56 Author: wk Path: /cvs/gnupg/gnupg/scd Tag: GNUPG-1-9-BRANCH Modified: ChangeLog app-common.h app-openpgp.c * app-openpgp.c (do_sign): Replace asprintf by direct allocation. This avoids problems with missing vasprintf implementations in gnupg 1.4. * app-common.h (app_openpgp_storekey: Add prototype. ---------------+ ChangeLog | 8 ++++++++ app-common.h | 9 ++++++++- app-openpgp.c | 11 ++++++++--- 3 files changed, 24 insertions(+), 4 deletions(-) Index: gnupg/scd/ChangeLog diff -u gnupg/scd/ChangeLog:1.25.2.56 gnupg/scd/ChangeLog:1.25.2.57 --- gnupg/scd/ChangeLog:1.25.2.56 Wed Oct 20 10:54:45 2004 +++ gnupg/scd/ChangeLog Fri Oct 22 11:41:56 2004 @@ -1,3 +1,11 @@ +2004-10-21 Werner Koch + + * app-openpgp.c (do_sign): Replace asprintf by direct allocation. + This avoids problems with missing vasprintf implementations in + gnupg 1.4. + + * app-common.h (app_openpgp_storekey: Add prototype. + 2004-10-20 Werner Koch * sc-investigate: Removed. Index: gnupg/scd/app-common.h diff -u gnupg/scd/app-common.h:1.5.2.10 gnupg/scd/app-common.h:1.5.2.11 --- gnupg/scd/app-common.h:1.5.2.10 Thu Oct 14 11:12:36 2004 +++ gnupg/scd/app-common.h Fri Oct 22 11:41:56 2004 @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: app-common.h,v 1.5.2.10 2004/10/14 09:12:36 werner Exp $ + * $Id: app-common.h,v 1.5.2.11 2004/10/22 09:41:56 wk Exp $ */ #ifndef GNUPG_SCD_APP_COMMON_H @@ -88,6 +88,13 @@ #if GNUPG_MAJOR_VERSION == 1 int app_select_openpgp (app_t app); int app_get_serial_and_stamp (app_t app, char **serial, time_t *stamp); +int app_openpgp_storekey (app_t app, int keyno, + unsigned char *template, size_t template_len, + time_t created_at, + const unsigned char *m, size_t mlen, + const unsigned char *e, size_t elen, + int (*pincb)(void*, const char *, char **), + void *pincb_arg); #else /*-- app-help.c --*/ gpg_error_t app_help_get_keygrip_string (ksba_cert_t cert, char *hexkeygrip); Index: gnupg/scd/app-openpgp.c diff -u gnupg/scd/app-openpgp.c:1.9.2.21 gnupg/scd/app-openpgp.c:1.9.2.22 --- gnupg/scd/app-openpgp.c:1.9.2.21 Thu Oct 14 15:22:03 2004 +++ gnupg/scd/app-openpgp.c Fri Oct 22 11:41:56 2004 @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: app-openpgp.c,v 1.9.2.21 2004/10/14 13:22:03 werner Exp $ + * $Id: app-openpgp.c,v 1.9.2.22 2004/10/22 09:41:56 wk Exp $ */ #include @@ -824,7 +824,7 @@ if (strlen (pinvalue) < 6) { - log_error (_("prassphrase (CHV%d) is too short;" + log_error (_("passphrase (CHV%d) is too short;" " minimum length is %d\n"), 3, 6); xfree (pinvalue); return gpg_error (GPG_ERR_BAD_PIN); @@ -1298,10 +1298,15 @@ { char *prompt; - if (asprintf (&prompt, _("PIN [sigs done: %lu]"), sigcount) < 0) +#define PROMPTSTRING _("PIN [sigs done: %lu]") + + prompt = malloc (strlen (PROMPTSTRING) + 50); + if (!prompt) return gpg_error_from_errno (errno); + sprintf (prompt, PROMPTSTRING, sigcount); rc = pincb (pincb_arg, prompt, &pinvalue); free (prompt); +#undef PROMPTSTRING } if (rc) { From cvs at cvs.gnupg.org Fri Oct 22 14:27:06 2004 From: cvs at cvs.gnupg.org (cvs user wk) Date: Fri Oct 22 14:27:19 2004 Subject: GNUPG-1-9-BRANCH gnupg/doc (ChangeLog tools.texi) Message-ID: Date: Friday, October 22, 2004 @ 14:30:34 Author: wk Path: /cvs/gnupg/gnupg/doc Tag: GNUPG-1-9-BRANCH Modified: ChangeLog tools.texi (Helper Tools): Document gpgsm-gencert.sh. ------------+ ChangeLog | 4 ++++ tools.texi | 18 ++++++++++++++++++ 2 files changed, 22 insertions(+) Index: gnupg/doc/ChangeLog diff -u gnupg/doc/ChangeLog:1.39.2.17 gnupg/doc/ChangeLog:1.39.2.18 --- gnupg/doc/ChangeLog:1.39.2.17 Wed Oct 20 10:54:45 2004 +++ gnupg/doc/ChangeLog Fri Oct 22 14:30:34 2004 @@ -1,3 +1,7 @@ +2004-10-22 Werner Koch + + * tools.texi (Helper Tools): Document gpgsm-gencert.sh. + 2004-10-05 Werner Koch * gpg-agent.texi (Invoking GPG-AGENT): Tell that GPG_TTY needs to Index: gnupg/doc/tools.texi diff -u gnupg/doc/tools.texi:1.1.2.3 gnupg/doc/tools.texi:1.1.2.4 --- gnupg/doc/tools.texi:1.1.2.3 Thu Sep 30 10:38:32 2004 +++ gnupg/doc/tools.texi Fri Oct 22 14:30:34 2004 @@ -11,6 +11,7 @@ * watchgnupg:: Read logs from a socket. * addgnupghome:: Create .gnupg home directories. * gpgconf:: Modify .gnupg home directories. +* gpgsm-gencert.sh:: Generate an X.509 certificate request. @end menu @c @@ -575,3 +576,20 @@ The @code{--runtime} option can influence when the changes take effect. + +@c +@c GPGSM-GENCERT.SH +@c +@node gpgsm-gencert.sh +@section Generate an X.509 certificate request + +This is a simple tool to interactivly generate a certificate request +whicl will be printed to stdout. + +@noindent +@command{gpgsm-gencert.sh} is invoked as: + +@samp{gpgsm-cencert.sh} + + + From cvs at cvs.gnupg.org Fri Oct 22 14:27:25 2004 From: cvs at cvs.gnupg.org (cvs user wk) Date: Fri Oct 22 14:27:37 2004 Subject: GNUPG-1-9-BRANCH gnupg/sm (ChangeLog certreqgen.c) Message-ID: Date: Friday, October 22, 2004 @ 14:30:53 Author: wk Path: /cvs/gnupg/gnupg/sm Tag: GNUPG-1-9-BRANCH Modified: ChangeLog certreqgen.c (gpgsm_genkey): Remove the NEW from the certificate request PEM header. This is according to the Sphinx standard. --------------+ ChangeLog | 5 +++++ certreqgen.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) Index: gnupg/sm/ChangeLog diff -u gnupg/sm/ChangeLog:1.101.2.72 gnupg/sm/ChangeLog:1.101.2.73 --- gnupg/sm/ChangeLog:1.101.2.72 Fri Oct 8 13:10:47 2004 +++ gnupg/sm/ChangeLog Fri Oct 22 14:30:52 2004 @@ -1,3 +1,8 @@ +2004-10-22 Werner Koch + + * certreqgen.c (gpgsm_genkey): Remove the NEW from the certificate + request PEM header. This is according to the Sphinx standard. + 2004-10-08 Moritz Schulte * certchain.c (gpgsm_validate_chain): Do not use keydb_new() in Index: gnupg/sm/certreqgen.c diff -u gnupg/sm/certreqgen.c:1.6.2.8 gnupg/sm/certreqgen.c:1.6.2.9 --- gnupg/sm/certreqgen.c:1.6.2.8 Thu Aug 5 11:24:34 2004 +++ gnupg/sm/certreqgen.c Fri Oct 22 14:30:52 2004 @@ -706,7 +706,7 @@ return tmperr; } - ctrl->pem_name = "NEW CERTIFICATE REQUEST"; + ctrl->pem_name = "CERTIFICATE REQUEST"; rc = gpgsm_create_writer (&b64writer, ctrl, out_fp, &writer); if (rc) { From cvs at cvs.gnupg.org Fri Oct 22 14:27:37 2004 From: cvs at cvs.gnupg.org (cvs user wk) Date: Fri Oct 22 14:27:52 2004 Subject: GNUPG-1-9-BRANCH gnupg/tools (ChangeLog Makefile.am gpgsm-gencert.sh) Message-ID: Date: Friday, October 22, 2004 @ 14:31:04 Author: wk Path: /cvs/gnupg/gnupg/tools Tag: GNUPG-1-9-BRANCH Modified: ChangeLog Makefile.am gpgsm-gencert.sh * Makefile.am (bin_SCRIPTS): Add gpgsm-gencert.sh * gpgsm-gencert.sh: Fixed copyright; its part of GnuPG thus FSF. ------------------+ ChangeLog | 6 ++++++ Makefile.am | 2 ++ gpgsm-gencert.sh | 28 ++++++++++++++++------------ 3 files changed, 24 insertions(+), 12 deletions(-) Index: gnupg/tools/ChangeLog diff -u gnupg/tools/ChangeLog:1.25.2.54 gnupg/tools/ChangeLog:1.25.2.55 --- gnupg/tools/ChangeLog:1.25.2.54 Fri Oct 1 18:51:18 2004 +++ gnupg/tools/ChangeLog Fri Oct 22 14:31:04 2004 @@ -1,3 +1,9 @@ +2004-10-22 Werner Koch + + * Makefile.am (bin_SCRIPTS): Add gpgsm-gencert.sh + + * gpgsm-gencert.sh: Fixed copyright; its part of GnuPG thus FSF. + 2004-10-01 Werner Koch * gpgconf-comp.c: Made all strings for --log-file read the same. Index: gnupg/tools/Makefile.am diff -u gnupg/tools/Makefile.am:1.31.2.8 gnupg/tools/Makefile.am:1.31.2.9 --- gnupg/tools/Makefile.am:1.31.2.8 Thu Sep 30 16:34:22 2004 +++ gnupg/tools/Makefile.am Fri Oct 22 14:31:04 2004 @@ -30,6 +30,8 @@ sbin_SCRIPTS = addgnupghome +bin_SCRIPTS = gpgsm-gencert.sh + bin_PROGRAMS = gpgconf watchgnupg gpgconf_SOURCES = gpgconf.c gpgconf.h gpgconf-comp.c no-libgcrypt.c Index: gnupg/tools/gpgsm-gencert.sh diff -u gnupg/tools/gpgsm-gencert.sh:1.1.2.1 gnupg/tools/gpgsm-gencert.sh:1.1.2.2 --- gnupg/tools/gpgsm-gencert.sh:1.1.2.1 Mon Aug 9 13:58:26 2004 +++ gnupg/tools/gpgsm-gencert.sh Fri Oct 22 14:31:04 2004 @@ -1,7 +1,7 @@ #!/bin/sh - -# gpgsm-gencert.c - Generate X.509 certificates through GPGSM. -# Copyright (C) 2004 g10 Code GmbH +# -*- sh -*- +# gpgsm-gencert.c - Generate X.509 certificates through GPGSM. +# Copyright (C) 2004 Free Software Foundation, Inc. # # This file is part of GnuPG. # @@ -37,8 +37,8 @@ { message=$1; shift - echo "$message" - echo -n "> " + echo "$message" >&2 + echo -n "> " >&2 read answer ANSWER=$answer; @@ -49,15 +49,15 @@ message=$1; shift i=0 - echo "$message" + echo "$message" >&2 for choice in "$@"; do i=$(expr $i + 1) - echo " [$i] $choice" + echo " [$i] $choice" >&2 done while true; do j=1 - echo -n "Your selection: " + echo -n "Your selection: " >&2 read idx while [ $j -lt $i -o $j -eq $i ]; do @@ -81,7 +81,7 @@ shift done - echo "You selected: $ANSWER" + echo "You selected: $ANSWER" >&2 } query_user_menu "Key type" "RSA" @@ -90,7 +90,7 @@ query_user_menu "Key length" "1024" "2048" KEY_LENGTH=$ANSWER -query_user_menu "Key usage" "sign, encrypt" +query_user_menu "Key usage" "sign, encrypt" "sign" "encrypt" KEY_USAGE=$ANSWER query_user "Name" @@ -100,6 +100,7 @@ EMAIL_ADDRESS=$ANSWER file_parameter=$(mktemp "/tmp/gpgsm.XXXXXX") +outfile=$(mktemp "/tmp/gpgsm.XXXXXX") cat > "$file_parameter" <&1 +echo -e "$ASSUAN_COMMANDS" | \ + gpgsm --server 4< "$file_parameter" 5>"$outfile" >/dev/null + +cat "$outfile" -rm "$file_parameter" +rm "$file_parameter" "$outfile" exit 0 From cvs at cvs.gnupg.org Fri Oct 22 14:27:59 2004 From: cvs at cvs.gnupg.org (cvs user wk) Date: Fri Oct 22 14:28:16 2004 Subject: GNUPG-1-9-BRANCH gnupg (TODO) Message-ID: Date: Friday, October 22, 2004 @ 14:31:26 Author: wk Path: /cvs/gnupg/gnupg Tag: GNUPG-1-9-BRANCH Modified: TODO Cleaned up ------+ TODO | 7 ------- 1 files changed, 7 deletions(-) Index: gnupg/TODO diff -u gnupg/TODO:1.165.2.31 gnupg/TODO:1.165.2.32 --- gnupg/TODO:1.165.2.31 Wed Sep 29 15:50:31 2004 +++ gnupg/TODO Fri Oct 22 14:31:26 2004 @@ -86,7 +86,6 @@ * doc/ ** Explain how to setup a root CA key as trusted ** Explain how trustlist.txt might be managed. -** Document watchgnupg ** Write a script to generate man pages from texi. * Requirements by the BSI @@ -94,12 +93,6 @@ This needs support in libksba/src/cert.c as well as in sm/*.c. Need test certs as well. Same goes for CRL authorityKeyIdentifier. -** For pkcs#10 request header. - We use "NEW CERTIFICATE REQUEST" the specs say "CERTIFICATE - REQUEST" should be used. However it seems that their CA software - is also able to use our header. Binary pkcs#10 request are not - allowed. - ** Dirmngr: name subordination (nameRelativeToCRLIssuer) is not yet supported by Dirmngr. From cvs at cvs.gnupg.org Fri Oct 22 17:59:38 2004 From: cvs at cvs.gnupg.org (cvs user wk) Date: Fri Oct 22 18:00:00 2004 Subject: GNUPG-1-9-BRANCH gnupg (13 files) Message-ID: Date: Friday, October 22, 2004 @ 18:03:04 Author: wk Path: /cvs/gnupg/gnupg Tag: GNUPG-1-9-BRANCH Modified: ChangeLog Makefile.am NEWS g10/ChangeLog g10/card-util.c g10/g10.c g10/main.h po/ChangeLog po/POTFILES.in po/de.po scd/ChangeLog scd/app-openpgp.c tools/Makefile.am Compile fixes. -------------------+ ChangeLog | 4 + Makefile.am | 3 - NEWS | 6 +- g10/ChangeLog | 9 +++ g10/card-util.c | 30 ++++++++-- g10/g10.c | 8 ++ g10/main.h | 2 po/ChangeLog | 4 + po/POTFILES.in | 1 po/de.po | 149 +++++++++++++++++++++++++++------------------------- scd/ChangeLog | 5 + scd/app-openpgp.c | 8 +- tools/Makefile.am | 2 13 files changed, 143 insertions(+), 88 deletions(-) Index: gnupg/ChangeLog diff -u gnupg/ChangeLog:1.131.2.55 gnupg/ChangeLog:1.131.2.56 --- gnupg/ChangeLog:1.131.2.55 Fri Oct 1 14:54:53 2004 +++ gnupg/ChangeLog Fri Oct 22 18:03:04 2004 @@ -1,3 +1,7 @@ +2004-10-22 Werner Koch + + * Makefile.am (AUTOMAKE_OPTIONS): Set option to create bzip2 tarball. + 2004-10-01 Werner Koch Released 1.9.11. Index: gnupg/Makefile.am diff -u gnupg/Makefile.am:1.46.4.10 gnupg/Makefile.am:1.46.4.11 --- gnupg/Makefile.am:1.46.4.10 Tue Jul 20 20:41:49 2004 +++ gnupg/Makefile.am Fri Oct 22 18:03:04 2004 @@ -1,5 +1,5 @@ # Makefile.am - main makefile for NewPG/GnuPG -# Copyright (C) 2001 Free Software Foundation, Inc. +# Copyright (C) 2001, 2004 Free Software Foundation, Inc. # # This file is part of GnuPG. # @@ -20,6 +20,7 @@ ## Process this file with automake to produce Makefile.in ACLOCAL_AMFLAGS = -I m4 +AUTOMAKE_OPTIONS = dist-bzip2 EXTRA_DIST = scripts/config.rpath autogen.sh README.CVS DISTCLEANFILES = g10defs.h Index: gnupg/NEWS diff -u gnupg/NEWS:1.165.2.54 gnupg/NEWS:1.165.2.55 --- gnupg/NEWS:1.165.2.54 Wed Oct 20 10:54:45 2004 +++ gnupg/NEWS Fri Oct 22 18:03:04 2004 @@ -3,8 +3,10 @@ * [scdaemon] Partly rewrote the PC/SC code. - * Removed the sc-investigate tool. It is now in the separate - gscutils package. + * Removed the sc-investigate tool. It is now in a separate package + available at ftp://ftp.g10code.com/g10code/gscutils/ . + + * [gpg-agent] Fixed logging problem. Noteworthy changes in version 1.9.11 (2004-10-01) Index: gnupg/g10/ChangeLog diff -u gnupg/g10/ChangeLog:1.372.2.51 gnupg/g10/ChangeLog:1.372.2.52 --- gnupg/g10/ChangeLog:1.372.2.51 Thu Sep 30 23:37:09 2004 +++ gnupg/g10/ChangeLog Fri Oct 22 18:03:04 2004 @@ -1,3 +1,12 @@ +2004-10-22 Werner Koch + + * g10.c (main): Display a bit fat warning that this gpg should not + be used. + + * card-util.c (fetch_url): Disable for gnupg 1.9 + (card_generate_subkey): Ditto. + (card_store_subkey): Ditto. + 2004-09-30 Werner Koch * gpgv.c (i18n_init): Always use LC_ALL. Index: gnupg/g10/card-util.c diff -u gnupg/g10/card-util.c:1.1.2.16 gnupg/g10/card-util.c:1.1.2.17 --- gnupg/g10/card-util.c:1.1.2.16 Fri Oct 22 11:41:01 2004 +++ gnupg/g10/card-util.c Fri Oct 22 18:03:04 2004 @@ -523,6 +523,7 @@ static int fetch_url(void) { +#if GNUPG_MAJOR_VERSION == 1 int rc; struct agent_card_info_s info; @@ -560,6 +561,9 @@ log_error("no URL set on card\n"); return rc; +#else + return 0; +#endif } @@ -577,12 +581,14 @@ for (args++; spacep (args); args++) ; fp = fopen (args, "rb"); +#if GNUPG_MAJOR_VERSION == 1 if (fp && is_secured_file (fileno (fp))) { fclose (fp); fp = NULL; errno = EPERM; } +#endif if (!fp) { tty_printf (_("can't open `%s': %s\n"), args, strerror (errno)); @@ -839,6 +845,7 @@ } } +#if GNUPG_MAJOR_VERSION == 1 /* Helper for the key generation/edit functions. */ static void show_card_key_info (struct agent_card_info_s *info) @@ -851,8 +858,9 @@ print_sha1_fpr (NULL, info->fpr3valid? info->fpr3:NULL); tty_printf ("\n"); } +#endif - +#if GNUPG_MAJOR_VERSION == 1 /* Helper for the key generation/edit functions. */ static int replace_existing_key_p (struct agent_card_info_s *info, int keyno) @@ -872,7 +880,7 @@ } return 0; } - +#endif static void @@ -895,10 +903,10 @@ m_free(answer); } #else - /* Does 1.9 have answer_is_yes_no_default() ? */ - want_backup = !(cpr_get_answer_is_yes + want_backup = cpr_get_answer_is_yes ( "cardedit.genkeys.backup_enc", - _("Inhibit off-card backup of encryption key? (y/N) "))); + _("Make off-card backup of encryption key? (Y/n) ")); + /*FIXME: we need answer_is_yes_no_default()*/ #endif if ( (info.fpr1valid && !fpr_is_zero (info.fpr1)) @@ -928,8 +936,12 @@ if (check_pin_for_key_operation (&info, &forced_chv1)) goto leave; +#if GNUPG_MAJOR_VERSION == 1 generate_keypair (NULL, info.serialno, want_backup? opt.homedir:NULL); +#else + generate_keypair (NULL, info.serialno); +#endif leave: agent_release_card_info (&info); @@ -942,6 +954,7 @@ int card_generate_subkey (KBNODE pub_keyblock, KBNODE sec_keyblock) { +#if GNUPG_MAJOR_VERSION == 1 struct agent_card_info_s info; int okay = 0; int forced_chv1 = 0; @@ -988,6 +1001,9 @@ agent_release_card_info (&info); restore_forced_chv1 (&forced_chv1); return okay; +#else + return 0; +#endif } @@ -997,6 +1013,7 @@ int card_store_subkey (KBNODE node, int use) { +#if GNUPG_MAJOR_VERSION == 1 struct agent_card_info_s info; int okay = 0; int rc; @@ -1117,6 +1134,9 @@ free_secret_key (copied_sk); agent_release_card_info (&info); return okay; +#else + return 0; +#endif } Index: gnupg/g10/g10.c diff -u gnupg/g10/g10.c:1.202.2.17 gnupg/g10/g10.c:1.202.2.18 --- gnupg/g10/g10.c:1.202.2.17 Fri Apr 30 18:36:35 2004 +++ gnupg/g10/g10.c Fri Oct 22 18:03:03 2004 @@ -2038,6 +2038,10 @@ } #endif + log_info ("WARNING: This version of gpg is not very matured and\n"); + log_info ("WARNING: only intended for testing. Please keep using\n"); + log_info ("WARNING: gpg 1.2.x, 1.3.x or 1.4.x for OpenPGP\n"); + /* FIXME: We should use the lggging to a file only in server mode; however we have not yet implemetyed that thus we try to get away with --batch as indication for logging to file required. */ @@ -2926,9 +2930,9 @@ case aChangePIN: if (!argc) - change_pin (0); + change_pin (0,1); else if (argc == 1) - change_pin ( atoi (*argv)); + change_pin ( atoi (*argv), 1); else wrong_args ("--change-pin [no]"); break; Index: gnupg/g10/main.h diff -u gnupg/g10/main.h:1.96.2.9 gnupg/g10/main.h:1.96.2.10 --- gnupg/g10/main.h:1.96.2.9 Tue Oct 21 19:12:20 2003 +++ gnupg/g10/main.h Fri Oct 22 18:03:03 2004 @@ -259,7 +259,7 @@ void run_in_pipemode (void); /*-- card-util.c --*/ -void change_pin (int no); +void change_pin (int no, int allow_admin); void card_status (FILE *fp, char *serialnobuf, size_t serialnobuflen); void card_edit (STRLIST commands); Index: gnupg/po/ChangeLog diff -u gnupg/po/ChangeLog:1.50.2.8 gnupg/po/ChangeLog:1.50.2.9 --- gnupg/po/ChangeLog:1.50.2.8 Mon Oct 4 13:52:42 2004 +++ gnupg/po/ChangeLog Fri Oct 22 18:03:03 2004 @@ -1,3 +1,7 @@ +2004-10-22 Werner Koch + + * POTFILES.in: Removed sc-investigate.c + 2004-10-04 Werner Koch * de.po: Typo fixes. Index: gnupg/po/POTFILES.in diff -u gnupg/po/POTFILES.in:1.22.2.4 gnupg/po/POTFILES.in:1.22.2.5 --- gnupg/po/POTFILES.in:1.22.2.4 Thu Sep 30 15:24:33 2004 +++ gnupg/po/POTFILES.in Fri Oct 22 18:03:03 2004 @@ -15,7 +15,6 @@ kbx/kbxutil.c scd/scdaemon.c -scd/sc-investigate.c scd/app-openpgp.c sm/base64.c Index: gnupg/po/de.po diff -u gnupg/po/de.po:1.84.2.12 gnupg/po/de.po:1.84.2.13 --- gnupg/po/de.po:1.84.2.12 Mon Oct 4 13:52:41 2004 +++ gnupg/po/de.po Fri Oct 22 18:03:03 2004 @@ -10,8 +10,8 @@ msgstr "" "Project-Id-Version: gnupg2 1.9.10\n" "Report-Msgid-Bugs-To: translations@gnupg.org\n" -"POT-Creation-Date: 2004-10-01 14:54+0200\n" -"PO-Revision-Date: 2004-10-04 13:48+0200\n" +"POT-Creation-Date: 2004-10-22 15:02+0200\n" +"PO-Revision-Date: 2004-10-22 15:02+0200\n" "Last-Translator: Werner Koch \n" "Language-Team: de\n" "MIME-Version: 1.0\n" @@ -100,12 +100,12 @@ msgstr "erlaube Aufrufern Schlüssel als \"vertrauenswürdig\" zu markieren" #: agent/gpg-agent.c:195 agent/protect-tool.c:134 scd/scdaemon.c:168 -#: scd/sc-investigate.c:113 sm/gpgsm.c:485 tools/gpgconf.c:85 +#: sm/gpgsm.c:485 tools/gpgconf.c:85 msgid "Please report bugs to <" msgstr "Fehlerberichte bitte an <" #: agent/gpg-agent.c:195 agent/protect-tool.c:134 scd/scdaemon.c:168 -#: scd/sc-investigate.c:113 sm/gpgsm.c:485 tools/gpgconf.c:85 +#: sm/gpgsm.c:485 tools/gpgconf.c:85 msgid ">.\n" msgstr ">.\n" @@ -126,48 +126,48 @@ msgid "invalid debug-level `%s' given\n" msgstr "ungültige Debugebene `%s' angegeben\n" -#: agent/gpg-agent.c:446 agent/protect-tool.c:1050 kbx/kbxutil.c:431 -#: scd/scdaemon.c:357 scd/sc-investigate.c:181 sm/gpgsm.c:726 +#: agent/gpg-agent.c:448 agent/protect-tool.c:1050 kbx/kbxutil.c:431 +#: scd/scdaemon.c:357 sm/gpgsm.c:726 #, c-format msgid "libgcrypt is too old (need %s, have %s)\n" msgstr "" "Die Bibliothek \"libgcrypt\" is zu alt (benötigt wird %s, vorhanden ist %s)\n" -#: agent/gpg-agent.c:519 scd/scdaemon.c:437 sm/gpgsm.c:824 +#: agent/gpg-agent.c:521 scd/scdaemon.c:437 sm/gpgsm.c:824 #, c-format msgid "NOTE: no default option file `%s'\n" msgstr "Notiz: Voreingestellte Konfigurationsdatei `%s' fehlt\n" -#: agent/gpg-agent.c:524 agent/gpg-agent.c:998 scd/scdaemon.c:442 +#: agent/gpg-agent.c:526 agent/gpg-agent.c:1000 scd/scdaemon.c:442 #: sm/gpgsm.c:828 #, c-format msgid "option file `%s': %s\n" msgstr "Konfigurationsdatei `%s': %s\n" -#: agent/gpg-agent.c:532 scd/scdaemon.c:450 sm/gpgsm.c:835 +#: agent/gpg-agent.c:534 scd/scdaemon.c:450 sm/gpgsm.c:835 #, c-format msgid "reading options from `%s'\n" msgstr "Optionen werden aus `%s' gelesen\n" -#: agent/gpg-agent.c:1031 agent/gpg-agent.c:1065 +#: agent/gpg-agent.c:1033 agent/gpg-agent.c:1067 #, c-format msgid "can't create directory `%s': %s\n" msgstr "Das Verzeichniss `%s' kann nicht erstell werden: %s\n" -#: agent/gpg-agent.c:1034 agent/gpg-agent.c:1070 +#: agent/gpg-agent.c:1036 agent/gpg-agent.c:1072 #, c-format msgid "directory `%s' created\n" msgstr "Verzeichniss `%s' wurde erstellt\n" -#: agent/gpg-agent.c:1248 +#: agent/gpg-agent.c:1250 msgid "no gpg-agent running in this session\n" msgstr "Der gpg-agent läuft nicht für diese Session\n" -#: agent/gpg-agent.c:1255 common/simple-pwquery.c:286 sm/call-agent.c:128 +#: agent/gpg-agent.c:1257 common/simple-pwquery.c:286 sm/call-agent.c:128 msgid "malformed GPG_AGENT_INFO environment variable\n" msgstr "Die Variable GPG_AGENT_INFO ist fehlerhaft\n" -#: agent/gpg-agent.c:1267 common/simple-pwquery.c:298 sm/call-agent.c:140 +#: agent/gpg-agent.c:1269 common/simple-pwquery.c:298 sm/call-agent.c:140 #, c-format msgid "gpg-agent protocol version %d is not supported\n" msgstr "Das gpg-agent Protocol %d wird nicht unterstützt\n" @@ -327,7 +327,7 @@ msgid "problem with the agent\n" msgstr "Problem mit dem Agenten\n" -#: jnlib/logging.c:555 +#: jnlib/logging.c:621 #, c-format msgid "you found a bug ... (%s:%d)\n" msgstr "Sie haben einen Bug (Softwarefehler) gefunden ... (%s:%d)\n" @@ -432,100 +432,87 @@ "Bitte die Option `--daemon' nutzen um das Programm im Hintergund " "auszuführen\n" -#: scd/sc-investigate.c:116 -msgid "Usage: sc-investigate [options] (-h for help)\n" -msgstr "Gebrauch: sc-investigate [Optionen] (-h für Hilfe)\n" - -#: scd/sc-investigate.c:118 -msgid "" -"Syntax: sc-investigate [options] [args]]\n" -"Have a look at smartcards\n" -msgstr "" -"Gebrauch: sc-investigate [Optionen] [Argumente]\n" -"Den Inhalt einer Smartcard inspizieren\n" - -#: scd/app-openpgp.c:458 +#: scd/app-openpgp.c:534 #, c-format msgid "failed to store the fingerprint: %s\n" msgstr "Der Fingerprint kann nicht gespeichert werden: %s\n" -#: scd/app-openpgp.c:471 +#: scd/app-openpgp.c:547 #, c-format msgid "failed to store the creation date: %s\n" msgstr "Das Erzeugungsdatum kann nicht gespeichert werden: %s\n" -#: scd/app-openpgp.c:656 scd/app-openpgp.c:745 +#: scd/app-openpgp.c:732 scd/app-openpgp.c:821 scd/app-openpgp.c:1313 #, c-format msgid "PIN callback returned error: %s\n" msgstr "Fehler vom PIN \"callback\": %s\n" -#: scd/app-openpgp.c:662 scd/app-openpgp.c:751 scd/app-openpgp.c:1236 +#: scd/app-openpgp.c:738 scd/app-openpgp.c:827 scd/app-openpgp.c:1319 #, c-format -msgid "prassphrase (CHV%d) is too short; minimum length is %d\n" -msgstr "Die Passphrase (CHV%d) ist zu kurz; Mindestlänge ist %d\n" +msgid "PIN for CHV%d is too short; minimum length is %d\n" +msgstr "Die PIN für den CHV%d ist zu kurz; Mindestlänge ist %d\n" -#: scd/app-openpgp.c:671 scd/app-openpgp.c:685 scd/app-openpgp.c:761 -#: scd/app-openpgp.c:1245 scd/app-openpgp.c:1259 +#: scd/app-openpgp.c:747 scd/app-openpgp.c:761 scd/app-openpgp.c:837 +#: scd/app-openpgp.c:1328 scd/app-openpgp.c:1342 #, c-format msgid "verify CHV%d failed: %s\n" msgstr "Prüfen von CHV%d fehlgeschlagen: %s\n" -#: scd/app-openpgp.c:708 +#: scd/app-openpgp.c:784 msgid "access to admin commands is not configured\n" msgstr "Zugriff auf Admin Kommandos ist nicht konfiguriert\n" -#: scd/app-openpgp.c:725 +#: scd/app-openpgp.c:801 msgid "error retrieving CHV status from card\n" msgstr "Fehler beim Holen des CHV Status von der Karte\n" -#: scd/app-openpgp.c:731 +#: scd/app-openpgp.c:807 msgid "card is permanently locked!\n" msgstr "Die Karte ist dauerhaft gesperrt!\n" -#: scd/app-openpgp.c:738 +#: scd/app-openpgp.c:814 #, c-format msgid "%d Admin PIN attempts remaining before card is permanently locked\n" msgstr "" "Noch %d Admin PIN Versuche möglich bevor die Karte dauerhaft gesperrt wird\n" -#: scd/app-openpgp.c:742 +#: scd/app-openpgp.c:818 msgid "Admin PIN" msgstr "Admin PIN" -#: scd/app-openpgp.c:1504 -msgid "can't access CHV Status Bytes - invalid OpenPGP card?\n" -msgstr "" -"Zugriff auf die CHV Status Bytes nicht möglich - ungültige OpenPGP Karte?\n" +#: scd/app-openpgp.c:1301 +#, c-format +msgid "PIN [sigs done: %lu]" +msgstr "PIN [erzeugte signaturen: %lu]" -#: scd/app-openpgp.c:1514 -msgid "can't access Extended Capability Flags - invalid OpenPGP card?\n" -msgstr "" -"Zugriff auf die Extended Capability Flags nicht möglich - ungültige OpenPGP " -"Karte?\n" +#: scd/app-openpgp.c:1587 scd/app-openpgp.c:1597 +#, c-format +msgid "can't access %s - invalid OpenPGP card?\n" +msgstr "Zugriff auf %s nicht möglich - ungültige OpenPGP Karte?\n" -#: scd/app-openpgp.c:1584 +#: scd/app-openpgp.c:1668 #, c-format msgid "error getting serial number: %s\n" msgstr "Fehler beim Holen der Seriennummer: %s\n" -#: scd/app-openpgp.c:1679 +#: scd/app-openpgp.c:1763 #, c-format msgid "failed to store the key: %s\n" msgstr "Fehler beim Speichern des Schlüssels: %s\n" -#: scd/app-openpgp.c:1721 +#: scd/app-openpgp.c:1805 msgid "reading the key failed\n" msgstr "Fehler beim Lesen des Schlüssels: %s\n" -#: scd/app-openpgp.c:1728 +#: scd/app-openpgp.c:1812 msgid "response does not contain the public key data\n" msgstr "Die Antwort enthält keine Public Key Daten\n" -#: scd/app-openpgp.c:1736 +#: scd/app-openpgp.c:1820 msgid "response does not contain the RSA modulus\n" msgstr "Die Antwort enthält keinen RSA Modulus\n" -#: scd/app-openpgp.c:1747 +#: scd/app-openpgp.c:1831 msgid "response does not contain the RSA public exponent\n" msgstr "Die Antwort enthält keinen öffenlichen RSA Exponent\n" @@ -664,7 +651,7 @@ msgid "number of issuers matching: %d\n" msgstr "Anzahl der übereinstimmenden Heruasgeber: %d\n" -#: sm/certchain.c:403 sm/certchain.c:561 sm/certchain.c:921 sm/decrypt.c:260 +#: sm/certchain.c:403 sm/certchain.c:562 sm/certchain.c:922 sm/decrypt.c:260 #: sm/encrypt.c:341 sm/sign.c:324 sm/verify.c:106 msgid "failed to allocated keyDB handle\n" msgstr "Ein keyDB Handle konnte nicht bereitgestellt werden\n" @@ -691,64 +678,64 @@ msgid "checking the CRL failed: %s" msgstr "Die CRL konnte nicht geprüft werden: %s" -#: sm/certchain.c:581 +#: sm/certchain.c:582 msgid "no issuer found in certificate" msgstr "Im Zertifikat ist kein Herausgeber enthalten" -#: sm/certchain.c:594 +#: sm/certchain.c:595 #, c-format msgid "certificate with invalid validity: %s" msgstr "Zertifikat mit unzulässiger Gültigkeit: %s" -#: sm/certchain.c:610 +#: sm/certchain.c:611 msgid "certificate not yet valid" msgstr "Das Zertifikat ist noch nicht gültig" -#: sm/certchain.c:623 +#: sm/certchain.c:624 msgid "certificate has expired" msgstr "Das Zertifikat ist abgelaufen" -#: sm/certchain.c:660 +#: sm/certchain.c:661 msgid "selfsigned certificate has a BAD signature" msgstr "Das eigenbeglaubigte Zertifikat hat eine FALSCHE Signatur" -#: sm/certchain.c:674 +#: sm/certchain.c:675 msgid "root certificate is not marked trusted" msgstr "Das Wurzelzertifikat ist nicht als vertrauenswürdig markiert" -#: sm/certchain.c:685 +#: sm/certchain.c:686 #, c-format msgid "fingerprint=%s\n" msgstr "Fingerprint=%s\n" -#: sm/certchain.c:690 +#: sm/certchain.c:691 msgid "root certificate has now been marked as trusted\n" msgstr "Das Wurzelzertifikat wurde nun als vertrauenswürdig markiert\n" -#: sm/certchain.c:705 +#: sm/certchain.c:706 #, c-format msgid "checking the trust list failed: %s\n" msgstr "Fehler beim Prüfen der vertrauenswürdigen Zertifikate: %s\n" -#: sm/certchain.c:731 sm/import.c:166 +#: sm/certchain.c:732 sm/import.c:166 msgid "certificate chain too long\n" msgstr "Der Zertifikatkette ist zu lang\n" -#: sm/certchain.c:743 +#: sm/certchain.c:744 msgid "issuer certificate not found" msgstr "Herausgeberzertifikat nicht gefunden" -#: sm/certchain.c:776 +#: sm/certchain.c:777 msgid "certificate has a BAD signature" msgstr "Das Zertifikat hat eine FALSCHE Signatur" -#: sm/certchain.c:799 +#: sm/certchain.c:800 msgid "found another possible matching CA certificate - trying again" msgstr "" "Eine anderes möglicherweise passendes CA-Zertifikat gefunden - versuche " "nochmal" -#: sm/certchain.c:822 +#: sm/certchain.c:823 #, c-format msgid "certificate chain longer than allowed by CA (%d)" msgstr "Die Zertifikatkette ist länger als von der CA erlaubt (%d)" @@ -1361,7 +1348,8 @@ msgid "Options useful for debugging" msgstr "Nützliche Optionen zum Debuggen" -#: tools/gpgconf-comp.c:460 +#: tools/gpgconf-comp.c:460 tools/gpgconf-comp.c:537 tools/gpgconf-comp.c:586 +#: tools/gpgconf-comp.c:639 tools/gpgconf-comp.c:715 msgid "|FILE|write server mode logs to FILE" msgstr "|DATEI|Schreibe im Servermodus Logs auf DATEI" @@ -1389,6 +1377,25 @@ msgid "Configuration for OCSP" msgstr "Konfiguration zu OCSP" +#, fuzzy +#~ msgid "passphrase (CHV%d) is too short; minimum length is %d\n" +#~ msgstr "Die Passphrase (CHV%d) ist zu kurz; Mindestlänge ist %d\n" + +#~ msgid "Usage: sc-investigate [options] (-h for help)\n" +#~ msgstr "Gebrauch: sc-investigate [Optionen] (-h für Hilfe)\n" + +#~ msgid "" +#~ "Syntax: sc-investigate [options] [args]]\n" +#~ "Have a look at smartcards\n" +#~ msgstr "" +#~ "Gebrauch: sc-investigate [Optionen] [Argumente]\n" +#~ "Den Inhalt einer Smartcard inspizieren\n" + +#~ msgid "can't access Extended Capability Flags - invalid OpenPGP card?\n" +#~ msgstr "" +#~ "Zugriff auf die Extended Capability Flags nicht möglich - ungültige " +#~ "OpenPGP Karte?\n" + #~ msgid "Enter passphrase:" #~ msgstr "Bitte das Mantra (Passphrase) eingeben:" Index: gnupg/scd/ChangeLog diff -u gnupg/scd/ChangeLog:1.25.2.57 gnupg/scd/ChangeLog:1.25.2.58 --- gnupg/scd/ChangeLog:1.25.2.57 Fri Oct 22 11:41:56 2004 +++ gnupg/scd/ChangeLog Fri Oct 22 18:03:03 2004 @@ -1,3 +1,8 @@ +2004-10-22 Werner Koch + + * app-openpgp.c (verify_chv3): The minium length for CHV3 is + 8. Changed string to match the other ones. + 2004-10-21 Werner Koch * app-openpgp.c (do_sign): Replace asprintf by direct allocation. Index: gnupg/scd/app-openpgp.c diff -u gnupg/scd/app-openpgp.c:1.9.2.22 gnupg/scd/app-openpgp.c:1.9.2.23 --- gnupg/scd/app-openpgp.c:1.9.2.22 Fri Oct 22 11:41:56 2004 +++ gnupg/scd/app-openpgp.c Fri Oct 22 18:03:03 2004 @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: app-openpgp.c,v 1.9.2.22 2004/10/22 09:41:56 wk Exp $ + * $Id: app-openpgp.c,v 1.9.2.23 2004/10/22 16:03:03 wk Exp $ */ #include @@ -822,10 +822,10 @@ return rc; } - if (strlen (pinvalue) < 6) + if (strlen (pinvalue) < 8) { - log_error (_("passphrase (CHV%d) is too short;" - " minimum length is %d\n"), 3, 6); + log_error (_("PIN for CHV%d is too short;" + " minimum length is %d\n"), 3, 8); xfree (pinvalue); return gpg_error (GPG_ERR_BAD_PIN); } Index: gnupg/tools/Makefile.am diff -u gnupg/tools/Makefile.am:1.31.2.9 gnupg/tools/Makefile.am:1.31.2.10 --- gnupg/tools/Makefile.am:1.31.2.9 Fri Oct 22 14:31:04 2004 +++ gnupg/tools/Makefile.am Fri Oct 22 18:03:02 2004 @@ -19,7 +19,7 @@ EXTRA_DIST = Manifest watchgnupg.c \ rfc822parse.c rfc822parse.h gpgparsemail.c \ - addgnupghome + addgnupghome gpgsm-gencert.sh AM_CPPFLAGS = -I$(top_srcdir)/intl -I$(top_srcdir)/common include $(top_srcdir)/am/cmacros.am From cvs at cvs.gnupg.org Fri Oct 22 18:55:17 2004 From: cvs at cvs.gnupg.org (cvs user marcus) Date: Fri Oct 22 18:55:28 2004 Subject: gpgme/gpgme (ChangeLog engine-gpgsm.c) Message-ID: Date: Friday, October 22, 2004 @ 18:55:17 Author: marcus Path: /cvs/gnupg/gpgme/gpgme Modified: ChangeLog engine-gpgsm.c 2004-10-22 Marcus Brinkmann * engine-gpgsm.c (map_assuan_error): Return 0 if ERR is 0. (start): Call map_assuan_error on return value of assuan_write_line. ----------------+ ChangeLog | 6 ++++++ engine-gpgsm.c | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) From cvs at cvs.gnupg.org Fri Oct 22 19:57:57 2004 From: cvs at cvs.gnupg.org (cvs user marcus) Date: Fri Oct 22 19:58:04 2004 Subject: gpgme/gpgme (ChangeLog verify.c) Message-ID: Date: Friday, October 22, 2004 @ 19:57:57 Author: marcus Path: /cvs/gnupg/gpgme/gpgme Modified: ChangeLog verify.c 2004-10-03 Marcus Brinkmann * verify.c (parse_trust): If no reason is provided, set SIG->validity_reason to 0. (calc_sig_summary): Set GPGME_SIGSUM_CRL_TOO_OLD if appropriate. -----------+ ChangeLog | 6 ++++++ verify.c | 10 +++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) From cvs at cvs.gnupg.org Fri Oct 22 20:11:33 2004 From: cvs at cvs.gnupg.org (cvs user marcus) Date: Fri Oct 22 20:15:28 2004 Subject: gpgme (NEWS) Message-ID: Date: Friday, October 22, 2004 @ 20:11:33 Author: marcus Path: /cvs/gnupg/gpgme Modified: NEWS Add item about 1.0.1. ------+ NEWS | 7 +++++++ 1 files changed, 7 insertions(+) From cvs at cvs.gnupg.org Fri Oct 22 20:16:50 2004 From: cvs at cvs.gnupg.org (cvs user marcus) Date: Fri Oct 22 20:16:57 2004 Subject: gpgme (ChangeLog configure.ac) Message-ID: Date: Friday, October 22, 2004 @ 20:16:50 Author: marcus Path: /cvs/gnupg/gpgme Modified: ChangeLog configure.ac 2004-10-22 Marcus Brinkmann * configure.ac: Set HAVE_GPGSM to true only if $GPGSM is not "no". --------------+ ChangeLog | 4 ++++ configure.ac | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) From cvs at cvs.gnupg.org Fri Oct 22 20:19:04 2004 From: cvs at cvs.gnupg.org (cvs user marcus) Date: Fri Oct 22 20:19:10 2004 Subject: gpgme (ChangeLog configure.ac) Message-ID: Date: Friday, October 22, 2004 @ 20:19:04 Author: marcus Path: /cvs/gnupg/gpgme Modified: ChangeLog configure.ac 2004-10-22 Marcus Brinkmann * configure.ac (LIBGPGME_LT_REVISION): Bump up to 2. (AC_INIT): Set version to 1.0.1. --------------+ ChangeLog | 3 +++ configure.ac | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) From cvs at cvs.gnupg.org Fri Oct 22 20:21:43 2004 From: cvs at cvs.gnupg.org (cvs user marcus) Date: Fri Oct 22 20:21:49 2004 Subject: gpgme (ChangeLog) Message-ID: Date: Friday, October 22, 2004 @ 20:21:43 Author: marcus Path: /cvs/gnupg/gpgme Modified: ChangeLog 2004-10-22 Marcus Brinkmann * configure.ac (LIBGPGME_LT_REVISION): Bump up to 2. (AC_INIT): Set version to 1.0.1. -----------+ ChangeLog | 2 ++ 1 files changed, 2 insertions(+) From cvs at cvs.gnupg.org Fri Oct 22 21:44:44 2004 From: cvs at cvs.gnupg.org (cvs user wk) Date: Fri Oct 22 21:45:03 2004 Subject: GNUPG-1-9-BRANCH gnupg (ChangeLog NEWS configure.ac) Message-ID: Date: Friday, October 22, 2004 @ 21:48:12 Author: wk Path: /cvs/gnupg/gnupg Tag: GNUPG-1-9-BRANCH Modified: ChangeLog NEWS configure.ac Releasing 1.9.12 --------------+ ChangeLog | 2 ++ NEWS | 2 +- configure.ac | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) Index: gnupg/ChangeLog diff -u gnupg/ChangeLog:1.131.2.56 gnupg/ChangeLog:1.131.2.57 --- gnupg/ChangeLog:1.131.2.56 Fri Oct 22 18:03:04 2004 +++ gnupg/ChangeLog Fri Oct 22 21:48:12 2004 @@ -1,5 +1,7 @@ 2004-10-22 Werner Koch + Released 1.9.12. + * Makefile.am (AUTOMAKE_OPTIONS): Set option to create bzip2 tarball. 2004-10-01 Werner Koch Index: gnupg/NEWS diff -u gnupg/NEWS:1.165.2.55 gnupg/NEWS:1.165.2.56 --- gnupg/NEWS:1.165.2.55 Fri Oct 22 18:03:04 2004 +++ gnupg/NEWS Fri Oct 22 21:48:12 2004 @@ -1,4 +1,4 @@ -Noteworthy changes in version 1.9.12 +Noteworthy changes in version 1.9.12 (2004-10-22) ------------------------------------------------- * [scdaemon] Partly rewrote the PC/SC code. Index: gnupg/configure.ac diff -u gnupg/configure.ac:1.36.2.65 gnupg/configure.ac:1.36.2.66 --- gnupg/configure.ac:1.36.2.65 Fri Oct 1 15:31:46 2004 +++ gnupg/configure.ac Fri Oct 22 21:48:12 2004 @@ -24,7 +24,7 @@ # Version number: Remember to change it immediately *after* a release. # Add a "-cvs" prefix for non-released code. -AC_INIT(gnupg, 1.9.12-cvs, gnupg-devel@gnupg.org) +AC_INIT(gnupg, 1.9.12, gnupg-devel@gnupg.org) # Set development_version to yes if the minor number is odd or you # feel that the default check for a development version is not # sufficient. From cvs at cvs.gnupg.org Fri Oct 22 21:53:34 2004 From: cvs at cvs.gnupg.org (cvs user wk) Date: Fri Oct 22 21:53:46 2004 Subject: GNUPG-1-9-BRANCH gnupg (NEWS configure.ac) Message-ID: Date: Friday, October 22, 2004 @ 21:57:03 Author: wk Path: /cvs/gnupg/gnupg Tag: GNUPG-1-9-BRANCH Modified: NEWS configure.ac Post release preparations --------------+ NEWS | 4 ++++ configure.ac | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) Index: gnupg/NEWS diff -u gnupg/NEWS:1.165.2.56 gnupg/NEWS:1.165.2.57 --- gnupg/NEWS:1.165.2.56 Fri Oct 22 21:48:12 2004 +++ gnupg/NEWS Fri Oct 22 21:57:03 2004 @@ -1,3 +1,7 @@ +Noteworthy changes in version 1.9.13 +------------------------------------------------- + + Noteworthy changes in version 1.9.12 (2004-10-22) ------------------------------------------------- Index: gnupg/configure.ac diff -u gnupg/configure.ac:1.36.2.66 gnupg/configure.ac:1.36.2.67 --- gnupg/configure.ac:1.36.2.66 Fri Oct 22 21:48:12 2004 +++ gnupg/configure.ac Fri Oct 22 21:57:03 2004 @@ -20,11 +20,11 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.52) -min_automake_version="1.7.6" +min_automake_version="1.7.9" # Version number: Remember to change it immediately *after* a release. # Add a "-cvs" prefix for non-released code. -AC_INIT(gnupg, 1.9.12, gnupg-devel@gnupg.org) +AC_INIT(gnupg, 1.9.13-cvs, gnupg-devel@gnupg.org) # Set development_version to yes if the minor number is odd or you # feel that the default check for a development version is not # sufficient. From cvs at cvs.gnupg.org Tue Oct 26 09:47:01 2004 From: cvs at cvs.gnupg.org (cvs user wk) Date: Tue Oct 26 10:19:17 2004 Subject: gnupg/g10 (ChangeLog card-util.c passphrase.c) Message-ID: Date: Tuesday, October 26, 2004 @ 09:50:47 Author: wk Path: /cvs/gnupg/gnupg/g10 Modified: ChangeLog card-util.c passphrase.c (agent_send_all_options): Try to deduce the ttyname from stdin. --------------+ ChangeLog | 14 ++++++++++++++ card-util.c | 26 +++++++++++++++++++++++--- passphrase.c | 8 ++++++-- 3 files changed, 43 insertions(+), 5 deletions(-) Index: gnupg/g10/ChangeLog diff -u gnupg/g10/ChangeLog:1.627 gnupg/g10/ChangeLog:1.628 --- gnupg/g10/ChangeLog:1.627 Thu Oct 21 21:18:47 2004 +++ gnupg/g10/ChangeLog Tue Oct 26 09:50:47 2004 @@ -1,3 +1,17 @@ +2004-10-26 Werner Koch + + * app-openpgp.c (verify_chv3): The minimum length for CHV3 is + 8. Changed string to match the other ones. + + * passphrase.c (agent_send_all_options): Try to deduce the ttyname + from stdin. + +2004-10-22 Werner Koch + + * card-util.c (fetch_url): Disable for gnupg 1.9 + (card_generate_subkey): Ditto. + (card_store_subkey): Ditto. + 2004-10-21 David Shaw * options.h, g10.c (main), mainproc.c (check_sig_and_print): Index: gnupg/g10/card-util.c diff -u gnupg/g10/card-util.c:1.18 gnupg/g10/card-util.c:1.19 --- gnupg/g10/card-util.c:1.18 Thu Oct 21 18:56:22 2004 +++ gnupg/g10/card-util.c Tue Oct 26 09:50:47 2004 @@ -523,6 +523,7 @@ static int fetch_url(void) { +#if GNUPG_MAJOR_VERSION == 1 int rc; struct agent_card_info_s info; @@ -560,6 +561,9 @@ log_error("no URL set on card\n"); return rc; +#else + return 0; +#endif } @@ -577,12 +581,14 @@ for (args++; spacep (args); args++) ; fp = fopen (args, "rb"); +#if GNUPG_MAJOR_VERSION == 1 if (fp && is_secured_file (fileno (fp))) { fclose (fp); fp = NULL; errno = EPERM; } +#endif if (!fp) { tty_printf (_("can't open `%s': %s\n"), args, strerror (errno)); @@ -839,6 +845,7 @@ } } +#if GNUPG_MAJOR_VERSION == 1 /* Helper for the key generation/edit functions. */ static void show_card_key_info (struct agent_card_info_s *info) @@ -851,8 +858,9 @@ print_sha1_fpr (NULL, info->fpr3valid? info->fpr3:NULL); tty_printf ("\n"); } +#endif - +#if GNUPG_MAJOR_VERSION == 1 /* Helper for the key generation/edit functions. */ static int replace_existing_key_p (struct agent_card_info_s *info, int keyno) @@ -872,7 +880,7 @@ } return 0; } - +#endif static void @@ -898,7 +906,7 @@ want_backup = cpr_get_answer_is_yes ( "cardedit.genkeys.backup_enc", _("Make off-card backup of encryption key? (Y/n) ")); -#warning we need answer_is_yes_no_default() + /*FIXME: we need answer_is_yes_no_default()*/ #endif if ( (info.fpr1valid && !fpr_is_zero (info.fpr1)) @@ -928,8 +936,12 @@ if (check_pin_for_key_operation (&info, &forced_chv1)) goto leave; +#if GNUPG_MAJOR_VERSION == 1 generate_keypair (NULL, info.serialno, want_backup? opt.homedir:NULL); +#else + generate_keypair (NULL, info.serialno); +#endif leave: agent_release_card_info (&info); @@ -942,6 +954,7 @@ int card_generate_subkey (KBNODE pub_keyblock, KBNODE sec_keyblock) { +#if GNUPG_MAJOR_VERSION == 1 struct agent_card_info_s info; int okay = 0; int forced_chv1 = 0; @@ -988,6 +1001,9 @@ agent_release_card_info (&info); restore_forced_chv1 (&forced_chv1); return okay; +#else + return 0; +#endif } @@ -997,6 +1013,7 @@ int card_store_subkey (KBNODE node, int use) { +#if GNUPG_MAJOR_VERSION == 1 struct agent_card_info_s info; int okay = 0; int rc; @@ -1117,6 +1134,9 @@ free_secret_key (copied_sk); agent_release_card_info (&info); return okay; +#else + return 0; +#endif } Index: gnupg/g10/passphrase.c diff -u gnupg/g10/passphrase.c:1.64 gnupg/g10/passphrase.c:1.65 --- gnupg/g10/passphrase.c:1.64 Sun Oct 17 15:28:37 2004 +++ gnupg/g10/passphrase.c Tue Oct 26 09:50:47 2004 @@ -377,9 +377,13 @@ if (!opt.ttyname) { + const char *tmp; + dft_ttyname = getenv ("GPG_TTY"); - if ((!dft_ttyname || !*dft_ttyname) && tty_get_ttyname ()) - dft_ttyname = tty_get_ttyname (); + if ((!dft_ttyname || !*dft_ttyname) && (tmp=ttyname (0))) + dft_ttyname = tmp; + if ((!dft_ttyname || !*dft_ttyname) && (tmp=tty_get_ttyname ())) + dft_ttyname = tmp; } if (opt.ttyname || dft_ttyname) { From cvs at cvs.gnupg.org Tue Oct 26 14:39:59 2004 From: cvs at cvs.gnupg.org (cvs user wk) Date: Tue Oct 26 14:40:14 2004 Subject: gnupg/util (ChangeLog strgutil.c) Message-ID: Date: Tuesday, October 26, 2004 @ 14:43:49 Author: wk Path: /cvs/gnupg/gnupg/util Modified: ChangeLog strgutil.c (mem2str): Translated comment to English. (handle_iconv_error) [USE_GNUPG_ICONV]: New. (set_native_charset) [USE_GNUPG_ICONV]: Added iconv based conversion checks. (native_to_utf8, utf8_to_native): Added iconv based conversion. ------------+ ChangeLog | 8 + strgutil.c | 347 ++++++++++++++++++++++++++++++++++++++++++++++------------- 2 files changed, 284 insertions(+), 71 deletions(-) Index: gnupg/util/ChangeLog diff -u gnupg/util/ChangeLog:1.161 gnupg/util/ChangeLog:1.162 --- gnupg/util/ChangeLog:1.161 Thu Oct 21 18:56:21 2004 +++ gnupg/util/ChangeLog Tue Oct 26 14:43:49 2004 @@ -1,3 +1,11 @@ +2004-10-26 Werner Koch + + * strgutil.c (mem2str): Translated comment to English. + (handle_iconv_error) [USE_GNUPG_ICONV]: New. + (set_native_charset) [USE_GNUPG_ICONV]: Added iconv based + conversion checks. + (native_to_utf8, utf8_to_native): Added iconv based conversion. + 2004-10-21 Werner Koch * vasprintf.c: Removed. It was used only at one place and I don't Index: gnupg/util/strgutil.c diff -u gnupg/util/strgutil.c:1.40 gnupg/util/strgutil.c:1.41 --- gnupg/util/strgutil.c:1.40 Sun Sep 28 19:15:46 2003 +++ gnupg/util/strgutil.c Tue Oct 26 14:43:49 2004 @@ -23,15 +23,26 @@ #include #include #include +#include #ifdef HAVE_LANGINFO_CODESET #include #endif +#ifndef HAVE_ICONV +#undef USE_GNUPG_ICONV +#endif + +#ifdef USE_GNUPG_ICONV +#include +#include +#endif + #include "types.h" #include "util.h" #include "memory.h" +#include "i18n.h" - +#ifndef USE_GNUPG_ICONV static ushort koi8_unicode[128] = { 0x2500,0x2502,0x250c,0x2510,0x2514,0x2518,0x251c,0x2524, 0x252c,0x2534,0x253c,0x2580,0x2584,0x2588,0x258c,0x2590, @@ -69,11 +80,18 @@ 0x0111,0x0144,0x0148,0x00F3,0x00F4,0x0151,0x00F6,0x00F7, 0x0159,0x016F,0x00FA,0x0171,0x00FC,0x00FD,0x0163,0x02D9 }; +#endif /*!USE_GNUPG_ICONV*/ + + +#ifndef MB_LEN_MAX +#define MB_LEN_MAX 16 +#endif static const char *active_charset_name = "iso-8859-1"; static ushort *active_charset = NULL; static int no_translation = 0; +static int use_iconv = 0; void free_strlist( STRLIST sl ) @@ -101,7 +119,7 @@ } /**************** - * ame as add_to_strlist() but if is_utf8 is *not* set a conversion + * Same as add_to_strlist() but if is_utf8 is *not* set a conversion * to UTF8 is done */ STRLIST @@ -192,7 +210,7 @@ } /**************** - * look for the substring SUB in buffer and return a pointer to that + * Look for the substring SUB in buffer and return a pointer to that * substring in BUF or NULL if not found. * Comparison is case-insensitive. */ @@ -234,12 +252,11 @@ return NULL ; } -/**************** - * Wie strncpy(), aber es werden maximal n-1 zeichen kopiert und ein - * '\0' angehängt. Ist n = 0, so geschieht nichts, ist Destination - * gleich NULL, so wird via m_alloc Speicher besorgt, ist dann nicht - * genügend Speicher vorhanden, so bricht die funktion ab. - */ + +/* Like strncpy() but copy at max N-1 bytes and append a '\0'. With + * N given as 0 nothing is copied at all. With DEST given as NULL + * sufficient memory is allocated using m_alloc (note that m_alloc is + * guaranteed to succeed or to abort the process). */ char * mem2str( char *dest , const void *src , size_t n ) { @@ -260,8 +277,8 @@ } -/**************** - * remove leading and trailing white spaces +/* + * Remove leading and trailing white spaces */ char * trim_spaces( char *str ) @@ -269,10 +286,10 @@ char *string, *p, *mark; string = str; - /* find first non space character */ + /* Find first non space character. */ for( p=string; *p && isspace( *(byte*)p ) ; p++ ) ; - /* move characters */ + /* Move characters. */ for( (mark = NULL); (*string = *p); string++, p++ ) if( isspace( *(byte*)p ) ) { if( !mark ) @@ -281,7 +298,7 @@ else mark = NULL ; if( mark ) - *mark = '\0' ; /* remove trailing spaces */ + *mark = '\0' ; /* Remove trailing spaces. */ return str ; } @@ -311,7 +328,7 @@ } /**************** - * remove trailing white spaces and return the length of the buffer + * Remove trailing white spaces and return the length of the buffer */ unsigned trim_trailing_ws( byte *line, unsigned len ) @@ -319,6 +336,7 @@ return trim_trailing_chars( line, len, " \t\r\n" ); } + unsigned int check_trailing_chars( const byte *line, unsigned int len, const char *trimchars ) @@ -341,8 +359,9 @@ return len; } + /**************** - * remove trailing white spaces and return the length of the buffer + * Remove trailing white spaces and return the length of the buffer */ unsigned int check_trailing_ws( const byte *line, unsigned int len ) @@ -362,17 +381,46 @@ return count; } +#ifdef USE_GNUPG_ICONV +static void +handle_iconv_error (const char *from, const char *to, int use_fallback) +{ + if (errno == EINVAL) + log_error (_("conversion from `%s' to `%s' not available\n"), + from, "utf-8"); + else + log_error (_("iconv_open failed: %s\n"), strerror (errno)); + + if (use_fallback) + { + /* To avoid further error messages we fallback to Latin-1 for the + native encoding. This is justified as one can expect that on a + utf-8 enabled system nl_langinfo() will work and thus we won't + never get to here. Thus Latin-1 seems to be a reasonable + default. */ + active_charset_name = "iso-8859-1"; + no_translation = 0; + active_charset = NULL; + use_iconv = 0; + } +} +#endif /*USE_GNUPG_ICONV*/ int set_native_charset( const char *newset ) { + const char *full_newset; + if (!newset) + { #ifdef HAVE_LANGINFO_CODESET newset = nl_langinfo (CODESET); #else - newset = "8859-1"; + newset = "iso-8859-1"; #endif + } + full_newset = newset; if (strlen (newset) > 3 && !ascii_memcasecmp (newset, "iso", 3)) { newset += 3; if (*newset == '-' || *newset == '_') @@ -385,25 +433,54 @@ active_charset_name = "iso-8859-1"; no_translation = 0; active_charset = NULL; + use_iconv = 0; + } + else if( !ascii_strcasecmp (newset, "utf8" ) + || !ascii_strcasecmp(newset, "utf-8") ) { + active_charset_name = "utf-8"; + no_translation = 1; + active_charset = NULL; + use_iconv = 0; } +#ifdef USE_GNUPG_ICONV + else { + iconv_t cd; + + cd = iconv_open (full_newset, "utf-8"); + if (cd == (iconv_t)-1) + { + handle_iconv_error (full_newset, "utf-8", 0); + return G10ERR_GENERAL; + } + iconv_close (cd); + cd = iconv_open ("utf-8", full_newset); + if (cd == (iconv_t)-1) + { + handle_iconv_error ("utf-8", full_newset, 0); + return G10ERR_GENERAL; + } + iconv_close (cd); + active_charset_name = full_newset; + no_translation = 0; + active_charset = NULL; + use_iconv = 1; + } +#else /*!USE_GNUPG_ICONV*/ else if( !ascii_strcasecmp( newset, "8859-2" ) ) { active_charset_name = "iso-8859-2"; no_translation = 0; active_charset = latin2_unicode; + use_iconv = 0; } else if( !ascii_strcasecmp( newset, "koi8-r" ) ) { active_charset_name = "koi8-r"; no_translation = 0; active_charset = koi8_unicode; - } - else if( !ascii_strcasecmp (newset, "utf8" ) - || !ascii_strcasecmp(newset, "utf-8") ) { - active_charset_name = "utf-8"; - no_translation = 1; - active_charset = NULL; + use_iconv = 0; } else return G10ERR_GENERAL; +#endif /*!USE_GNUPG_ICONV*/ return 0; } @@ -420,57 +497,110 @@ char * native_to_utf8( const char *string ) { - const byte *s; - char *buffer; - byte *p; - size_t length=0; - - if (no_translation) { - buffer = m_strdup (string); - } - else if( active_charset ) { - for(s=string; *s; s++ ) { - length++; - if( *s & 0x80 ) - length += 2; /* we may need 3 bytes */ - } - buffer = m_alloc( length + 1 ); - for(p=buffer, s=string; *s; s++ ) { - if( *s & 0x80 ) { - ushort val = active_charset[ *s & 0x7f ]; - if( val < 0x0800 ) { - *p++ = 0xc0 | ( (val >> 6) & 0x1f ); - *p++ = 0x80 | ( val & 0x3f ); - } - else { - *p++ = 0xe0 | ( (val >> 12) & 0x0f ); - *p++ = 0x80 | ( (val >> 6) & 0x3f ); - *p++ = 0x80 | ( val & 0x3f ); - } - } - else - *p++ = *s; + const byte *s; + char *buffer; + byte *p; + size_t length=0; + + if (no_translation) + { /* Already utf-8 encoded. */ + buffer = m_strdup (string); + } + else if( !active_charset && !use_iconv) /* Shortcut implementation + for Latin-1. */ + { + for(s=string; *s; s++ ) + { + length++; + if( *s & 0x80 ) + length++; } - *p = 0; + buffer = m_alloc( length + 1 ); + for(p=buffer, s=string; *s; s++ ) + { + if( *s & 0x80 ) + { + *p++ = 0xc0 | ((*s >> 6) & 3); + *p++ = 0x80 | ( *s & 0x3f ); + } + else + *p++ = *s; + } + *p = 0; } - else { - for(s=string; *s; s++ ) { - length++; - if( *s & 0x80 ) - length++; - } - buffer = m_alloc( length + 1 ); - for(p=buffer, s=string; *s; s++ ) { - if( *s & 0x80 ) { - *p++ = 0xc0 | ((*s >> 6) & 3); - *p++ = 0x80 | ( *s & 0x3f ); - } - else - *p++ = *s; - } - *p = 0; + else /* Need to use a translation table. */ + { +#ifdef USE_GNUPG_ICONV + iconv_t cd; + const char *inptr; + char *outptr; + size_t inbytes, outbytes; + + cd = iconv_open (active_charset_name, "utf-8"); + if (cd == (iconv_t)-1) + { + handle_iconv_error (active_charset_name, "utf-8", 1); + return native_to_utf8 (string); + } + + for (s=string; *s; s++ ) + { + length++; + if ((*s & 0x80)) + length += 5; /* We may need up to 6 bytes for the utf8 output. */ + } + buffer = m_alloc (length + 1); + + inptr = string; + inbytes = strlen (string); + outptr = buffer; + outbytes = length; + if ( iconv (cd, (ICONV_CONST char **)&inptr, &inbytes, + &outptr, &outbytes) == (size_t)-1) + { + log_error (_("conversion from `%s' to `%s' failed: %s\n"), + active_charset_name, "utf-8", strerror (errno)); + /* We don't do any conversion at all but use the strings as is. */ + strcpy (buffer, string); + } + else /* Success. */ + { + *outptr = 0; + /* We could realloc the buffer now but I doubt that it makes + much sense given that it will get freed anyway soon + after. */ + } + iconv_close (cd); + +#else /*!USE_GNUPG_ICONV*/ + for(s=string; *s; s++ ) + { + length++; + if( *s & 0x80 ) + length += 2; /* We may need up to 3 bytes. */ + } + buffer = m_alloc( length + 1 ); + for(p=buffer, s=string; *s; s++ ) { + if( *s & 0x80 ) { + ushort val = active_charset[ *s & 0x7f ]; + if( val < 0x0800 ) { + *p++ = 0xc0 | ( (val >> 6) & 0x1f ); + *p++ = 0x80 | ( val & 0x3f ); + } + else { + *p++ = 0xe0 | ( (val >> 12) & 0x0f ); + *p++ = 0x80 | ( (val >> 6) & 0x3f ); + *p++ = 0x80 | ( val & 0x3f ); + } + } + else + *p++ = *s; + } + *p = 0; +#endif /*!USE_GNUPG_ICONV*/ + } - return buffer; + return buffer; } @@ -604,6 +734,30 @@ n += encidx; encidx = 0; } +#ifdef USE_GNUPG_ICONV + else if(use_iconv) { + /* Our strategy for using iconv is a bit + * strange but it better keeps compatibility + * with previous versions in regard to how + * invalid encodings are displayed. What we + * do is to keep the utf-8 as is and have the + * real translation step then at the end. + * Yes, I know that this is ugly. However we + * are short of the 1.4 release and for this + * branch we should not mee too much around + * with iconv things. One reason for this is + * that we don't know enough about non-GNU + * iconv implementation and want to minimize + * the risk of breaking the code on too many + * platforms. */ + if( p ) { + for(i=0; i < encidx; i++ ) + *p++ = encbuf[i]; + } + n += encidx; + encidx = 0; + } +#endif /*USE_GNUPG_ICONV*/ else if( active_charset ) { /* table lookup */ for(i=0; i < 128; i++ ) { if( active_charset[i] == val ) @@ -647,6 +801,57 @@ if( !buffer ) { /* allocate the buffer after the first pass */ buffer = p = m_alloc( n + 1 ); } +#ifdef USE_GNUPG_ICONV + else if(use_iconv) { + /* Note: See above for comments. */ + iconv_t cd; + const char *inptr; + char *outbuf, *outptr; + size_t inbytes, outbytes; + + *p = 0; /* Terminate the buffer. */ + + cd = iconv_open ("utf-8", active_charset_name); + if (cd == (iconv_t)-1) + { + handle_iconv_error ("utf-8", active_charset_name, 1); + m_free (buffer); + return utf8_to_native (string, length, delim); + } + + /* Allocate a new buffer large enough to hold all possible + * encodings. */ + n = p - buffer + 1; + inbytes = n - 1;; + inptr = buffer; + outbytes = n * MB_LEN_MAX; + if (outbytes / MB_LEN_MAX != n) + BUG (); /* Actually an overflow. */ + outbuf = outptr = m_alloc (outbytes); + if ( iconv (cd, (ICONV_CONST char **)&inptr, &inbytes, + &outptr, &outbytes) == (size_t)-1) { + log_error (_("conversion from `%s' to `%s' failed: %s\n"), + "utf-8", active_charset_name, strerror (errno)); + /* Didn't worked out. Temporary disable the use of + * iconv and fall back to our old code. */ + m_free (buffer); + buffer = NULL; + m_free (outbuf); + use_iconv = 0; + outbuf = utf8_to_native (string, length, delim); + use_iconv = 1; + } + else { /* Success. */ + *outptr = 0; + /* We could realloc the buffer now but I doubt that it makes + much sense given that it will get freed anyway soon + after. */ + m_free (buffer); + } + iconv_close (cd); + return outbuf; + } +#endif /*USE_GNUPG_ICONV*/ else { *p = 0; /* make a string */ return buffer; From cvs at cvs.gnupg.org Tue Oct 26 14:40:30 2004 From: cvs at cvs.gnupg.org (cvs user wk) Date: Tue Oct 26 14:40:41 2004 Subject: gnupg (ChangeLog README configure.ac) Message-ID: Date: Tuesday, October 26, 2004 @ 14:44:21 Author: wk Path: /cvs/gnupg/gnupg Modified: ChangeLog README configure.ac * configure.ac: New option --disable-gnupg-iconv, define USE_GNUPG_ICONV. --------------+ ChangeLog | 5 +++++ README | 11 +++++++++++ configure.ac | 18 +++++++++++++++++- 3 files changed, 33 insertions(+), 1 deletion(-) Index: gnupg/ChangeLog diff -u gnupg/ChangeLog:1.215 gnupg/ChangeLog:1.216 --- gnupg/ChangeLog:1.215 Thu Oct 21 21:15:07 2004 +++ gnupg/ChangeLog Tue Oct 26 14:44:21 2004 @@ -1,3 +1,8 @@ +2004-10-26 Werner Koch + + * configure.ac: New option --disable-gnupg-iconv, define + USE_GNUPG_ICONV. + 2004-10-21 David Shaw * acinclude.m4: aclocal 1.9 wants quoting on AC_DEFUN arguments. Index: gnupg/README diff -u gnupg/README:1.86 gnupg/README:1.87 --- gnupg/README:1.86 Fri Oct 15 15:16:58 2004 +++ gnupg/README Tue Oct 26 14:44:21 2004 @@ -605,6 +605,17 @@ This prevents access to certain files and won't allow import or export of secret keys. + --disable-gnupg-iconv + If iconv is available it is used to convert + between utf-8 and the system character set. This + is in general the preferable solution. However + the code is new and under some cirumstances it may + give different output than with the limited old + support. This option allows to explicity disable + the use of iconv. Note, that iconv is also + disabled if getext has been disabled. + + Installation Problems --------------------- Index: gnupg/configure.ac diff -u gnupg/configure.ac:1.106 gnupg/configure.ac:1.107 --- gnupg/configure.ac:1.106 Thu Oct 21 18:56:22 2004 +++ gnupg/configure.ac Tue Oct 26 14:44:21 2004 @@ -19,7 +19,7 @@ dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA dnl dnl (Process this file with autoconf to produce a configure script.) -dnlAC_REVISION($Revision: 1.106 $)dnl +dnlAC_REVISION($Revision: 1.107 $)dnl AC_PREREQ(2.59) min_automake_version="1.7.9" @@ -124,6 +124,13 @@ case "$readline_support" in yes);; no);; *)readline_support=yes;; esac AC_MSG_RESULT($readline_support) +AC_MSG_CHECKING([whether the new iconv based code is requested]) +AC_ARG_ENABLE(gnupg-iconv, + AC_HELP_STRING([--disable-gnupg-iconv], + [disable the new iconv code]), + gnupg_use_iconv=$enableval, gnupg_use_iconv=yes) +AC_MSG_RESULT($gnupg_use_iconv) + dnl See if we are disabling any algorithms or features for a smaller dnl binary @@ -732,12 +739,21 @@ AC_DEFINE(ENABLE_SELINUX_HACKS,1,[Define to enable SELinux support]) fi +if test "$gnupg_use_iconv" = yes ; then + AC_DEFINE(USE_GNUPG_ICONV,1,[Define to use the new iconv based code]) +fi + + AM_CONDITIONAL(ENABLE_CARD_SUPPORT, test "$card_support" = yes) dnl Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS(unistd.h langinfo.h termio.h locale.h getopt.h) +# Note that we do not check for iconv here because this is done anyway +# by the gettext checks and thus it allows us to disable the use of +# iconv by using --disable-nls. + dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST From cvs at cvs.gnupg.org Tue Oct 26 21:28:50 2004 From: cvs at cvs.gnupg.org (cvs user wk) Date: Tue Oct 26 21:29:02 2004 Subject: gnupg/scripts (ChangeLog autogen.sh mail-to-translators) Message-ID: Date: Tuesday, October 26, 2004 @ 21:32:44 Author: wk Path: /cvs/gnupg/gnupg/scripts Modified: ChangeLog autogen.sh mail-to-translators Detect the Debian mingw32 package. ---------------------+ ChangeLog | 4 ++++ autogen.sh | 40 +++++++++++++++++++++++++--------------- mail-to-translators | 32 ++++++++++++++++++++++++-------- 3 files changed, 53 insertions(+), 23 deletions(-) Index: gnupg/scripts/ChangeLog diff -u gnupg/scripts/ChangeLog:1.55 gnupg/scripts/ChangeLog:1.56 --- gnupg/scripts/ChangeLog:1.55 Mon Oct 18 09:40:11 2004 +++ gnupg/scripts/ChangeLog Tue Oct 26 21:32:44 2004 @@ -1,3 +1,7 @@ +2004-10-26 Werner Koch + + * autogen.sh: Detect the Debian mingw32 package. + 2004-10-18 Werner Koch * mk-gpg-texi: More fixups to help Debian's install-info. Index: gnupg/scripts/autogen.sh diff -u gnupg/scripts/autogen.sh:1.23 gnupg/scripts/autogen.sh:1.24 --- gnupg/scripts/autogen.sh:1.23 Fri Oct 1 12:11:26 2004 +++ gnupg/scripts/autogen.sh Tue Oct 26 21:32:44 2004 @@ -45,32 +45,42 @@ tmp=`dirname $0` tsdir=`cd "$tmp"; cd ..; pwd` shift - host=i386--mingw32 if [ ! -f $tsdir/scripts/config.guess ]; then echo "$tsdir/scripts/config.guess not found" >&2 exit 1 fi build=`$tsdir/scripts/config.guess` - - if ! mingw32 --version >/dev/null; then - echo "We need at least version 0.3 of MingW32/CPD" >&2 - exit 1 - fi + # See whether we have the Debian cross compiler package or the + # old mingw32/cpd system + if i586-mingw32msvc-gcc --version >/dev/null 2>&1 ; then + host=i586-mingw32msvc + crossbindir=/usr/$host/bin + conf_CC="CC=${host}-gcc" + else + host=i386--mingw32 + if ! mingw32 --version >/dev/null; then + echo "We need at least version 0.3 of MingW32/CPD" >&2 + exit 1 + fi + crossbindir=`mingw32 --install-dir`/bin + # Old autoconf version required us to setup the environment + # with the proper tool names. + CC=`mingw32 --get-path gcc` + CPP=`mingw32 --get-path cpp` + AR=`mingw32 --get-path ar` + RANLIB=`mingw32 --get-path ranlib` + export CC CPP AR RANLIB + conf_CC="" + fi + if [ -f "$tsdir/config.log" ]; then - if ! head $tsdir/config.log | grep i386--mingw32 >/dev/null; then + if ! head $tsdir/config.log | grep "$host" >/dev/null; then echo "Pease run a 'make distclean' first" >&2 exit 1 fi fi - crossbindir=`mingw32 --install-dir`/bin - CC=`mingw32 --get-path gcc` - CPP=`mingw32 --get-path cpp` - AR=`mingw32 --get-path ar` - RANLIB=`mingw32 --get-path ranlib` - export CC CPP AR RANLIB - disable_foo_tests="" if [ -n "$lib_config_files" ]; then for i in $lib_config_files; do @@ -87,7 +97,7 @@ fi [ $DIE = yes ] && exit 1 - $tsdir/configure --build=${build} --host=${host} \ + $tsdir/configure ${conf_CC} --build=${build} --host=${host} \ ${disable_foo_tests} $* # Ugly hack to overcome a gettext problem. Someone should look into Index: gnupg/scripts/mail-to-translators diff -u gnupg/scripts/mail-to-translators:1.4 gnupg/scripts/mail-to-translators:1.5 --- gnupg/scripts/mail-to-translators:1.4 Wed Sep 11 17:25:47 2002 +++ gnupg/scripts/mail-to-translators Tue Oct 26 21:32:44 2004 @@ -6,7 +6,10 @@ SENDMAIL=": /usr/sbin/sendmail" for file in *.po; do + addr=$(head -100 $file | awk '/^# ?Designated-Translator:/ { printf "%s", $0; exit 0}' | sed 's/.*\(<.*>\).*/\1/') + if [ -z "$addr" ]; then addr=$(awk '/Last-Translator:/ { printf "%s", $0; exit 0}' $file | sed 's/.*\(<.*>\).*/\1/') + fi ll=$(basename $file .po) if ! msgfmt -vc $file 2>&1| egrep -q 'fuzzy|untranslated|error'; then @@ -23,6 +26,7 @@ ( cat <&1 | head) If you are not able to continue the translation work, I suggest to -pass this message on to another translator and drop me a short note. +pass this message on to another translator and drop a a short note to +gnupg-hackers@gnupg.org . + Thanks, @@ -68,3 +83,4 @@ ) | $SENDMAIL -oi "$addr" done + From cvs at cvs.gnupg.org Tue Oct 26 21:32:25 2004 From: cvs at cvs.gnupg.org (cvs user wk) Date: Tue Oct 26 21:32:35 2004 Subject: gnupg/m4 (Makefile.in) Message-ID: Date: Tuesday, October 26, 2004 @ 21:36:13 Author: wk Path: /cvs/gnupg/gnupg/m4 Removed: Makefile.in We don't want this file in the CVS -------------+ Makefile.in | 337 ---------------------------------------------------------- 1 files changed, 337 deletions(-) Index: gnupg/m4/Makefile.in diff -u gnupg/m4/Makefile.in:1.6 gnupg/m4/Makefile.in:removed --- gnupg/m4/Makefile.in:1.6 Thu Oct 14 09:21:16 2004 +++ gnupg/m4/Makefile.in Tue Oct 26 21:36:13 2004 @@ -1,337 +0,0 @@ -# Makefile.in generated by automake 1.7.9 from Makefile.am. -# @configure_input@ - -# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 -# Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# 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. - -@SET_MAKE@ - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = .. - -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -host_triplet = @host@ -ACLOCAL = @ACLOCAL@ -ALLOCA = @ALLOCA@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@ -CAPLIBS = @CAPLIBS@ -CATOBJEXT = @CATOBJEXT@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CROSS_COMPILING_FALSE = @CROSS_COMPILING_FALSE@ -CROSS_COMPILING_TRUE = @CROSS_COMPILING_TRUE@ -CYGPATH_W = @CYGPATH_W@ -DATADIRNAME = @DATADIRNAME@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLIBS = @DLLIBS@ -DOCBOOK_TO_MAN = @DOCBOOK_TO_MAN@ -DOCBOOK_TO_TEXI = @DOCBOOK_TO_TEXI@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -ENABLE_BZIP2_SUPPORT_FALSE = @ENABLE_BZIP2_SUPPORT_FALSE@ -ENABLE_BZIP2_SUPPORT_TRUE = @ENABLE_BZIP2_SUPPORT_TRUE@ -ENABLE_CARD_SUPPORT_FALSE = @ENABLE_CARD_SUPPORT_FALSE@ -ENABLE_CARD_SUPPORT_TRUE = @ENABLE_CARD_SUPPORT_TRUE@ -ENABLE_LOCAL_ZLIB_FALSE = @ENABLE_LOCAL_ZLIB_FALSE@ -ENABLE_LOCAL_ZLIB_TRUE = @ENABLE_LOCAL_ZLIB_TRUE@ -EXEEXT = @EXEEXT@ -FAQPROG = @FAQPROG@ -GENCAT = @GENCAT@ -GETOPT = @GETOPT@ -GLIBC21 = @GLIBC21@ -GMSGFMT = @GMSGFMT@ -GPGKEYS_FINGER = @GPGKEYS_FINGER@ -GPGKEYS_HKP = @GPGKEYS_HKP@ -GPGKEYS_HTTP = @GPGKEYS_HTTP@ -GPGKEYS_LDAP = @GPGKEYS_LDAP@ -GPGKEYS_LDAP_FALSE = @GPGKEYS_LDAP_FALSE@ -GPGKEYS_LDAP_TRUE = @GPGKEYS_LDAP_TRUE@ -GPGKEYS_MAILTO = @GPGKEYS_MAILTO@ -HAVE_ASPRINTF = @HAVE_ASPRINTF@ -HAVE_DOCBOOK_TO_MAN_FALSE = @HAVE_DOCBOOK_TO_MAN_FALSE@ -HAVE_DOCBOOK_TO_MAN_TRUE = @HAVE_DOCBOOK_TO_MAN_TRUE@ -HAVE_DOCBOOK_TO_TEXI_FALSE = @HAVE_DOCBOOK_TO_TEXI_FALSE@ -HAVE_DOCBOOK_TO_TEXI_TRUE = @HAVE_DOCBOOK_TO_TEXI_TRUE@ -HAVE_DOSISH_SYSTEM_FALSE = @HAVE_DOSISH_SYSTEM_FALSE@ -HAVE_DOSISH_SYSTEM_TRUE = @HAVE_DOSISH_SYSTEM_TRUE@ -HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@ -HAVE_SNPRINTF = @HAVE_SNPRINTF@ -HAVE_WPRINTF = @HAVE_WPRINTF@ -IDEA_O = @IDEA_O@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INSTOBJEXT = @INSTOBJEXT@ -INTLBISON = @INTLBISON@ -INTLLIBS = @INTLLIBS@ -INTLOBJS = @INTLOBJS@ -INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@ -LDAPLIBS = @LDAPLIBS@ -LDFLAGS = @LDFLAGS@ -LIBICONV = @LIBICONV@ -LIBINTL = @LIBINTL@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBUSB_LIBS = @LIBUSB_LIBS@ -LN_S = @LN_S@ -LTLIBICONV = @LTLIBICONV@ -LTLIBINTL = @LTLIBINTL@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ -MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ -MAKEINFO = @MAKEINFO@ -MKINSTALLDIRS = @MKINSTALLDIRS@ -MPI_EXTRA_ASM_OBJS = @MPI_EXTRA_ASM_OBJS@ -MPI_OPT_FLAGS = @MPI_OPT_FLAGS@ -MPI_SFLAGS = @MPI_SFLAGS@ -MSGFMT = @MSGFMT@ -MSGMERGE = @MSGMERGE@ -NETLIBS = @NETLIBS@ -NM = @NM@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PERL = @PERL@ -POSUB = @POSUB@ -RANLIB = @RANLIB@ -REGEX_O = @REGEX_O@ -SENDMAIL = @SENDMAIL@ -SET_MAKE = @SET_MAKE@ -SHA512_O = @SHA512_O@ -SHELL = @SHELL@ -SRVLIBS = @SRVLIBS@ -STRIP = @STRIP@ -USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@ -USE_NLS = @USE_NLS@ -VERSION = @VERSION@ -W32LIBS = @W32LIBS@ -WORKING_FAQPROG_FALSE = @WORKING_FAQPROG_FALSE@ -WORKING_FAQPROG_TRUE = @WORKING_FAQPROG_TRUE@ -XGETTEXT = @XGETTEXT@ -ZLIBS = @ZLIBS@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_RANLIB = @ac_ct_RANLIB@ -ac_ct_STRIP = @ac_ct_STRIP@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -datadir = @datadir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -oldincludedir = @oldincludedir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sysconfdir = @sysconfdir@ -target = @target@ -target_alias = @target_alias@ -target_cpu = @target_cpu@ -target_os = @target_os@ -target_vendor = @target_vendor@ -EXTRA_DIST = intmax.m4 longdouble.m4 longlong.m4 printf-posix.m4 signed.m4 size_max.m4 wchar_t.m4 wint_t.m4 xsize.m4 codeset.m4 gettext.m4 glibc21.m4 iconv.m4 intdiv0.m4 inttypes.m4 inttypes_h.m4 inttypes-pri.m4 isc-posix.m4 lcmessage.m4 lib-ld.m4 lib-link.m4 lib-prefix.m4 nls.m4 po.m4 progtest.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4 -subdir = m4 -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -mkinstalldirs = $(SHELL) $(top_srcdir)/scripts/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -DIST_SOURCES = -DIST_COMMON = $(srcdir)/Makefile.in ChangeLog Makefile.am -all: all-am - -.SUFFIXES: -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4) - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu m4/Makefile -Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) -uninstall-info-am: -tags: TAGS -TAGS: - -ctags: CTAGS -CTAGS: - -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - -top_distdir = .. -distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkinstalldirs) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ - if test -d $$d/$$file; then \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ - fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ - else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile - -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -rm -f $(CONFIG_CLEAN_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic - -dvi: dvi-am - -dvi-am: - -info: info-am - -info-am: - -install-data-am: - -install-exec-am: - -install-info: install-info-am - -install-man: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-info-am - -.PHONY: all all-am check check-am clean clean-generic distclean \ - distclean-generic distdir dvi dvi-am info info-am install \ - install-am install-data install-data-am install-exec \ - install-exec-am install-info install-info-am install-man \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am \ - uninstall-info-am - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: From cvs at cvs.gnupg.org Wed Oct 27 14:00:20 2004 From: cvs at cvs.gnupg.org (cvs user wk) Date: Wed Oct 27 14:00:30 2004 Subject: gnupg/util (ChangeLog strgutil.c) Message-ID: Date: Wednesday, October 27, 2004 @ 14:04:14 Author: wk Path: /cvs/gnupg/gnupg/util Modified: ChangeLog strgutil.c (load_libiconv) [_WIN32]: new. (set_native_charset) [_WIN32]: Call it here and autodetect the used code page. (native_to_utf8, utf8_to_native): Reverted arguments for iconv_open. (handle_iconv_error): Made this function match iconv_open argumnet ordering. ------------+ ChangeLog | 10 +++++ strgutil.c | 118 +++++++++++++++++++++++++++++++++++++++++++++++++---------- 2 files changed, 109 insertions(+), 19 deletions(-) Index: gnupg/util/ChangeLog diff -u gnupg/util/ChangeLog:1.162 gnupg/util/ChangeLog:1.163 --- gnupg/util/ChangeLog:1.162 Tue Oct 26 14:43:49 2004 +++ gnupg/util/ChangeLog Wed Oct 27 14:04:14 2004 @@ -1,3 +1,13 @@ +2004-10-27 Werner Koch + + * strgutil.c (load_libiconv) [_WIN32]: new. + (set_native_charset) [_WIN32]: Call it here and autodetect the + used code page. + (native_to_utf8, utf8_to_native): Reverted arguments for + iconv_open. + (handle_iconv_error): Made this function match iconv_open argumnet + ordering. + 2004-10-26 Werner Koch * strgutil.c (mem2str): Translated comment to English. Index: gnupg/util/strgutil.c diff -u gnupg/util/strgutil.c:1.41 gnupg/util/strgutil.c:1.42 --- gnupg/util/strgutil.c:1.41 Tue Oct 26 14:43:49 2004 +++ gnupg/util/strgutil.c Wed Oct 27 14:04:14 2004 @@ -28,19 +28,27 @@ #include #endif -#ifndef HAVE_ICONV -#undef USE_GNUPG_ICONV +/* For W32 we use dynamic loading of the iconv dll and don't need any + * iconv headers at all. */ +#ifndef _WIN32 +# ifndef HAVE_ICONV +# undef USE_GNUPG_ICONV +# endif #endif #ifdef USE_GNUPG_ICONV -#include -#include +# include +# ifndef _WIN32 +# include +# endif #endif #include "types.h" #include "util.h" #include "memory.h" #include "i18n.h" +#include "dynload.h" + #ifndef USE_GNUPG_ICONV static ushort koi8_unicode[128] = { @@ -93,6 +101,63 @@ static int no_translation = 0; static int use_iconv = 0; + +#ifdef _WIN32 +typedef void* iconv_t; +#ifndef ICONV_CONST +#define ICONV_CONST const +#endif + +iconv_t (* __stdcall iconv_open) (const char *tocode, const char *fromcode); +size_t (* __stdcall iconv) (iconv_t cd, + const char **inbuf, size_t *inbytesleft, + char **outbuf, size_t *outbytesleft); +int (* __stdcall iconv_close) (iconv_t cd); + +#endif /*_WIN32*/ + + + +#ifdef _WIN32 +static int +load_libiconv (void) +{ + static int done; + + if (!done) + { + void *handle; + + done = 1; /* Do it right now because we might get called recursivly + through gettext. */ + + handle = dlopen ("iconv.dll", RTLD_LAZY); + if (handle) + { + iconv_open = dlsym (handle, "libiconv_open"); + if (iconv_open) + iconv = dlsym (handle, "libiconv"); + if (iconv) + iconv_close = dlsym (handle, "libiconv_close"); + } + if (!handle || !iconv_close) + { + log_error (_("error loading `%s': %s\n"), + "iconv.dll", dlerror ()); + iconv_open = NULL; + iconv = NULL; + iconv_close = NULL; + if (handle) + dlclose (handle); + } + } + return iconv_open? 0: -1; +} +#endif /* _WIN32 */ + + + + void free_strlist( STRLIST sl ) { @@ -383,11 +448,11 @@ #ifdef USE_GNUPG_ICONV static void -handle_iconv_error (const char *from, const char *to, int use_fallback) +handle_iconv_error (const char *to, const char *from, int use_fallback) { if (errno == EINVAL) log_error (_("conversion from `%s' to `%s' not available\n"), - from, "utf-8"); + from, to); else log_error (_("iconv_open failed: %s\n"), strerror (errno)); @@ -411,14 +476,26 @@ { const char *full_newset; - if (!newset) - { + if (!newset) { +#ifdef _WIN32 + static char codepage[30]; + + sprintf (codepage, "CP%u", (unsigned int)GetACP ()); + + /* If it is the Windows name for Latin-1 we use the + * standard name instead to avoid loading of iconv.dll. */ + if (!strcmp (codepage, "CP1252")) + newset = "iso-8859-1"; + else + newset = codepage; +#else #ifdef HAVE_LANGINFO_CODESET newset = nl_langinfo (CODESET); #else newset = "iso-8859-1"; #endif - } +#endif + } full_newset = newset; if (strlen (newset) > 3 && !ascii_memcasecmp (newset, "iso", 3)) { @@ -446,19 +523,22 @@ else { iconv_t cd; +#ifdef _WIN32 + if (load_libiconv ()) + return G10ERR_GENERAL; +#endif /*_WIN32*/ + cd = iconv_open (full_newset, "utf-8"); - if (cd == (iconv_t)-1) - { + if (cd == (iconv_t)-1) { handle_iconv_error (full_newset, "utf-8", 0); return G10ERR_GENERAL; - } + } iconv_close (cd); cd = iconv_open ("utf-8", full_newset); - if (cd == (iconv_t)-1) - { + if (cd == (iconv_t)-1) { handle_iconv_error ("utf-8", full_newset, 0); return G10ERR_GENERAL; - } + } iconv_close (cd); active_charset_name = full_newset; no_translation = 0; @@ -536,10 +616,10 @@ char *outptr; size_t inbytes, outbytes; - cd = iconv_open (active_charset_name, "utf-8"); + cd = iconv_open ("utf-8", active_charset_name); if (cd == (iconv_t)-1) { - handle_iconv_error (active_charset_name, "utf-8", 1); + handle_iconv_error ("utf-8", active_charset_name, 1); return native_to_utf8 (string); } @@ -811,10 +891,10 @@ *p = 0; /* Terminate the buffer. */ - cd = iconv_open ("utf-8", active_charset_name); + cd = iconv_open (active_charset_name, "utf-8"); if (cd == (iconv_t)-1) { - handle_iconv_error ("utf-8", active_charset_name, 1); + handle_iconv_error (active_charset_name, "utf-8", 1); m_free (buffer); return utf8_to_native (string, length, delim); } From cvs at cvs.gnupg.org Thu Oct 28 03:54:02 2004 From: cvs at cvs.gnupg.org (cvs user dshaw) Date: Thu Oct 28 03:54:16 2004 Subject: gnupg/g10 (7 files) Message-ID: Date: Thursday, October 28, 2004 @ 03:58:01 Author: dshaw Path: /cvs/gnupg/gnupg/g10 Modified: ChangeLog delkey.c export.c keyedit.c pkclist.c revoke.c skclist.c * delkey.c, export.c, keyedit.c, pkclist.c, revoke.c, skclist.c: Fix a few missed possible \"username\" quotes. -----------+ ChangeLog | 5 +++++ delkey.c | 2 +- export.c | 2 +- keyedit.c | 23 +++++++++++++---------- pkclist.c | 2 +- revoke.c | 11 ++++++----- skclist.c | 36 +++++++++++++++++++++--------------- 7 files changed, 48 insertions(+), 33 deletions(-) Index: gnupg/g10/ChangeLog diff -u gnupg/g10/ChangeLog:1.628 gnupg/g10/ChangeLog:1.629 --- gnupg/g10/ChangeLog:1.628 Tue Oct 26 09:50:47 2004 +++ gnupg/g10/ChangeLog Thu Oct 28 03:58:01 2004 @@ -1,3 +1,8 @@ +2004-10-27 David Shaw + + * delkey.c, export.c, keyedit.c, pkclist.c, revoke.c, skclist.c: + Fix a few missed possible \"username\" quotes. + 2004-10-26 Werner Koch * app-openpgp.c (verify_chv3): The minimum length for CHV3 is Index: gnupg/g10/delkey.c diff -u gnupg/g10/delkey.c:1.17 gnupg/g10/delkey.c:1.18 --- gnupg/g10/delkey.c:1.17 Sun Oct 10 17:27:14 2004 +++ gnupg/g10/delkey.c Thu Oct 28 03:58:01 2004 @@ -71,7 +71,7 @@ || desc.mode == KEYDB_SEARCH_MODE_FPR20); rc = desc.mode? keydb_search (hd, &desc, 1):G10ERR_INV_USER_ID; if (rc) { - log_error (_("key `%s' not found: %s\n"), username, g10_errstr (rc)); + log_error (_("key \"%s\" not found: %s\n"), username, g10_errstr (rc)); write_status_text( STATUS_DELETE_PROBLEM, "1" ); goto leave; } Index: gnupg/g10/export.c diff -u gnupg/g10/export.c:1.40 gnupg/g10/export.c:1.41 --- gnupg/g10/export.c:1.40 Thu Oct 14 12:48:15 2004 +++ gnupg/g10/export.c Thu Oct 28 03:58:01 2004 @@ -159,7 +159,7 @@ if (classify_user_id (sl->d, desc+ndesc)) ndesc++; else - log_error (_("key `%s' not found: %s\n"), + log_error (_("key \"%s\" not found: %s\n"), sl->d, g10_errstr (G10ERR_INV_USER_ID)); } Index: gnupg/g10/keyedit.c diff -u gnupg/g10/keyedit.c:1.153 gnupg/g10/keyedit.c:1.154 --- gnupg/g10/keyedit.c:1.153 Fri Oct 15 15:16:57 2004 +++ gnupg/g10/keyedit.c Thu Oct 28 03:58:01 2004 @@ -1338,18 +1338,21 @@ afp[an++] = 0; rc = keydb_search_fpr (sec_kdbhd, afp); } - if (!rc) { + if (!rc) + { rc = keydb_get_keyblock (sec_kdbhd, &sec_keyblock); - if (rc) { - log_error (_("error reading secret keyblock `%s': %s\n"), - username, g10_errstr(rc)); - } - else { + if (rc) + { + log_error (_("error reading secret keyblock \"%s\": %s\n"), + username, g10_errstr(rc)); + } + else + { merge_keys_and_selfsig( sec_keyblock ); if( fix_keyblock( sec_keyblock ) ) - sec_modified++; - } - } + sec_modified++; + } + } if (rc) { sec_keyblock = NULL; @@ -2914,7 +2917,7 @@ rc=get_pubkey_byname(revoker_pk,answer,NULL,NULL,1); if(rc) { - log_error (_("key `%s' not found: %s\n"),answer,g10_errstr(rc)); + log_error (_("key \"%s\" not found: %s\n"),answer,g10_errstr(rc)); m_free(answer); continue; } Index: gnupg/g10/pkclist.c diff -u gnupg/g10/pkclist.c:1.105 gnupg/g10/pkclist.c:1.106 --- gnupg/g10/pkclist.c:1.105 Fri Oct 15 11:39:25 2004 +++ gnupg/g10/pkclist.c Thu Oct 28 03:58:01 2004 @@ -900,7 +900,7 @@ /* The default recipient may be disabled */ rc = get_pubkey_byname( pk, def_rec, NULL, NULL, 1 ); if( rc ) - log_error(_("unknown default recipient `%s'\n"), def_rec ); + log_error(_("unknown default recipient \"%s\"\n"), def_rec ); else if( !(rc=check_pubkey_algo2(pk->pubkey_algo, use)) ) { /* Mark any_recipients here since the default recipient would have been used if it wasn't already there. It Index: gnupg/g10/revoke.c diff -u gnupg/g10/revoke.c:1.39 gnupg/g10/revoke.c:1.40 --- gnupg/g10/revoke.c:1.39 Sun Oct 10 17:27:14 2004 +++ gnupg/g10/revoke.c Thu Oct 28 03:58:01 2004 @@ -222,7 +222,7 @@ classify_user_id (uname, &desc); rc = desc.mode? keydb_search (kdbhd, &desc, 1) : G10ERR_INV_USER_ID; if (rc) { - log_error (_("key `%s' not found: %s\n"),uname, g10_errstr (rc)); + log_error (_("key \"%s\" not found: %s\n"),uname, g10_errstr (rc)); goto leave; } @@ -372,7 +372,7 @@ } if(!any) - log_error(_("no revocation keys found for `%s'\n"),uname); + log_error(_("no revocation keys found for \"%s\"\n"),uname); leave: if( pk ) @@ -425,11 +425,12 @@ kdbhd = keydb_new (1); classify_user_id (uname, &desc); rc = desc.mode? keydb_search (kdbhd, &desc, 1) : G10ERR_INV_USER_ID; - if (rc) { - log_error (_("secret key `%s' not found: %s\n"), + if (rc) + { + log_error (_("secret key \"%s\" not found: %s\n"), uname, g10_errstr (rc)); goto leave; - } + } rc = keydb_get_keyblock (kdbhd, &keyblock ); if( rc ) { Index: gnupg/g10/skclist.c diff -u gnupg/g10/skclist.c:1.25 gnupg/g10/skclist.c:1.26 --- gnupg/g10/skclist.c:1.25 Thu Feb 26 03:03:27 2004 +++ gnupg/g10/skclist.c Thu Oct 28 03:58:01 2004 @@ -153,34 +153,40 @@ * won't catch all duplicates because the user IDs may be * specified in different ways. */ - if ( is_duplicated_entry ( locusr_orig, locusr ) ) { - log_error(_("skipped `%s': duplicated\n"), locusr->d ); + if ( is_duplicated_entry ( locusr_orig, locusr ) ) + { + log_error(_("skipped \"%s\": duplicated\n"), locusr->d ); continue; - } + } sk = m_alloc_clear( sizeof *sk ); sk->req_usage = use; - if( (rc = get_seckey_byname( sk, locusr->d, 0 )) ) { + if( (rc = get_seckey_byname( sk, locusr->d, 0 )) ) + { free_secret_key( sk ); sk = NULL; - log_error(_("skipped `%s': %s\n"), locusr->d, g10_errstr(rc) ); - } + log_error(_("skipped \"%s\": %s\n"), + locusr->d, g10_errstr(rc) ); + } else if ( key_present_in_sk_list(sk_list, sk) == 0) { free_secret_key(sk); sk = NULL; log_info(_("skipped: secret key already present\n")); } - else if ( unlock && (rc = check_secret_key( sk, 0 )) ) { + else if ( unlock && (rc = check_secret_key( sk, 0 )) ) + { free_secret_key( sk ); sk = NULL; - log_error(_("skipped `%s': %s\n"), locusr->d, g10_errstr(rc) ); - } + log_error(_("skipped \"%s\": %s\n"), + locusr->d, g10_errstr(rc) ); + } else if( !(rc=check_pubkey_algo2(sk->pubkey_algo, use)) ) { SK_LIST r; if( sk->version == 4 && (use & PUBKEY_USAGE_SIG) - && sk->pubkey_algo == PUBKEY_ALGO_ELGAMAL_E ) { - log_info(_("skipped `%s': this is a PGP generated " - "Elgamal key which is not secure for signatures!\n"), - locusr->d ); + && sk->pubkey_algo == PUBKEY_ALGO_ELGAMAL_E ) + { + log_info(_("skipped \"%s\": %s\n"),locusr->d, + _("this is a PGP generated Elgamal key which" + " is not secure for signatures!")); free_secret_key( sk ); sk = NULL; - } + } else if( random_is_faked() && !is_insecure( sk ) ) { log_info(_("key is not flagged as insecure - " "can't use it with the faked RNG!\n")); @@ -196,7 +202,7 @@ } else { free_secret_key( sk ); sk = NULL; - log_error("skipped `%s': %s\n", locusr->d, g10_errstr(rc) ); + log_error("skipped \"%s\": %s\n", locusr->d, g10_errstr(rc) ); } } } From cvs at cvs.gnupg.org Thu Oct 28 04:10:06 2004 From: cvs at cvs.gnupg.org (cvs user dshaw) Date: Thu Oct 28 04:10:13 2004 Subject: gnupg/g10 (ChangeLog exec.c keyring.c sign.c) Message-ID: Date: Thursday, October 28, 2004 @ 04:14:06 Author: dshaw Path: /cvs/gnupg/gnupg/g10 Modified: ChangeLog exec.c keyring.c sign.c * keyring.c: Make some strings translatable. * exec.c, sign.c: Change "can't open file" to "can't open" and "can't create file" to "can't create" to be consistent with other strings so we don't have to translate both. -----------+ ChangeLog | 6 ++++++ exec.c | 2 +- keyring.c | 36 ++++++++++++++++++++---------------- sign.c | 15 +++++++-------- 4 files changed, 34 insertions(+), 25 deletions(-) Index: gnupg/g10/ChangeLog diff -u gnupg/g10/ChangeLog:1.629 gnupg/g10/ChangeLog:1.630 --- gnupg/g10/ChangeLog:1.629 Thu Oct 28 03:58:01 2004 +++ gnupg/g10/ChangeLog Thu Oct 28 04:14:06 2004 @@ -1,5 +1,11 @@ 2004-10-27 David Shaw + * keyring.c: Make some strings translatable. + + * exec.c, sign.c: Change "can't open file" to "can't open" and + "can't create file" to "can't create" to be consistent with other + strings so we don't have to translate both. + * delkey.c, export.c, keyedit.c, pkclist.c, revoke.c, skclist.c: Fix a few missed possible \"username\" quotes. Index: gnupg/g10/exec.c diff -u gnupg/g10/exec.c:1.17 gnupg/g10/exec.c:1.18 --- gnupg/g10/exec.c:1.17 Thu Oct 14 09:11:56 2004 +++ gnupg/g10/exec.c Thu Oct 28 04:14:06 2004 @@ -486,7 +486,7 @@ (*info)->tochild=fopen((*info)->tempfile_in,binary?"wb":"w"); if((*info)->tochild==NULL) { - log_error(_("can't create file `%s': %s\n"), + log_error(_("can't create `%s': %s\n"), (*info)->tempfile_in,strerror(errno)); ret=G10ERR_WRITE_FILE; goto fail; Index: gnupg/g10/keyring.c diff -u gnupg/g10/keyring.c:1.14 gnupg/g10/keyring.c:1.15 --- gnupg/g10/keyring.c:1.14 Thu Oct 14 09:11:56 2004 +++ gnupg/g10/keyring.c Thu Oct 28 04:14:06 2004 @@ -371,10 +371,11 @@ return -1; /* no successful search */ a = iobuf_open (hd->found.kr->fname); - if (!a) { - log_error ("can't open `%s'\n", hd->found.kr->fname); + if (!a) + { + log_error(_("can't open `%s'\n"), hd->found.kr->fname); return G10ERR_KEYRING_OPEN; - } + } if (iobuf_seek (a, hd->found.offset) ) { log_error ("can't seek `%s'\n", hd->found.kr->fname); @@ -656,10 +657,11 @@ hd->current.eof = 0; hd->current.iobuf = iobuf_open (hd->current.kr->fname); - if (!hd->current.iobuf) { - log_error ("can't open `%s'\n", hd->current.kr->fname ); + if (!hd->current.iobuf) + { + log_error(_("can't open `%s'\n"), hd->current.kr->fname ); return (hd->current.error = G10ERR_OPEN_FILE); - } + } return 0; } @@ -1193,12 +1195,13 @@ else *r_fp = iobuf_create (tmpfname); umask(oldmask); - if (!*r_fp) { - log_error ("can't create `%s': %s\n", tmpfname, strerror(errno) ); + if (!*r_fp) + { + log_error(_("can't create `%s': %s\n"), tmpfname, strerror(errno) ); m_free (tmpfname); m_free (bakfname); return G10ERR_OPEN_FILE; - } + } *r_bakfname = bakfname; *r_tmpfname = tmpfname; @@ -1492,11 +1495,11 @@ else newfp = iobuf_create (fname); umask(oldmask); - if( !newfp ) { - log_error (_("can't create `%s': %s\n"), - fname, strerror(errno)); + if( !newfp ) + { + log_error (_("can't create `%s': %s\n"), fname, strerror(errno)); return G10ERR_OPEN_FILE; - } + } if( !opt.quiet ) log_info(_("%s: keyring created\n"), fname ); @@ -1516,11 +1519,12 @@ return 0; /* ready */ } - if( !fp ) { - log_error ("can't open `%s': %s\n", fname, strerror(errno) ); + if( !fp ) + { + log_error(_("can't open `%s': %s\n"), fname, strerror(errno) ); rc = G10ERR_OPEN_FILE; goto leave; - } + } /* Create the new file. */ rc = create_tmp_file (fname, &bakfname, &tmpfname, &newfp); Index: gnupg/g10/sign.c diff -u gnupg/g10/sign.c:1.132 gnupg/g10/sign.c:1.133 --- gnupg/g10/sign.c:1.132 Thu Oct 14 09:11:56 2004 +++ gnupg/g10/sign.c Thu Oct 28 04:14:06 2004 @@ -775,8 +775,7 @@ else out = iobuf_create( outfile ); if( !out ) { - log_error(_("can't create file `%s': %s\n"), - outfile, strerror(errno) ); + log_error(_("can't create `%s': %s\n"), outfile, strerror(errno) ); rc = G10ERR_CREATE_FILE; goto leave; } @@ -908,12 +907,13 @@ inp = NULL; errno = EPERM; } - if( !inp ) { - log_error(_("can't open file `%s': %s\n"), - sl->d, strerror(errno) ); + if( !inp ) + { + log_error(_("can't open `%s': %s\n"), + sl->d, strerror(errno) ); rc = G10ERR_OPEN_FILE; goto leave; - } + } handle_progress (&pfx, inp, sl->d); if( opt.verbose ) fprintf(stderr, " `%s'", sl->d ); @@ -1032,8 +1032,7 @@ else out = iobuf_create( outfile ); if( !out ) { - log_error(_("can't create file `%s': %s\n"), - outfile, strerror(errno) ); + log_error(_("can't create `%s': %s\n"), outfile, strerror(errno) ); rc = G10ERR_CREATE_FILE; goto leave; } From cvs at cvs.gnupg.org Thu Oct 28 05:10:54 2004 From: cvs at cvs.gnupg.org (cvs user dshaw) Date: Thu Oct 28 05:11:06 2004 Subject: gnupg/g10 (6 files) Message-ID: Date: Thursday, October 28, 2004 @ 05:14:55 Author: dshaw Path: /cvs/gnupg/gnupg/g10 Modified: ChangeLog build-packet.c card-util.c keylist.c status.c status.h * keylist.c (status_one_subpacket): New. Send the subpacket data to the --status interface. * card-util.c (card_edit): Show when admin is enabled or not. * status.h, status.c: New STATUS_SIG_SUBPACKET type. * build-packet.c (build_sig_subpkt): Multiple keyserver URLs are allowed. ----------------+ ChangeLog | 10 +++ build-packet.c | 1 card-util.c | 4 + keylist.c | 18 +++++- status.c | 164 +++++++++++++++++++++++++++---------------------------- status.h | 1 6 files changed, 115 insertions(+), 83 deletions(-) Index: gnupg/g10/ChangeLog diff -u gnupg/g10/ChangeLog:1.630 gnupg/g10/ChangeLog:1.631 --- gnupg/g10/ChangeLog:1.630 Thu Oct 28 04:14:06 2004 +++ gnupg/g10/ChangeLog Thu Oct 28 05:14:55 2004 @@ -1,5 +1,15 @@ 2004-10-27 David Shaw + * keylist.c (status_one_subpacket): New. Send the subpacket data + to the --status interface. + + * card-util.c (card_edit): Show when admin is enabled or not. + + * status.h, status.c: New STATUS_SIG_SUBPACKET type. + + * build-packet.c (build_sig_subpkt): Multiple keyserver URLs are + allowed. + * keyring.c: Make some strings translatable. * exec.c, sign.c: Change "can't open file" to "can't open" and Index: gnupg/g10/build-packet.c diff -u gnupg/g10/build-packet.c:1.88 gnupg/g10/build-packet.c:1.89 --- gnupg/g10/build-packet.c:1.88 Fri Apr 16 18:31:19 2004 +++ gnupg/g10/build-packet.c Thu Oct 28 05:14:55 2004 @@ -658,6 +658,7 @@ case SIGSUBPKT_POLICY: case SIGSUBPKT_REV_KEY: case SIGSUBPKT_SIGNATURE: + case SIGSUBPKT_PREF_KS: /* we do allow multiple subpackets */ break; Index: gnupg/g10/card-util.c diff -u gnupg/g10/card-util.c:1.19 gnupg/g10/card-util.c:1.20 --- gnupg/g10/card-util.c:1.19 Tue Oct 26 09:50:47 2004 +++ gnupg/g10/card-util.c Thu Oct 28 05:14:55 2004 @@ -1293,6 +1293,10 @@ case cmdADMIN: allow_admin=!allow_admin; + if(allow_admin) + tty_printf(_("Admin commands are allowed\n")); + else + tty_printf(_("Admin commands are not allowed\n")); break; case cmdLIST: Index: gnupg/g10/keylist.c diff -u gnupg/g10/keylist.c:1.88 gnupg/g10/keylist.c:1.89 --- gnupg/g10/keylist.c:1.88 Thu Oct 14 22:13:16 2004 +++ gnupg/g10/keylist.c Thu Oct 28 05:14:55 2004 @@ -158,6 +158,21 @@ m_free (p); } +/* Flags = 0x01 hashed 0x02 critical */ +static void +status_one_subpacket(sigsubpkttype_t type,size_t len,int flags,const byte *buf) +{ + char status[40]; + + /* Don't print these. */ + if(len>256) + return; + + sprintf(status,"%d %u %u ",type,flags,len); + + write_status_text_and_buffer(STATUS_SIG_SUBPACKET,status,buf,len,0); +} + /* mode=0 for stdout. mode=1 for log_info + status messages @@ -235,7 +250,8 @@ fprintf(fp,"\n"); } - /* TODO: put in a status-fd tag for preferred keyservers */ + if(mode) + status_one_subpacket(SIGSUBPKT_PREF_KS,len,(crit?0x02:0)|0x01,p); } } Index: gnupg/g10/status.c diff -u gnupg/g10/status.c:1.47 gnupg/g10/status.c:1.48 --- gnupg/g10/status.c:1.47 Fri Oct 15 15:16:57 2004 +++ gnupg/g10/status.c Thu Oct 28 05:14:55 2004 @@ -78,88 +78,90 @@ static const char * get_status_string ( int no ) { - const char *s; + const char *s; - switch( no ) { - case STATUS_ENTER : s = "ENTER"; break; - case STATUS_LEAVE : s = "LEAVE"; break; - case STATUS_ABORT : s = "ABORT"; break; - case STATUS_NEWSIG : s = "NEWSIG"; break; - case STATUS_GOODSIG: s = "GOODSIG"; break; - case STATUS_KEYEXPIRED: s = "KEYEXPIRED"; break; - case STATUS_KEYREVOKED: s = "KEYREVOKED"; break; - case STATUS_BADSIG : s = "BADSIG"; break; - case STATUS_ERRSIG : s = "ERRSIG"; break; - case STATUS_BADARMOR : s = "BADARMOR"; break; - case STATUS_RSA_OR_IDEA : s= "RSA_OR_IDEA"; break; - case STATUS_TRUST_UNDEFINED: s = "TRUST_UNDEFINED"; break; - case STATUS_TRUST_NEVER : s = "TRUST_NEVER"; break; - case STATUS_TRUST_MARGINAL : s = "TRUST_MARGINAL"; break; - case STATUS_TRUST_FULLY : s = "TRUST_FULLY"; break; - case STATUS_TRUST_ULTIMATE : s = "TRUST_ULTIMATE"; break; - case STATUS_GET_BOOL : s = "GET_BOOL"; break; - case STATUS_GET_LINE : s = "GET_LINE"; break; - case STATUS_GET_HIDDEN : s = "GET_HIDDEN"; break; - case STATUS_GOT_IT : s = "GOT_IT"; break; - case STATUS_SHM_INFO : s = "SHM_INFO"; break; - case STATUS_SHM_GET : s = "SHM_GET"; break; - case STATUS_SHM_GET_BOOL : s = "SHM_GET_BOOL"; break; - case STATUS_SHM_GET_HIDDEN : s = "SHM_GET_HIDDEN"; break; - case STATUS_NEED_PASSPHRASE: s = "NEED_PASSPHRASE"; break; - case STATUS_VALIDSIG : s = "VALIDSIG"; break; - case STATUS_SIG_ID : s = "SIG_ID"; break; - case STATUS_ENC_TO : s = "ENC_TO"; break; - case STATUS_NODATA : s = "NODATA"; break; - case STATUS_BAD_PASSPHRASE : s = "BAD_PASSPHRASE"; break; - case STATUS_NO_PUBKEY : s = "NO_PUBKEY"; break; - case STATUS_NO_SECKEY : s = "NO_SECKEY"; break; - case STATUS_NEED_PASSPHRASE_SYM: s = "NEED_PASSPHRASE_SYM"; break; - case STATUS_NEED_PASSPHRASE_PIN: s = "NEED_PASSPHRASE_PIN"; break; - case STATUS_DECRYPTION_FAILED: s = "DECRYPTION_FAILED"; break; - case STATUS_DECRYPTION_OKAY: s = "DECRYPTION_OKAY"; break; - case STATUS_MISSING_PASSPHRASE: s = "MISSING_PASSPHRASE"; break; - case STATUS_GOOD_PASSPHRASE : s = "GOOD_PASSPHRASE"; break; - case STATUS_GOODMDC : s = "GOODMDC"; break; - case STATUS_BADMDC : s = "BADMDC"; break; - case STATUS_ERRMDC : s = "ERRMDC"; break; - case STATUS_IMPORTED : s = "IMPORTED"; break; - case STATUS_IMPORT_OK : s = "IMPORT_OK"; break; - case STATUS_IMPORT_CHECK : s = "IMPORT_CHECK"; break; - case STATUS_IMPORT_RES : s = "IMPORT_RES"; break; - case STATUS_FILE_START : s = "FILE_START"; break; - case STATUS_FILE_DONE : s = "FILE_DONE"; break; - case STATUS_FILE_ERROR : s = "FILE_ERROR"; break; - case STATUS_BEGIN_DECRYPTION:s = "BEGIN_DECRYPTION"; break; - case STATUS_END_DECRYPTION : s = "END_DECRYPTION"; break; - case STATUS_BEGIN_ENCRYPTION:s = "BEGIN_ENCRYPTION"; break; - case STATUS_END_ENCRYPTION : s = "END_ENCRYPTION"; break; - case STATUS_DELETE_PROBLEM : s = "DELETE_PROBLEM"; break; - case STATUS_PROGRESS : s = "PROGRESS"; break; - case STATUS_SIG_CREATED : s = "SIG_CREATED"; break; - case STATUS_SESSION_KEY : s = "SESSION_KEY"; break; - case STATUS_NOTATION_NAME : s = "NOTATION_NAME" ; break; - case STATUS_NOTATION_DATA : s = "NOTATION_DATA" ; break; - case STATUS_POLICY_URL : s = "POLICY_URL" ; break; - case STATUS_BEGIN_STREAM : s = "BEGIN_STREAM"; break; - case STATUS_END_STREAM : s = "END_STREAM"; break; - case STATUS_KEY_CREATED : s = "KEY_CREATED"; break; - case STATUS_KEY_NOT_CREATED: s = "KEY_NOT_CREATED"; break; - case STATUS_USERID_HINT : s = "USERID_HINT"; break; - case STATUS_UNEXPECTED : s = "UNEXPECTED"; break; - case STATUS_INV_RECP : s = "INV_RECP"; break; - case STATUS_NO_RECP : s = "NO_RECP"; break; - case STATUS_ALREADY_SIGNED : s = "ALREADY_SIGNED"; break; - case STATUS_SIGEXPIRED : s = "SIGEXPIRED deprecated-use-keyexpired-instead"; break; - case STATUS_EXPSIG : s = "EXPSIG"; break; - case STATUS_EXPKEYSIG : s = "EXPKEYSIG"; break; - case STATUS_REVKEYSIG : s = "REVKEYSIG"; break; - case STATUS_ATTRIBUTE : s = "ATTRIBUTE"; break; - case STATUS_CARDCTRL : s = "CARDCTRL"; break; - case STATUS_PLAINTEXT : s = "PLAINTEXT"; break; - case STATUS_PLAINTEXT_LENGTH:s = "PLAINTEXT_LENGTH"; break; - default: s = "?"; break; + switch( no ) + { + case STATUS_ENTER : s = "ENTER"; break; + case STATUS_LEAVE : s = "LEAVE"; break; + case STATUS_ABORT : s = "ABORT"; break; + case STATUS_NEWSIG : s = "NEWSIG"; break; + case STATUS_GOODSIG: s = "GOODSIG"; break; + case STATUS_KEYEXPIRED: s = "KEYEXPIRED"; break; + case STATUS_KEYREVOKED: s = "KEYREVOKED"; break; + case STATUS_BADSIG : s = "BADSIG"; break; + case STATUS_ERRSIG : s = "ERRSIG"; break; + case STATUS_BADARMOR : s = "BADARMOR"; break; + case STATUS_RSA_OR_IDEA : s= "RSA_OR_IDEA"; break; + case STATUS_TRUST_UNDEFINED: s = "TRUST_UNDEFINED"; break; + case STATUS_TRUST_NEVER : s = "TRUST_NEVER"; break; + case STATUS_TRUST_MARGINAL : s = "TRUST_MARGINAL"; break; + case STATUS_TRUST_FULLY : s = "TRUST_FULLY"; break; + case STATUS_TRUST_ULTIMATE : s = "TRUST_ULTIMATE"; break; + case STATUS_GET_BOOL : s = "GET_BOOL"; break; + case STATUS_GET_LINE : s = "GET_LINE"; break; + case STATUS_GET_HIDDEN : s = "GET_HIDDEN"; break; + case STATUS_GOT_IT : s = "GOT_IT"; break; + case STATUS_SHM_INFO : s = "SHM_INFO"; break; + case STATUS_SHM_GET : s = "SHM_GET"; break; + case STATUS_SHM_GET_BOOL : s = "SHM_GET_BOOL"; break; + case STATUS_SHM_GET_HIDDEN : s = "SHM_GET_HIDDEN"; break; + case STATUS_NEED_PASSPHRASE: s = "NEED_PASSPHRASE"; break; + case STATUS_VALIDSIG : s = "VALIDSIG"; break; + case STATUS_SIG_ID : s = "SIG_ID"; break; + case STATUS_ENC_TO : s = "ENC_TO"; break; + case STATUS_NODATA : s = "NODATA"; break; + case STATUS_BAD_PASSPHRASE : s = "BAD_PASSPHRASE"; break; + case STATUS_NO_PUBKEY : s = "NO_PUBKEY"; break; + case STATUS_NO_SECKEY : s = "NO_SECKEY"; break; + case STATUS_NEED_PASSPHRASE_SYM: s = "NEED_PASSPHRASE_SYM"; break; + case STATUS_NEED_PASSPHRASE_PIN: s = "NEED_PASSPHRASE_PIN"; break; + case STATUS_DECRYPTION_FAILED: s = "DECRYPTION_FAILED"; break; + case STATUS_DECRYPTION_OKAY: s = "DECRYPTION_OKAY"; break; + case STATUS_MISSING_PASSPHRASE: s = "MISSING_PASSPHRASE"; break; + case STATUS_GOOD_PASSPHRASE : s = "GOOD_PASSPHRASE"; break; + case STATUS_GOODMDC : s = "GOODMDC"; break; + case STATUS_BADMDC : s = "BADMDC"; break; + case STATUS_ERRMDC : s = "ERRMDC"; break; + case STATUS_IMPORTED : s = "IMPORTED"; break; + case STATUS_IMPORT_OK : s = "IMPORT_OK"; break; + case STATUS_IMPORT_CHECK : s = "IMPORT_CHECK"; break; + case STATUS_IMPORT_RES : s = "IMPORT_RES"; break; + case STATUS_FILE_START : s = "FILE_START"; break; + case STATUS_FILE_DONE : s = "FILE_DONE"; break; + case STATUS_FILE_ERROR : s = "FILE_ERROR"; break; + case STATUS_BEGIN_DECRYPTION:s = "BEGIN_DECRYPTION"; break; + case STATUS_END_DECRYPTION : s = "END_DECRYPTION"; break; + case STATUS_BEGIN_ENCRYPTION:s = "BEGIN_ENCRYPTION"; break; + case STATUS_END_ENCRYPTION : s = "END_ENCRYPTION"; break; + case STATUS_DELETE_PROBLEM : s = "DELETE_PROBLEM"; break; + case STATUS_PROGRESS : s = "PROGRESS"; break; + case STATUS_SIG_CREATED : s = "SIG_CREATED"; break; + case STATUS_SESSION_KEY : s = "SESSION_KEY"; break; + case STATUS_NOTATION_NAME : s = "NOTATION_NAME" ; break; + case STATUS_NOTATION_DATA : s = "NOTATION_DATA" ; break; + case STATUS_POLICY_URL : s = "POLICY_URL" ; break; + case STATUS_BEGIN_STREAM : s = "BEGIN_STREAM"; break; + case STATUS_END_STREAM : s = "END_STREAM"; break; + case STATUS_KEY_CREATED : s = "KEY_CREATED"; break; + case STATUS_KEY_NOT_CREATED: s = "KEY_NOT_CREATED"; break; + case STATUS_USERID_HINT : s = "USERID_HINT"; break; + case STATUS_UNEXPECTED : s = "UNEXPECTED"; break; + case STATUS_INV_RECP : s = "INV_RECP"; break; + case STATUS_NO_RECP : s = "NO_RECP"; break; + case STATUS_ALREADY_SIGNED : s = "ALREADY_SIGNED"; break; + case STATUS_SIGEXPIRED : s = "SIGEXPIRED deprecated-use-keyexpired-instead"; break; + case STATUS_EXPSIG : s = "EXPSIG"; break; + case STATUS_EXPKEYSIG : s = "EXPKEYSIG"; break; + case STATUS_REVKEYSIG : s = "REVKEYSIG"; break; + case STATUS_ATTRIBUTE : s = "ATTRIBUTE"; break; + case STATUS_CARDCTRL : s = "CARDCTRL"; break; + case STATUS_PLAINTEXT : s = "PLAINTEXT"; break; + case STATUS_PLAINTEXT_LENGTH:s = "PLAINTEXT_LENGTH"; break; + case STATUS_SIG_SUBPACKET : s = "SIG_SUBPACKET"; break; + default: s = "?"; break; } - return s; + return s; } @@ -331,7 +333,6 @@ } - #ifdef USE_SHM_COPROCESSING #ifndef IPC_RMID_DEFERRED_RELEASE @@ -778,4 +779,3 @@ } } } - Index: gnupg/g10/status.h diff -u gnupg/g10/status.h:1.30 gnupg/g10/status.h:1.31 --- gnupg/g10/status.h:1.30 Fri Oct 15 15:16:56 2004 +++ gnupg/g10/status.h Thu Oct 28 05:14:55 2004 @@ -105,6 +105,7 @@ #define STATUS_PLAINTEXT_LENGTH 74 #define STATUS_KEY_NOT_CREATED 75 #define STATUS_NEED_PASSPHRASE_PIN 76 +#define STATUS_SIG_SUBPACKET 77 /*-- status.c --*/ void set_status_fd ( int fd ); From cvs at cvs.gnupg.org Thu Oct 28 05:53:31 2004 From: cvs at cvs.gnupg.org (cvs user dshaw) Date: Thu Oct 28 05:54:13 2004 Subject: gnupg/g10 (8 files) Message-ID: Date: Thursday, October 28, 2004 @ 05:57:30 Author: dshaw Path: /cvs/gnupg/gnupg/g10 Modified: ChangeLog card-util.c delkey.c keyedit.c keygen.c passphrase.c plaintext.c revoke.c * card-util.c, delkey.c, keygen.c, plaintext.c, keyedit.c, passphrase.c, revoke.c: Collapse the two different "can't do that in batch mode" strings into one. --------------+ ChangeLog | 4 ++++ card-util.c | 4 ++-- delkey.c | 4 ++-- keyedit.c | 7 ++++--- keygen.c | 2 +- passphrase.c | 4 ++-- plaintext.c | 7 ++++--- revoke.c | 14 ++++++++------ 8 files changed, 27 insertions(+), 19 deletions(-) Index: gnupg/g10/ChangeLog diff -u gnupg/g10/ChangeLog:1.631 gnupg/g10/ChangeLog:1.632 --- gnupg/g10/ChangeLog:1.631 Thu Oct 28 05:14:55 2004 +++ gnupg/g10/ChangeLog Thu Oct 28 05:57:30 2004 @@ -1,5 +1,9 @@ 2004-10-27 David Shaw + * card-util.c, delkey.c, keygen.c, plaintext.c, keyedit.c, + passphrase.c, revoke.c: Collapse the two different "can't do that + in batch mode" strings into one. + * keylist.c (status_one_subpacket): New. Send the subpacket data to the --status interface. Index: gnupg/g10/card-util.c diff -u gnupg/g10/card-util.c:1.20 gnupg/g10/card-util.c:1.21 --- gnupg/g10/card-util.c:1.20 Thu Oct 28 05:14:55 2004 +++ gnupg/g10/card-util.c Thu Oct 28 05:57:30 2004 @@ -67,7 +67,7 @@ if (opt.batch) { - log_error (_("sorry, can't do this in batch mode\n")); + log_error (_("can't do this in batch mode\n")); return; } @@ -1195,7 +1195,7 @@ ; else if (opt.batch && !have_commands) { - log_error(_("can't do that in batchmode\n")); + log_error(_("can't do this in batch mode\n")); goto leave; } Index: gnupg/g10/delkey.c diff -u gnupg/g10/delkey.c:1.18 gnupg/g10/delkey.c:1.19 --- gnupg/g10/delkey.c:1.18 Thu Oct 28 03:58:01 2004 +++ gnupg/g10/delkey.c Thu Oct 28 05:57:30 2004 @@ -117,14 +117,14 @@ okay++; else if( opt.batch && secret ) { - log_error(_("can't do that in batchmode\n")); + log_error(_("can't do this in batch mode\n")); log_info (_("(unless you specify the key by fingerprint)\n")); } else if( opt.batch && opt.answer_yes ) okay++; else if( opt.batch ) { - log_error(_("can't do that in batchmode without \"--yes\"\n")); + log_error(_("can't do this in batch mode without \"--yes\"\n")); log_info (_("(unless you specify the key by fingerprint)\n")); } else { Index: gnupg/g10/keyedit.c diff -u gnupg/g10/keyedit.c:1.154 gnupg/g10/keyedit.c:1.155 --- gnupg/g10/keyedit.c:1.154 Thu Oct 28 03:58:01 2004 +++ gnupg/g10/keyedit.c Thu Oct 28 05:57:30 2004 @@ -1309,10 +1309,11 @@ if ( opt.command_fd != -1 ) ; - else if( opt.batch && !have_commands ) { - log_error(_("can't do that in batchmode\n")); + else if( opt.batch && !have_commands ) + { + log_error(_("can't do this in batch mode\n")); goto leave; - } + } /* get the public key */ rc = get_pubkey_byname (NULL, username, &keyblock, &kdbhd, 1); Index: gnupg/g10/keygen.c diff -u gnupg/g10/keygen.c:1.134 gnupg/g10/keygen.c:1.135 --- gnupg/g10/keygen.c:1.134 Fri Oct 15 11:39:25 2004 +++ gnupg/g10/keygen.c Thu Oct 28 05:57:30 2004 @@ -2417,7 +2417,7 @@ if (opt.batch && card_serialno) { /* We don't yet support unattended key generation. */ - log_error (_("sorry, can't do this in batch mode\n")); + log_error (_("can't do this in batch mode\n")); return; } Index: gnupg/g10/passphrase.c diff -u gnupg/g10/passphrase.c:1.65 gnupg/g10/passphrase.c:1.66 --- gnupg/g10/passphrase.c:1.65 Tue Oct 26 09:50:47 2004 +++ gnupg/g10/passphrase.c Thu Oct 28 05:57:30 2004 @@ -1050,7 +1050,7 @@ } else if (opt.batch) { - log_error(_("can't query password in batchmode\n")); + log_error(_("can't query password in batch mode\n")); pw = NULL; } else { @@ -1208,7 +1208,7 @@ strcpy( pw, fd_passwd ); } else if( opt.batch ) { - log_error(_("can't query password in batchmode\n")); + log_error(_("can't query password in batch mode\n")); pw = m_strdup( "" ); /* return an empty passphrase */ } else { Index: gnupg/g10/plaintext.c diff -u gnupg/g10/plaintext.c:1.57 gnupg/g10/plaintext.c:1.58 --- gnupg/g10/plaintext.c:1.57 Thu Oct 14 09:11:56 2004 +++ gnupg/g10/plaintext.c Thu Oct 28 05:57:30 2004 @@ -463,11 +463,12 @@ tty_printf("No such file, try again or hit enter to quit.\n"); any++; } - else if( !fp ) { - log_error("can't open `%s': %s\n", answer, strerror(errno) ); + else if( !fp ) + { + log_error(_("can't open `%s': %s\n"), answer, strerror(errno)); rc = G10ERR_READ_FILE; goto leave; - } + } } while( !fp ); } Index: gnupg/g10/revoke.c diff -u gnupg/g10/revoke.c:1.40 gnupg/g10/revoke.c:1.41 --- gnupg/g10/revoke.c:1.40 Thu Oct 28 03:58:01 2004 +++ gnupg/g10/revoke.c Thu Oct 28 05:57:30 2004 @@ -211,10 +211,11 @@ u32 keyid[2]; int i,any=0; - if( opt.batch ) { - log_error(_("sorry, can't do this in batch mode\n")); + if( opt.batch ) + { + log_error(_("can't do this in batch mode\n")); return G10ERR_GENERAL; - } + } memset( &afx, 0, sizeof afx); @@ -411,10 +412,11 @@ struct revocation_reason_info *reason = NULL; KEYDB_SEARCH_DESC desc; - if( opt.batch ) { - log_error(_("sorry, can't do this in batch mode\n")); + if( opt.batch ) + { + log_error(_("can't do this in batch mode\n")); return G10ERR_GENERAL; - } + } memset( &afx, 0, sizeof afx); init_packet( &pkt ); From cvs at cvs.gnupg.org Thu Oct 28 11:14:32 2004 From: cvs at cvs.gnupg.org (cvs user wk) Date: Thu Oct 28 11:14:53 2004 Subject: gnupg/doc (ChangeLog Makefile.am) Message-ID: Date: Thursday, October 28, 2004 @ 11:18:34 Author: wk Path: /cvs/gnupg/gnupg/doc Modified: ChangeLog Makefile.am Added gpg.ru.1 to EXTRA_DIST -------------+ ChangeLog | 4 ++++ Makefile.am | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) Index: gnupg/doc/ChangeLog diff -u gnupg/doc/ChangeLog:1.83 gnupg/doc/ChangeLog:1.84 --- gnupg/doc/ChangeLog:1.83 Tue Oct 19 05:04:14 2004 +++ gnupg/doc/ChangeLog Thu Oct 28 11:18:34 2004 @@ -1,3 +1,7 @@ +2004-10-28 Werner Koch + + * Makefile.am (EXTRA_DIST): Add gpg.ru.1. + 2004-10-18 David Shaw * gpg.sgml: Minor language tweaks. Index: gnupg/doc/Makefile.am diff -u gnupg/doc/Makefile.am:1.24 gnupg/doc/Makefile.am:1.25 --- gnupg/doc/Makefile.am:1.24 Tue Oct 26 21:33:41 2004 +++ gnupg/doc/Makefile.am Thu Oct 28 11:18:34 2004 @@ -22,7 +22,7 @@ EXTRA_DIST = DETAILS gpg.sgml gpg.1 gpgv.sgml gpgv.1 faq.raw FAQ faq.html \ HACKING OpenPGP README.W32 samplekeys.asc gnupg.7 gnupg-w32.reg \ - TRANSLATE gpg.ru.sgml + TRANSLATE gpg.ru.sgml gpg.ru.1 man_MANS = gpg.1 gpgv.1 gnupg.7 gpg.ru.1 From cvs at cvs.gnupg.org Thu Oct 28 20:53:46 2004 From: cvs at cvs.gnupg.org (cvs user wk) Date: Thu Oct 28 20:53:49 2004 Subject: gnupg (6 files) Message-ID: Date: Thursday, October 28, 2004 @ 20:57:50 Author: wk Path: /cvs/gnupg/gnupg Modified: g10/ChangeLog g10/Makefile.am keyserver/ChangeLog keyserver/Makefile.am tools/ChangeLog tools/Makefile.am Inlcude LIBICONV -----------------------+ g10/ChangeLog | 5 +++++ g10/Makefile.am | 3 ++- keyserver/ChangeLog | 9 +++++++++ keyserver/Makefile.am | 10 ++++++---- tools/ChangeLog | 5 +++++ tools/Makefile.am | 11 ++++++----- 6 files changed, 33 insertions(+), 10 deletions(-) Index: gnupg/g10/ChangeLog diff -u gnupg/g10/ChangeLog:1.633 gnupg/g10/ChangeLog:1.634 --- gnupg/g10/ChangeLog:1.633 Thu Oct 28 11:06:50 2004 +++ gnupg/g10/ChangeLog Thu Oct 28 20:57:50 2004 @@ -1,5 +1,10 @@ 2004-10-28 Werner Koch + * Makefile.am (other_libs): New. Also include LIBICONV. Noted by + Tim Mooney. + +2004-10-28 Werner Koch + * apdu.c (open_pcsc_reader): Removed bad free in error handler. 2004-10-27 David Shaw Index: gnupg/g10/Makefile.am diff -u gnupg/g10/Makefile.am:1.86 gnupg/g10/Makefile.am:1.87 --- gnupg/g10/Makefile.am:1.86 Tue Apr 27 10:23:45 2004 +++ gnupg/g10/Makefile.am Thu Oct 28 20:57:50 2004 @@ -28,6 +28,7 @@ AM_CFLAGS = -DGNUPG_LIBEXECDIR="\"$(libexecdir)\"" endif needed_libs = ../cipher/libcipher.a ../mpi/libmpi.a ../util/libutil.a +other_libs = $(LIBICONV) $(LIBINTL) $(CAPLIBS) #noinst_PROGRAMS = gpgd bin_PROGRAMS = gpg gpgv @@ -131,7 +132,7 @@ # ks-db.h \ # $(common_source) -LDADD = $(needed_libs) @LIBINTL@ @CAPLIBS@ @ZLIBS@ @W32LIBS@ +LDADD = $(needed_libs) $(other_libs) @ZLIBS@ @W32LIBS@ gpg_LDADD = $(LDADD) @DLLIBS@ @NETLIBS@ @LIBUSB_LIBS@ $(PROGRAMS): $(needed_libs) Index: gnupg/keyserver/ChangeLog diff -u gnupg/keyserver/ChangeLog:1.89 gnupg/keyserver/ChangeLog:1.90 --- gnupg/keyserver/ChangeLog:1.89 Mon Oct 18 17:53:28 2004 +++ gnupg/keyserver/ChangeLog Thu Oct 28 20:57:50 2004 @@ -1,3 +1,12 @@ +2004-10-28 Werner Koch + + * Makefile.am (other_libs): New. Also include LIBICONV. Noted by + Tim Mooney. + +2004-10-28 Werner Koch + + * Makefile.am (other_libs): + 2004-10-18 David Shaw * gpgkeys_hkp.c (send_key, get_key, search_key): Use "hkp" instead Index: gnupg/keyserver/Makefile.am diff -u gnupg/keyserver/Makefile.am:1.18 gnupg/keyserver/Makefile.am:1.19 --- gnupg/keyserver/Makefile.am:1.18 Fri Oct 15 11:55:38 2004 +++ gnupg/keyserver/Makefile.am Thu Oct 28 20:57:50 2004 @@ -32,10 +32,12 @@ gpgkeys_http_SOURCES = gpgkeys_http.c ksutil.c ksutil.h gpgkeys_finger_SOURCES = gpgkeys_finger.c ksutil.c ksutil.h -gpgkeys_ldap_LDADD = ../util/libutil.a @LDAPLIBS@ @NETLIBS@ @LIBINTL@ @CAPLIBS@ @GETOPT@ @W32LIBS@ -gpgkeys_hkp_LDADD = ../util/libutil.a @NETLIBS@ @SRVLIBS@ @LIBINTL@ @CAPLIBS@ @GETOPT@ @W32LIBS@ -gpgkeys_http_LDADD = ../util/libutil.a @NETLIBS@ @SRVLIBS@ @LIBINTL@ @CAPLIBS@ @GETOPT@ @W32LIBS@ -gpgkeys_finger_LDADD = ../util/libutil.a @NETLIBS@ @LIBINTL@ @CAPLIBS@ @GETOPT@ @W32LIBS@ +other_libs = $(LIBICONV) $(LIBINTL) $(CAPLIBS) + +gpgkeys_ldap_LDADD = ../util/libutil.a @LDAPLIBS@ @NETLIBS@ $(other_libs) @GETOPT@ @W32LIBS@ +gpgkeys_hkp_LDADD = ../util/libutil.a @NETLIBS@ @SRVLIBS@ $(other_libs) @GETOPT@ @W32LIBS@ +gpgkeys_http_LDADD = ../util/libutil.a @NETLIBS@ @SRVLIBS@ $(other_libs) @GETOPT@ @W32LIBS@ +gpgkeys_finger_LDADD = ../util/libutil.a @NETLIBS@ $(other_libs) @GETOPT@ @W32LIBS@ install-exec-hook: if GPGKEYS_LDAP Index: gnupg/tools/ChangeLog diff -u gnupg/tools/ChangeLog:1.30 gnupg/tools/ChangeLog:1.31 --- gnupg/tools/ChangeLog:1.30 Fri Oct 1 12:18:30 2004 +++ gnupg/tools/ChangeLog Thu Oct 28 20:57:50 2004 @@ -1,3 +1,8 @@ +2004-10-28 Werner Koch + + * Makefile.am (other_libs): New. Also include LIBICONV. Noted by + Tim Mooney. + 2004-10-01 Werner Koch * bftest.c (i18n_init): Always use LC_ALL. Index: gnupg/tools/Makefile.am diff -u gnupg/tools/Makefile.am:1.31 gnupg/tools/Makefile.am:1.32 --- gnupg/tools/Makefile.am:1.31 Sat Oct 25 18:28:08 2003 +++ gnupg/tools/Makefile.am Thu Oct 28 20:57:50 2004 @@ -20,14 +20,15 @@ EXTRA_DIST = lspgpot ring-a-party mail-signed-keys convert-from-106 INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/intl -needed_libs = ../cipher/libcipher.a ../mpi/libmpi.a ../util/libutil.a +needed_libs = ../cipher/libcipher.a ../mpi/libmpi.a ../util/libutil.a +other_libs = $(LIBICONV) $(LIBINTL) $(CAPLIBS) bin_PROGRAMS = gpgsplit noinst_PROGRAMS = mpicalc bftest clean-sat mk-tdata shmtest -gpgsplit_LDADD = $(needed_libs) @LIBINTL@ @CAPLIBS@ @ZLIBS@ -mpicalc_LDADD = $(needed_libs) @LIBINTL@ @CAPLIBS@ @W32LIBS@ -bftest_LDADD = $(needed_libs) @LIBINTL@ @CAPLIBS@ @W32LIBS@ @DLLIBS@ @NETLIBS@ -shmtest_LDADD = $(needed_libs) @LIBINTL@ @CAPLIBS@ +gpgsplit_LDADD = $(needed_libs) $(other_libs) @ZLIBS@ +mpicalc_LDADD = $(needed_libs) $(other_libs) @W32LIBS@ +bftest_LDADD = $(needed_libs) $(other_libs) @W32LIBS@ @DLLIBS@ @NETLIBS@ +shmtest_LDADD = $(needed_libs) $(other_libs) gpgsplit mpicalc bftest shmtest: $(needed_libs) From cvs at cvs.gnupg.org Thu Oct 28 23:49:45 2004 From: cvs at cvs.gnupg.org (cvs user dshaw) Date: Thu Oct 28 23:49:47 2004 Subject: gnupg/keyserver (ChangeLog gpgkeys_finger.c) Message-ID: Date: Thursday, October 28, 2004 @ 23:53:51 Author: dshaw Path: /cvs/gnupg/gnupg/keyserver Modified: ChangeLog gpgkeys_finger.c * gpgkeys_finger.c [_WIN32] (connect_server): Fix typo. ------------------+ ChangeLog | 4 ++++ gpgkeys_finger.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) Index: gnupg/keyserver/ChangeLog diff -u gnupg/keyserver/ChangeLog:1.90 gnupg/keyserver/ChangeLog:1.91 --- gnupg/keyserver/ChangeLog:1.90 Thu Oct 28 20:57:50 2004 +++ gnupg/keyserver/ChangeLog Thu Oct 28 23:53:51 2004 @@ -1,3 +1,7 @@ +2004-10-28 David Shaw + + * gpgkeys_finger.c [_WIN32] (connect_server): Fix typo. + 2004-10-28 Werner Koch * Makefile.am (other_libs): New. Also include LIBICONV. Noted by Index: gnupg/keyserver/gpgkeys_finger.c diff -u gnupg/keyserver/gpgkeys_finger.c:1.7 gnupg/keyserver/gpgkeys_finger.c:1.8 --- gnupg/keyserver/gpgkeys_finger.c:1.7 Sat Oct 16 18:04:19 2004 +++ gnupg/keyserver/gpgkeys_finger.c Thu Oct 28 23:53:51 2004 @@ -132,7 +132,7 @@ } if (hp->h_length != 4) { - fprintf (console, "gpgkeys: illegal address length for`%s'\n", + fprintf (console, "gpgkeys: illegal address length for `%s'\n", server); return -1; } From cvs at cvs.gnupg.org Fri Oct 29 00:04:09 2004 From: cvs at cvs.gnupg.org (cvs user dshaw) Date: Fri Oct 29 00:04:11 2004 Subject: gnupg/doc (ChangeLog DETAILS) Message-ID: Date: Friday, October 29, 2004 @ 00:08:15 Author: dshaw Path: /cvs/gnupg/gnupg/doc Modified: ChangeLog DETAILS * DETAILS: Document SIG_SUBPACKET status tag. -----------+ ChangeLog | 4 ++++ DETAILS | 4 ++++ 2 files changed, 8 insertions(+) Index: gnupg/doc/ChangeLog diff -u gnupg/doc/ChangeLog:1.84 gnupg/doc/ChangeLog:1.85 --- gnupg/doc/ChangeLog:1.84 Thu Oct 28 11:18:34 2004 +++ gnupg/doc/ChangeLog Fri Oct 29 00:08:15 2004 @@ -1,3 +1,7 @@ +2004-10-28 David Shaw + + * DETAILS: Document SIG_SUBPACKET status tag. + 2004-10-28 Werner Koch * Makefile.am (EXTRA_DIST): Add gpg.ru.1. Index: gnupg/doc/DETAILS diff -u gnupg/doc/DETAILS:1.86 gnupg/doc/DETAILS:1.87 --- gnupg/doc/DETAILS:1.86 Tue Oct 19 05:04:14 2004 +++ gnupg/doc/DETAILS Fri Oct 29 00:08:15 2004 @@ -564,6 +564,10 @@ encoding it is not possible to know the length ahead of time. In that case, this status tag does not appear. + SIG_SUBPACKET + This indicates that a signature subpacket was seen. The + format is the same as the "spk" record above. + Format of the "--attribute-fd" output ===================================== From cvs at cvs.gnupg.org Fri Oct 29 00:05:04 2004 From: cvs at cvs.gnupg.org (cvs user dshaw) Date: Fri Oct 29 00:05:16 2004 Subject: gnupg/g10 (ChangeLog keyedit.c passphrase.c pkclist.c sign.c skclist.c) Message-ID: Date: Friday, October 29, 2004 @ 00:09:09 Author: dshaw Path: /cvs/gnupg/gnupg/g10 Modified: ChangeLog keyedit.c passphrase.c pkclist.c sign.c skclist.c * skclist.c (build_sk_list): Don't need to warn about PGP-generated Elgamal signing keys since we no longer support any Elgamal signing keys. * sign.c (sign_file, clearsign_file): Use "writing to" instead of "writing to file" to match other strings. * pkclist.c (check_signatures_trust): Fix typo. Noted by Moray Allan. This is Debian bug #278708. * passphrase.c (ask_passphrase, passphrase_to_dek): "password" -> "passphrase". * keyedit.c (show_key_with_all_names): Show designated revoker as part of translatable string. --------------+ ChangeLog | 18 ++++++++++++++++++ keyedit.c | 50 ++++++++++++++++++++++++++++---------------------- passphrase.c | 9 +++++---- pkclist.c | 2 +- sign.c | 16 +++++++++------- skclist.c | 35 +++++++++++++++++------------------ 6 files changed, 78 insertions(+), 52 deletions(-) Index: gnupg/g10/ChangeLog diff -u gnupg/g10/ChangeLog:1.634 gnupg/g10/ChangeLog:1.635 --- gnupg/g10/ChangeLog:1.634 Thu Oct 28 20:57:50 2004 +++ gnupg/g10/ChangeLog Fri Oct 29 00:09:09 2004 @@ -1,3 +1,21 @@ +2004-10-28 David Shaw + + * skclist.c (build_sk_list): Don't need to warn about + PGP-generated Elgamal signing keys since we no longer support any + Elgamal signing keys. + + * sign.c (sign_file, clearsign_file): Use "writing to" instead of + "writing to file" to match other strings. + + * pkclist.c (check_signatures_trust): Fix typo. Noted by Moray + Allan. This is Debian bug #278708. + + * passphrase.c (ask_passphrase, passphrase_to_dek): "password" -> + "passphrase". + + * keyedit.c (show_key_with_all_names): Show designated revoker as + part of translatable string. + 2004-10-28 Werner Koch * Makefile.am (other_libs): New. Also include LIBICONV. Noted by Index: gnupg/g10/keyedit.c diff -u gnupg/g10/keyedit.c:1.155 gnupg/g10/keyedit.c:1.156 --- gnupg/g10/keyedit.c:1.155 Thu Oct 28 05:57:30 2004 +++ gnupg/g10/keyedit.c Fri Oct 29 00:09:09 2004 @@ -1309,7 +1309,7 @@ if ( opt.command_fd != -1 ) ; - else if( opt.batch && !have_commands ) + else if( opt.batch && !have_commands ) { log_error(_("can't do this in batch mode\n")); goto leave; @@ -2226,29 +2226,35 @@ primary=pk; } - if(with_revoker) { + if(with_revoker) + { if( !pk->revkey && pk->numrevkeys ) - BUG(); + BUG(); else - for(i=0;inumrevkeys;i++) { - u32 r_keyid[2]; - char *user; - const char *algo= - pubkey_algo_to_string(pk->revkey[i].algid); - - keyid_from_fingerprint(pk->revkey[i].fpr, - MAX_FINGERPRINT_LEN,r_keyid); - - user=get_user_id_string (r_keyid); - tty_printf (_("This key may be revoked by %s key "), - algo?algo:"?"); - tty_print_utf8_string (user, strlen (user)); - if ((pk->revkey[i].class&0x40)) - tty_printf (_(" (sensitive)")); - tty_printf ("\n"); - m_free(user); - } - } + for(i=0;inumrevkeys;i++) + { + u32 r_keyid[2]; + char *user; + const char *algo= + pubkey_algo_to_string(pk->revkey[i].algid); + + keyid_from_fingerprint(pk->revkey[i].fpr, + MAX_FINGERPRINT_LEN,r_keyid); + + user=get_user_id_string_native(r_keyid); + tty_printf(_("This key may be revoked by %s key %s"), + algo?algo:"?",user); + + if(pk->revkey[i].class&0x40) + { + tty_printf(" "); + tty_printf(_("(sensitive)")); + } + + tty_printf ("\n"); + m_free(user); + } + } keyid_from_pk(pk,NULL); tty_printf("%s%c %4u%c/%s ", Index: gnupg/g10/passphrase.c diff -u gnupg/g10/passphrase.c:1.66 gnupg/g10/passphrase.c:1.67 --- gnupg/g10/passphrase.c:1.66 Thu Oct 28 05:57:30 2004 +++ gnupg/g10/passphrase.c Fri Oct 29 00:09:09 2004 @@ -1050,7 +1050,7 @@ } else if (opt.batch) { - log_error(_("can't query password in batch mode\n")); + log_error(_("can't query passphrase in batch mode\n")); pw = NULL; } else { @@ -1207,10 +1207,11 @@ pw = m_alloc_secure( strlen(fd_passwd)+1 ); strcpy( pw, fd_passwd ); } - else if( opt.batch ) { - log_error(_("can't query password in batch mode\n")); + else if( opt.batch ) + { + log_error(_("can't query passphrase in batch mode\n")); pw = m_strdup( "" ); /* return an empty passphrase */ - } + } else { /* Read the passphrase from the tty or the command-fd. */ pw = cpr_get_hidden("passphrase.enter", _("Enter passphrase: ") ); Index: gnupg/g10/pkclist.c diff -u gnupg/g10/pkclist.c:1.106 gnupg/g10/pkclist.c:1.107 --- gnupg/g10/pkclist.c:1.106 Thu Oct 28 03:58:01 2004 +++ gnupg/g10/pkclist.c Fri Oct 29 00:09:09 2004 @@ -518,7 +518,7 @@ " designated revoker!\n")); else log_info(_("WARNING: This key has been revoked by its owner!\n")); - log_info(_(" This could mean that the signature is forgery.\n")); + log_info(_(" This could mean that the signature is forged.\n")); show_revocation_reason( pk, 0 ); } else if ((trustlevel & TRUST_FLAG_SUB_REVOKED) ) Index: gnupg/g10/sign.c diff -u gnupg/g10/sign.c:1.133 gnupg/g10/sign.c:1.134 --- gnupg/g10/sign.c:1.133 Thu Oct 28 04:14:06 2004 +++ gnupg/g10/sign.c Fri Oct 29 00:09:09 2004 @@ -774,13 +774,14 @@ } else out = iobuf_create( outfile ); - if( !out ) { + if( !out ) + { log_error(_("can't create `%s': %s\n"), outfile, strerror(errno) ); rc = G10ERR_CREATE_FILE; goto leave; - } + } else if( opt.verbose ) - log_info(_("writing to file `%s'\n"), outfile ); + log_info(_("writing to `%s'\n"), outfile ); } else if( (rc = open_outfile( fname, opt.armor? 1: detached? 2:0, &out ))) goto leave; @@ -910,7 +911,7 @@ if( !inp ) { log_error(_("can't open `%s': %s\n"), - sl->d, strerror(errno) ); + sl->d,strerror(errno)); rc = G10ERR_OPEN_FILE; goto leave; } @@ -1031,13 +1032,14 @@ } else out = iobuf_create( outfile ); - if( !out ) { + if( !out ) + { log_error(_("can't create `%s': %s\n"), outfile, strerror(errno) ); rc = G10ERR_CREATE_FILE; goto leave; - } + } else if( opt.verbose ) - log_info(_("writing to file `%s'\n"), outfile ); + log_info(_("writing to `%s'\n"), outfile ); } else if( (rc = open_outfile( fname, 1, &out )) ) goto leave; Index: gnupg/g10/skclist.c diff -u gnupg/g10/skclist.c:1.26 gnupg/g10/skclist.c:1.27 --- gnupg/g10/skclist.c:1.26 Thu Oct 28 03:58:01 2004 +++ gnupg/g10/skclist.c Fri Oct 29 00:09:09 2004 @@ -107,42 +107,41 @@ SK_LIST sk_list = NULL; int rc; - if( !locusr ) { /* use the default one */ + if( !locusr ) + { /* use the default one */ PKT_secret_key *sk; sk = m_alloc_clear( sizeof *sk ); sk->req_usage = use; if( (rc = get_seckey_byname( sk, NULL, unlock )) ) { - free_secret_key( sk ); sk = NULL; - log_error("no default secret key: %s\n", g10_errstr(rc) ); + free_secret_key( sk ); sk = NULL; + log_error("no default secret key: %s\n", g10_errstr(rc) ); } - else if( !(rc=check_pubkey_algo2(sk->pubkey_algo, use)) ) { + else if( !(rc=check_pubkey_algo2(sk->pubkey_algo, use)) ) + { SK_LIST r; - if( sk->version == 4 && (use & PUBKEY_USAGE_SIG) - && sk->pubkey_algo == PUBKEY_ALGO_ELGAMAL_E ) { - log_info("this is a PGP generated " - "Elgamal key which is NOT secure for signatures!\n"); - free_secret_key( sk ); sk = NULL; - } - else if( random_is_faked() && !is_insecure( sk ) ) { + if( random_is_faked() && !is_insecure( sk ) ) + { log_info(_("key is not flagged as insecure - " "can't use it with the faked RNG!\n")); free_secret_key( sk ); sk = NULL; - } - else { + } + else + { r = m_alloc( sizeof *r ); r->sk = sk; sk = NULL; r->next = sk_list; r->mark = 0; sk_list = r; - } - } - else { + } + } + else + { free_secret_key( sk ); sk = NULL; log_error("invalid default secret key: %s\n", g10_errstr(rc) ); - } - } + } + } else { STRLIST locusr_orig = locusr; for(; locusr; locusr = locusr->next ) { From cvs at cvs.gnupg.org Sun Oct 31 00:44:53 2004 From: cvs at cvs.gnupg.org (cvs user wk) Date: Sun Oct 31 00:44:57 2004 Subject: gnupg/util (ChangeLog simple-gettext.c) Message-ID: Date: Sunday, October 31, 2004 @ 00:49:09 Author: wk Path: /cvs/gnupg/gnupg/util Modified: ChangeLog simple-gettext.c (get_string): Removed debugging hack. ------------------+ ChangeLog | 4 ++++ simple-gettext.c | 3 +-- 2 files changed, 5 insertions(+), 2 deletions(-) Index: gnupg/util/ChangeLog diff -u gnupg/util/ChangeLog:1.164 gnupg/util/ChangeLog:1.165 --- gnupg/util/ChangeLog:1.164 Wed Oct 27 18:32:33 2004 +++ gnupg/util/ChangeLog Sun Oct 31 00:49:09 2004 @@ -1,3 +1,7 @@ +2004-10-31 Werner Koch + + * simple-gettext.c (get_string): Removed debugging hack. + 2004-10-27 Werner Koch * simple-gettext.c: Removed windows.h. Index: gnupg/util/simple-gettext.c diff -u gnupg/util/simple-gettext.c:1.10 gnupg/util/simple-gettext.c:1.11 --- gnupg/util/simple-gettext.c:1.10 Wed Oct 27 18:32:33 2004 +++ gnupg/util/simple-gettext.c Sun Oct 31 00:49:09 2004 @@ -306,14 +306,13 @@ { size_t plen, buflen; char *buf; - static int debug_hack; domain->mapped[idx] = 1; plen = strlen (p); buf = utf8_to_native (p, plen, -1); buflen = strlen (buf); - if (buflen <= plen && (++debug_hack %3)) + if (buflen <= plen) strcpy (p, buf); else {