Commit Graph

78 Commits

Author SHA1 Message Date
Werner Koch 3af261572b * gpg-agent.c (handle_connections): Need to check for events if
select returns with -1.

* tools.texi (gpg-connect-agent): New.

* app-openpgp.c (get_one_do): Never try to get a non cacheable
object from the cache.
(get_one_do): Add new arg to return an error code.  Changed all
callers.
(do_getattr): Let it return a proper error code.

* app.c (select_application): Return an error code and the
application context in an new arg.
* command.c (open_card): Adjusted for that.  Don't use the
fallback if no card is present.  Return an error if the card has
been removed without a reset.
(do_reset, cmd_serialno): Clear that error flag.
(TEST_CARD_REMOVAL): New. Use it with all command handlers.

* scdaemon.c (ticker_thread): Termintate if a shutdown is pending.

* apdu.c: Added some PCSC error codes.
(pcsc_error_to_sw): New.
(reset_pcsc_reader, pcsc_get_status, pcsc_send_apdu)
(open_pcsc_reader): Do proper error code mapping.

* gpg-connect-agent.c: New.
* Makefile.am: Add it.
2005-02-24 17:36:11 +00:00
Werner Koch 01f3f25158 * preset-passphrase.c (preset_passphrase): Handle --passphrase.
* Makefile.am (gpg_preset_passphrase_LDADD): Reorder libs so that
pwquery may use stuff from jnlib.  Conditionally add -lwsock2
(gpg_protect_tool_LDADD): Ditto.

* preset-passphrase.c (main): Use default_homedir().
(main) [W32]: Initialize sockets.

* simple-pwquery.c (agent_open) [W32]: Implement for W32.
(readline) [W32]: Use recv instead of read.
(writen) [W32]: Use send instead of write.
(my_stpcpy): Define a stpcpy replacement so that this file
continues to be self-contained.
(agent_send_all_options) [W32]: Don't call ttyname.

* gnupg-badge-openpgp.eps, gnupg-badge-openpgp.jpg: New
* gnupg.texi: Add a logo.
* sysnotes.texi: New.

* gpgsm.c (main): Use default_homedir().
(main) [W32]: Default to disabled CRL checks.

* gpgconf-comp.c (get_config_pathname) [DOSISH]: Detect absolute
pathnames with a drive letter.
2004-12-21 19:05:15 +00:00
Werner Koch 69967b0412 A whole bunch of changes to allow building for W32. 2004-12-15 14:15:54 +00:00
Werner Koch 801ab88522 VArious hacks to make it at least build under W32.
* stringhelp.c (w32_strerror) [W32]: New.

* w32-pth.c, w32-pth.h: Added real code written by Timo	Schulz.
Not finished, though.

* gpgconf-comp.c <ignore-ocsp-service-url>: Fixed typo.
2004-12-13 15:49:56 +00:00
Werner Koch 0b135bc6d4 Add dirmngr options to gpgconf and updated the DE translation 2004-11-24 14:50:20 +00:00
Werner Koch 7d8f27e422 Add --ignore-http-dp and
--ignore-ldap-dp.
2004-11-24 10:43:53 +00:00
Werner Koch c7b97075aa * b64enc.c: Include stdio.h and string.h
* gpgsm.c: New option --prefer-system-dirmngr.
* call-dirmngr.c (start_dirmngr): Implement this option.

* gpgconf-comp.c <dirmngr>: Add the proxy options.
<gpgsm>: Add --prefer-system-daemon.
2004-11-23 17:09:51 +00:00
Werner Koch 77a15fc9f8 * Makefile.am (bin_SCRIPTS): Add gpgsm-gencert.sh
* gpgsm-gencert.sh: Fixed copyright; its part of GnuPG thus FSF.
2004-10-22 12:31:04 +00:00
Werner Koch 545ddc6f3d Made all strings for --log-file read the same. 2004-10-01 16:51:18 +00:00
Werner Koch a90acadd51 * gpgconf-comp.c (my_dgettext): Also switch codeset and directory
for the other used domains (i.e. dirmngr).

