Commit Graph

72 Commits

Author SHA1 Message Date
Werner Koch 7921516e85 minor changes to make make distcheck happy 2003-07-31 15:45:11 +00:00
Werner Koch 860f56b089 Adjusted for use with current libgcrypt (1.1.42). 2003-07-28 08:59:18 +00:00
Werner Koch 59e5fb16f6 * simple-pwquery.c, simple-pwquery.h: Moved to ../common.
* Makefile.am (gpg_protect_tool_LDADD): Add simple-pwquery.o.
Removed it from xx_SOURCES.
2003-07-16 13:44:03 +00:00
Werner Koch 274e121399 Minor changes to make make dist work correctly. 2003-07-04 09:40:19 +00:00
Werner Koch d1165b2132 * app-openpgp.c (store_fpr): Fixed fingerprint calculation.
* keygen.c (gen_card_key): Obviously we should use the creation
date received from SCDAEMON, so that the fingerprints will match.
* sign.c (do_sign): Pass the serialno to the sign code.
* keyid.c (serialno_and_fpr_from_sk): New.
2003-07-01 08:34:45 +00:00
Werner Koch f5db59fc21 Key generation and signing using the OpenPGP card does rudimentary work. 2003-06-27 20:53:09 +00:00
Werner Koch bd820bad4f A small step for GnuPG but a huge leap for error codes.
(Sorry, it does not build currently - I need to check it in to avoid
duplicate work.)
2003-06-05 07:14:21 +00:00
Marcus Brinkmann a58ce94d8e Update error handling to match gpg-error in CVS. 2003-06-04 21:37:56 +00:00
Werner Koch c3cdaeeff7 Make use of libgpg-error 2003-06-03 19:55:50 +00:00
Werner Koch ca4df4b123 * command.c (register_commands): Adjusted for new Assuan semantics.
* Makefile.am: Don't override LDFLAGS.
2003-04-29 10:38:49 +00:00
Werner Koch c13b76ca6a Updated from latest NewPG project 2003-01-09 12:59:25 +00:00
Werner Koch 2d432afff6 * gpg-agent.c (handle_signal): Flush cache on SIGHUP.
* cache.c (agent_flush_cache): New.
* gpg-agent.c, agent.h: Add --keep-display and --keep-tty.
* query.c (start_pinentry): Implement them.  The option passing
needs more thoughts.
2002-09-26 07:10:56 +00:00
Werner Koch d044a90f6c * gpg-agent.c (create_private_keys_directory)
(create_directories): New.
(main): Try to create a home directory.
2002-09-09 10:15:21 +00:00
Neal Walfield 32abeed559 2002-09-04 Neal H. Walfield <neal@g10code.de>
* gpg-agent.c (main): Use sigaction, not signal.
2002-09-05 16:28:31 +00:00
Neal Walfield 712af9e3ca 2002-09-03 Neal H. Walfield <neal@g10code.de>
* findkey.c: Include <fcntl.h>.
	(agent_write_private_key): Prefer POSIX compatibity, open and
	fdopen, over the simplicity of GNU extensions, fopen(file, "x").
2002-09-05 16:21:43 +00:00
Werner Koch 26f4dbc64b * query.c (agent_askpin): Provide the default desc text depending
on the pininfo.  Do the basic PIN verification only when
min_digist is set.
2002-08-22 09:47:39 +00:00
Werner Koch cda3b913db * query.c (agent_askpin): Hack to show the right default prompt.
(agent_get_passphrase): Ditto.

* Makefile.am: Renamed the binary protect-tool to gpg-protect-tool.
* protect-tool.c: Removed the note about internal use only.

* gpg-agent.c (main): New option --daemon so that the program is
not accidently started in the background.
2002-08-21 11:11:04 +00:00
Werner Koch a71981bace * divert-scd.c (getpin_cb): Pass a more descritive text to the
pinentry.

* Makefile.am: Renamed the binary protect-tool to gpg-protect-tool.
* protect-tool.c: Removed the note about internal use only.