* gpgconf.c (main): Fixed translation markers.
2004-10-01 12:53:09 +00:00
Werner Koch 048635bede * gpgv.c (i18n_init): Always use LC_ALL.
* kbxutil.c (i18n_init): Always use LC_ALL.

* gpgsm.c (i18n_init): Always use LC_ALL.

* certdump.c (gpgsm_format_name): Factored code out to ..
(gpgsm_format_name2): .. new.
(gpgsm_print_name): Factored code out to ..
(gpgsm_print_name2): .. new.
(print_dn_part): New arg TRANSLATE.  Changed all callers.
(print_dn_parts): Ditto.
(gpgsm_format_keydesc): Do not translate the SUBJECT; we require
it to stay UTF-8 but we still want to filter out bad control
characters.

* gpgconf.c (i18n_init): Always use LC_ALL.
2004-09-30 21:37:11 +00:00
Werner Koch 335b5e4ac4 Preparing a new release. Updated gettext 2004-09-30 14:34:34 +00:00
Werner Koch e4ce12abd1 * gpgsm.texi (Configuration Options): Add --log-file.
* gpgconf-comp.c: Made the entries fro GROUPs translatable.
Include i18n.h.
(my_dgettext): Hack to use the gnupg2 domain.
2004-09-29 16:16:47 +00:00
Moritz Schulte 93b7fb4a17 2004-08-09 Moritz Schulte <moritz@g10code.com>
* gpgsm-gencert.sh: New file.
2004-08-09 11:58:26 +00:00
Werner Koch 224da03784 * rfc822parse.c (rfc822parse_get_field): Add arg VALUEOFF. 2004-07-20 11:21:53 +00:00
Werner Koch feb40e2c6e * xreadline.c: New. Based on the iobuf_read_line function.
* no-libgcrypt.c (gcry_realloc, gcry_xmalloc, gcry_xcalloc): New.

* gpgconf-comp.c (retrieve_options_from_program)
(retrieve_options_from_file, change_options_file)
(change_options_program, gc_component_change_options): Replaced
getline by read_line and test for allocation failure.
2004-06-14 08:32:07 +00:00
Marcus Brinkmann d3c05ee44c 2004-05-21 Marcus Brinkmann <marcus@g10code.de>
* gpgconf-comp.c (gc_options_dirmngr): Remove CRL group, put its
	only option "max-replies" into LDAP group.
	(gc_component): Change description of dirmngr to "Directory
	Manager".
2004-05-21 13:55:43 +00:00
Marcus Brinkmann fb84c86f64 2004-05-21 Marcus Brinkmann <marcus@g10code.de>
* gpgconf-comp.c (gc_component_change_options): Move the
	per-process backup file into a standard location.
2004-05-21 13:46:13 +00:00
Werner Koch 30bbef1a28 * gpg-agent.c: Remove help texts for options lile --lc-ctype.
(main): New option --allow-mark-trusted.
* trustlist.c (agent_marktrusted): Use it here.

* gpg-agent.texi (Agent Options): Add --allow-mark-trusted.

* gpgconf-comp.c: Add --allow-mark-trusted for the gpg-agent.
2004-05-03 13:37:38 +00:00
Werner Koch 93e9f9aedd Added more runtime flags for the gpg-agent
backend.
2004-04-30 03:03:34 +00:00
Marcus Brinkmann 8370e202cc 2004-04-29 Marcus Brinkmann <marcus@g10code.de>
* gpgconf-comp.c (change_options_program): Turn on utf8-strings in
	the gpgconf specific part of the config file for the GnuPG
	backend.
2004-04-29 19:00:37 +00:00
Werner Koch 99a4774e34 Add --ocsp-signer for the dirmngr backend. 2004-04-28 09:04:03 +00:00
Marcus Brinkmann 2c9aac608b 2004-04-20 Marcus Brinkmann <marcus@g10code.de>
* gpgconf-comp.c (gc_options_gpg_agent): Change type of
	ignore-cache-for-signing option to GC_ARG_TYPE_NONE.