* gpg-agent.c (main): New option --daemon so that the program is
not accidently started in the background.
2002-08-21 08:18:23 +00:00
Werner Koch ca7ed726a7 * call-scd.c (learn_status_cb): Handle CERTINFO status.
(agent_card_learn): Add args for certinfo cb.
* learncard.c (release_certinfo,certinfo_cb): New.
(send_cert_back): New. With factored out code from ..
(agent_handle_learn): here.  Return certinfo stuff.
2002-08-16 14:24:38 +00:00
Werner Koch 9c86904866 Minor changes for gettext 2002-08-10 11:25:32 +00:00
Werner Koch ebaf7d6e45 Minor fixes 2002-08-09 18:13:24 +00:00
Werner Koch f7bf66d89d typo fix. 2002-07-01 13:21:39 +00:00
Werner Koch 2082905525 * query.c (start_pinentry): Use GNUPG_DERAULT_PINENTRY.
* call-scd.c (start_scd): Use GNUPG_DEFAULT_SCDAEMON.
2002-06-29 14:01:35 +00:00
Werner Koch 3672606145 * protect-tool.c (export_p12_file): New.
(main): New command --p12-export.
* minip12.c (create_final,p12_build,compute_tag_length): New.
(store_tag_length): New.
2002-06-28 09:30:35 +00:00
Werner Koch 56b049686f * Makefile.am (pkglib_PROGRAMS): Put protect-tool there.
* findkey.c (agent_write_private_key,agent_key_from_file)
(agent_key_available): Use GNUPG_PRIVATE_KEYS_DIR constant.
* gpg-agent.c (main): Use GNUPG_DEFAULT_HOMEDIR constant.

* protect-tool.c (store_private_key): New.
(import_p12_file): Store the new file if requested.
(main): New options --force and --store.

* gpg-agent.c (main): Set a global flag when runing detached.
* query.c (start_pinentry): Pass the list of FD to keep in the
child when not running detached.
* call-scd.c (start_scd): Ditto.
2002-06-27 07:29:29 +00:00
Werner Koch c65009a2c5 * protect-tool.c (rsa_key_check): New.
(import_p12_file): New.
(main): New command --p12-import.
* minip12.c, minip12.h: New.
2002-06-25 17:50:59 +00:00
Werner Koch 469dc1043d * agent.h: Add a callback function to the pin_entry_info structure.
* query.c (agent_askpin): Use the callback to check for a correct
PIN.  Removed the start_err_text argument becuase it is not
anymore needed; changed callers.
* findkey.c (unprotect): Replace our own check loop by a callback.
(try_unprotect_cb): New.
* genkey.c (reenter_compare_cb): New.
(agent_genkey): Use this callback here.  Fixed setting of the pi2
variable and a segv in case of an empty PIN.

* divert-scd.c (getpin_cb): Removed some unused stuff and
explained what we still have to change.
2002-06-17 10:11:34 +00:00
Werner Koch 82575bfb98 Fixed last fix. 2002-06-13 12:04:22 +00:00
Werner Koch 4e13426c92 * gpgsm.c (main): New option --log-file. 2002-06-13 11:45:36 +00:00
Werner Koch f393e0d6b2 * protect-tool.c: Add command --show-keygrip
(show_keygrip): New.
2002-06-12 09:55:41 +00:00
Werner Koch b209c17be9 * no-pth.c, Makefile.am: Removed.
* call-scd.c: Seirialized all scdaeom access when using Pth.

* cache.c: Made the cache Pth-thread-safe.
(agent_unlock_cache_entry): New.
* findkey.c (unprotect): Unlock the returned cache value.
* command.c (cmd_get_passphrase): Ditto.

* gpg-agent.c (main): Register pth_read/write with Assuan.
2002-05-23 09:07:45 +00:00
Werner Koch c7ceb874c2 sm/
* gpgsm.c: New option --faked-system-time
* sign.c (gpgsm_sign): And use it here.
* certpath.c (gpgsm_validate_path): Ditto.
common/
* gettime.c: New.
agent/
* cache.c (housekeeping, agent_put_cache): Use our time() wrapper.
/
* doc/: New
* configure.ac, Makefile.am:  Added doc/
2002-05-14 16:51:00 +00:00
Werner Koch 8460fb4a73 Debug message cleanups.
Fixed passphrase caching.
2002-04-27 13:49:40 +00:00
Werner Koch a2176634ae * call-agent.c (start_agent): Make copies of old locales and check
for setlocale.

* configure.ac: Check for setlocale.
2002-04-25 08:31:48 +00:00
Marcus Brinkmann b4f8fcb0e1 2002-04-25 Marcus Brinkmann <marcus@g10code.de>
* agent.h (agent_get_confirmation): Replace paramter prompt with
	two parameters ok and cancel.
	* query.c (agent_get_confirmation): Likewise.  Implement this.
	* trustlist.c (agent_marktrusted): Fix invocation of
	agent_get_confirmation.
	* divert-scd.c (ask_for_card): Likewise.
2002-04-24 23:18:53 +00:00
Marcus Brinkmann ee6bb32a8b 2002-04-24 Marcus Brinkmann <marcus@g10code.de>
* configure.ac: Check for locale.h.

agent/
2002-04-24  Marcus Brinkmann  <marcus@g10code.de>

	* agent.h (struct opt): Add members display, ttyname, ttytype,
	lc_ctype, and lc_messages.
	* gpg-agent.c (enum cmd_and_opt_values): Add oDisplay, oTTYname,
	oTTYtype, oLCctype, and LCmessages.
	(main): Handle these options.
	* command.c (option_handler): New function.
	(register_commands): Register option handler.
	* query.c (start_pinentry): Pass the various display and tty
	options to the pinentry.

sm/
2002-04-24  Marcus Brinkmann  <marcus@g10code.de>

	* gpgsm.h (struct opt): New members display, ttyname, ttytype,
	lc_ctype, lc_messages.
	* gpgsm.c (enum cmd_and_opt_values): New members oDisplay,
	oTTYname, oTTYtype, oLCctype, oLCmessages.
	(opts): New entries for these options.
	(main): Handle these new options.
	* call-agent.c (start_agent): Set the various display and tty
	parameter after resetting.
2002-04-24 21:52:47 +00:00
Werner Koch 1943ed5d2c * protect-tool.c (show_file): New. Used as default action. 2002-04-09 18:34:38 +00:00
Werner Koch 90bc40a9f7 * divert-scd.c (encode_md_for_card): Don't do the pkcs-1 padding,
the scdaemon should take care of it.
(ask_for_card): Hack to not display the trailing zero.
2002-03-28 11:42:40 +00:00
Werner Koch c39b866d2a Doc fixes, moved some fizmes to TODO, fixed minor bugs. 2002-03-18 09:30:35 +00:00
Werner Koch 4e637f2285 sm/
* gpgsm.c: New command --learn-card
* call-agent.c (learn_cb,gpgsm_agent_learn): New.
* gpgsm.c (main): Print error messages for non-implemented commands.
agent/
* learncard.c: New.
* divert-scd.c (ask_for_card): The serial number is binary so
convert it to hex here.
* findkey.c (agent_write_private_key): New.
* genkey.c (store_key): And use it here.
scd/
* pkdecrypt.c (agent_pkdecrypt): Changed the way the diversion is done.
* divert-scd.c (divert_pkdecrypt): Changed interface and
implemented it.
2002-03-06 14:16:37 +00:00
Werner Koch 303b4bd636 Decryption using a Cryptoflex card does now work. 2002-03-06 09:01:12 +00:00
Werner Koch d8538d80dd This file was missing. 2002-03-05 17:16:04 +00:00
Werner Koch 2fa73e781f Signing using a PKCS15 smartcard does work. How to create such a card
is of course a different thing.  Note, that you need to create the
shadowed-private-key file manually.
2002-03-05 17:14:45 +00:00
Werner Koch 9301f1cf69 * pksign.c (agent_pksign): Detect whether a Smartcard is to be
used and divert the operation in this case.
* pkdecrypt.c (agent_pkdecrypt): Likewise
* findkey.c (agent_key_from_file): Add optional arg shadow_info
and have it return information about a shadowed key.
* protect.c (agent_get_shadow_info): New.
* protect.c (snext,sskip,smatch): Moved to
* sexp-parse.h: new file.
* divert-scd.c: New.
2002-03-04 10:34:51 +00:00
Werner Koch 56341c289c Changes needed to support smartcards. Well, only _support_. There is
no real code yet.
2002-02-28 11:07:59 +00:00
Werner Koch f8c8ca26d4 * assuan-client.c (assuan_transact): Add 2 more arguments to
support status lines. Passing NULL yields the old behaviour.
* assuan-handler.c (process_request): Flush data lines send
without using the data fp.
2002-02-28 11:05:57 +00:00
Werner Koch 2585114325 * findkey.c (unprotect): Show an error message for a bad passphrase. 2002-02-18 22:39:26 +00:00
Werner Koch 822e682c50 * command.c (cmd_marktrusted): Implemented.
* trustlist.c (agent_marktrusted): New.
(open_list): Add APPEND arg.

* query.c (agent_get_confirmation): New.
2002-02-18 20:44:48 +00:00
Werner Koch 0c4c0f2ecc * cache.c (housekeeping): Fixed linking in the remove case. 2002-02-06 14:51:35 +00:00
Werner Koch 30f1b027c0 * cache.c: Add a few debug outputs.
* protect.c (agent_private_key_type): New.
* agent.h: Add PRIVATE_KEY_ enums.
* findkey.c (agent_key_from_file): Use it to decide whether we
have to unprotect a key.
(unprotect): Cache the passphrase.

* findkey.c (agent_key_from_file,agent_key_available): The key
files do now require a ".key" suffix to make a script's life
easier.
* genkey.c (store_key): Ditto.
2002-02-01 11:39:06 +00:00