2004-04-20 16:02:30 +00:00
Werner Koch 1194f42d5a (my_dgettext): Switch the codeset once to utf-8.
Allow building with out NLS.
2004-04-07 16:53:55 +00:00
Werner Koch 2b1f8df9bd Add dirmngr:allow-ocsp 2004-03-23 18:43:25 +00:00
Marcus Brinkmann 3b7262e41e 2004-03-23 Marcus Brinkmann <marcus@g10code.de>
* gpgconf-comp.c (gc_options_dirmngr): Set GC_OPT_FLAG_ARG_OPT for
	"LDAP Server".
	(change_options_file): Remove assertion that tests that this flag
	is not present.  Handle an empty string in OPTION->new_value.
2004-03-23 18:27:37 +00:00
Marcus Brinkmann fae48e4f76 2004-03-23 Marcus Brinkmann <marcus@g10code.de>
* gpgconf.c (main): Remove obsolete warning.
2004-03-23 15:40:54 +00:00
Werner Koch d5579da4a3 (gc_options_gpg): New.
(gc_component_t, gc_component): Add GC_BACKEND_GPG.
2004-03-23 13:04:34 +00:00
Marcus Brinkmann fc584a063d 2004-03-23 Marcus Brinkmann <marcus@g10code.de>
* gpgconf-comp.c (gc_flag): Add missing flags.
2004-03-23 12:33:59 +00:00
Marcus Brinkmann 3b2e2e7418 2004-03-23 Marcus Brinkmann <marcus@g10code.de>
* gpgconf-comp.c: Include <signal.h>.
	(gc_backend): Add new member runtime_change.
	(gpg_agent_runtime_change): New function.
	(gc_component_change_options): New variable runtime.  Initialize
	it.  If an option is changed that has the GC_OPT_FLAG_RUNTIME bit
	set, also set the corresponding runtime variable.  Finally, call
	the runtime_change callback of the backend if needed.
2004-03-23 12:21:48 +00:00
Werner Koch 6568059dd6 (gc_options_gpg_agent): Implemented.
(gc_options_gpgsm, gc_options_scdaemon): Implemented.
(gc_backend_t): Add GC_BACKEND_SCDAEMON.
2004-03-16 19:00:25 +00:00
Werner Koch a6768b8eca (gc_options_gpg_agent): Implemented. 2004-03-16 10:48:13 +00:00
Marcus Brinkmann 2bb4c53e7a 2004-03-12 Marcus Brinkmann <marcus@g10code.de>
* gpgconf-comp.c (gc_component_change_options): Set the filenames
	of the option's backend, not of the component.
	Also use GC_BACKEND_NR, not GC_COMPONENT_NR.
2004-03-12 14:42:31 +00:00
Marcus Brinkmann 8927b55c28 2004-03-12 Marcus Brinkmann <marcus@g10code.de>
* gpgconf-comp.c (gc_component_change_options): Set the filenames
	of the option's backend, not of the component.
2004-03-12 14:29:40 +00:00
Werner Koch 7ad15ec24a Removed special code for RISC OS; we
don't want to clutter our code with system dependent stuff.
2004-03-09 14:34:12 +00:00
Marcus Brinkmann 8cf4e69141 2004-03-08 Marcus Brinkmann <marcus@g10code.de>
* gpgconf-comp.c (retrieve_options_from_file): Quote each string
	in the list, not only the first.
2004-03-08 17:59:24 +00:00
Marcus Brinkmann 4a038d65af 2004-02-26 Marcus Brinkmann <marcus@g10code.de>
* gpgconf-comp.c (gc_component_list_options): Do not print empty
	groups.
2004-02-26 22:45:19 +00:00
Marcus Brinkmann 91a514f2a1 2004-02-26 Marcus Brinkmann <marcus@g10code.de>
* gpgconf-comp.c (option_check_validity): Check if option is
	active.
	(change_options_file): Implement.
2004-02-26 22:18:36 +00:00
Marcus Brinkmann bfd5ed026c 2004-02-26 Marcus Brinkmann <marcus@g10code.de>
* gpgconf-comp.c (retrieve_options_from_program): Remove broken
	string handling.
2004-02-26 18:54:46 +00:00
Marcus Brinkmann aa7a4c1aec 2004-02-26 Marcus Brinkmann <marcus@g10code.de>
* gpgconf-comp.c (change_options_program): Support all types of
	options, including list types.
2004-02-26 18:39:34 +00:00
Marcus Brinkmann 255d2cea04 2004-02-26 Marcus Brinkmann <marcus@g10code.de>
* README.gpgconf: Fix description of arguments.
	* gpgconf-comp.c (option_check_validity): Rewritten to properly
	support optional arguments in lists.
2004-02-26 18:22:02 +00:00
Marcus Brinkmann 7aa4fa9b09 2004-02-26 Marcus Brinkmann <marcus@g10code.de>
* README.gpgconf (NAME): Add info about optional arg and arg type 0.
	* gpgconf-comp.c (gc_component_change_options): Parse list of
	arg type 0 options.
	(option_check_validity): Add new argument NEW_VALUE_NR.  Perform
	rigorous validity checks.
	(change_options_program): Disable an option also if we have a new
	value for it.
2004-02-26 16:28:27 +00:00
Marcus Brinkmann 8817c66900 2004-02-25 Marcus Brinkmann <marcus@g10code.de>
* gpgconf-comp.c (struct gc_option): Add new member new_flags.
	(option_check_validity): Check OPTION->new_flags beside
	OPTION->new_value.  Add new argument FLAGS.
	(gc_component_change_options): Support default flag correctly.
	(change_options_program): Likewise.
2004-02-25 20:24:53 +00:00
Marcus Brinkmann 8f8c5c47dd 2004-02-25 Marcus Brinkmann <marcus@g10code.de>
* gpgconf-comp.c (gc_component_list_options): Correct output for
	lists of arg type none.
2004-02-25 19:35:36 +00:00
Marcus Brinkmann 54d5446797 2004-02-24 Marcus Brinkmann <marcus@g10code.de>
* README.gpgconf: Revert last change.  Add new flags "default",
	"default desc" and "no arg desc".  Add new field ARGDEF.  Add new
	field FLAG to backend interface.
	* gpgconf-comp.c (struct gc_option): Make flags of type unsigned
	long.
	(gc_component_list_options): Adjust type for flags.
	Add default argument field.
	(retrieve_options_from_program): Use "1" as value for non-option
	arguments, not "Y".
	(gc_component_change_options): Read in flags from input.
2004-02-24 14:31:59 +00:00
Marcus Brinkmann cd3ccbf34d 2004-02-23 Marcus Brinkmann <marcus@g10code.de>
* README.gpgconf: Change meaning of type 0 options value if it is
	the empty string or "0".
2004-02-23 20:59:18 +00:00
Marcus Brinkmann 5620ac56bf 2004-02-23 Marcus Brinkmann <marcus@g10code.de>
* gpgconf.h (struct): Add member runtime.
	* gpgconf.c: Add new option oRuntime.
	(main): Same here.
2004-02-23 20:31:35 +00:00
Marcus Brinkmann c38f609206 2004-02-23 Marcus Brinkmann <marcus@g10code.de>
* gpgconf-comp.c (hextobyte): New function.
	(percent_deescape): New function.
	(get_config_pathname): Percent deescape pathname if taken from
	option (default) value.  Use default value only if it exists and
	is not empty.  Use empty string otherwise.  Don't include leading
	quote in pathname.
	(change_options_program): Percent deescape string before writing
	it out.
2004-02-23 19:37:04 +00:00
Werner Koch e588e13d7c Added empty components for gpgsm and scdaemon. 2004-02-18 17:00:56 +00:00
Werner Koch 7080c6553f * watchgnupg.c (main): Implement option "--".
(print_version): New.

* Makefile.am: Include cmacros.am for common flags.
2004-02-12 10:02:22 +00:00