1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-09-20 14:51:42 +02:00
Commit Graph

3930 Commits

Author SHA1 Message Date
Werner Koch
9e3526f236 * seckey-cert.c (do_check): Handle case when checksum was okay but
passphrase still wrong.  Roman Pavlik found such a case.

* mpicoder.c (mpi_read_from_buffer): Don't abort in case of an
invalid MPI but print a message and return NULL.  Use log_info and
not log_error.
2004-12-20 10:05:20 +00:00
Werner Koch
be4bb5a88b (handle_iconv_error): Turn diagnostics into warnings
so that gpg does not return with failure.
(native_to_utf8, utf8_to_native): Ditto.
2004-12-20 08:55:03 +00:00
Werner Koch
18fd4964f6 * call-scd.c (init_membuf, put_membuf, get_membuf): Removed. We
now use the identical implementation from ../common/membuf.c.

* pksign.c (agent_pksign): Changed arg OUTFP to OUTBUF and use
membuf functions to return the value.
* pkdecrypt.c (agent_pkdecrypt): Ditto.
* genkey.c (agent_genkey): Ditto.
* command.c (cmd_pksign, cmd_pkdecrypt, cmd_genkey): Replaced
assuan_get_data_fp() by a the membuf scheme.
(clear_outbuf, write_and_clear_outbuf): New.

* membuf.c (put_membuf): Wipe out buffer after a failed realloc.
2004-12-20 08:32:56 +00:00
David Shaw
07250279e7 * keyedit.c (keyedit_menu): Invisible alias "passwd" as "password".
* passphrase.c: Don't check for __CYGWIN__, so it is treated as a
unix-like system.

* options.h, g10.c (main), textfilter.c (standard): Use new option
--rfc2440-text to determine whether to filter "<space>\t\r\n" or just
"\r\n" before canonicalizing text line endings.  Default to
"<space>\t\r\n".
2004-12-20 05:19:09 +00:00
Werner Koch
e212805a9c * query.c (initialize_module_query): New.
* call-scd.c (initialize_module_call_scd): New.
	* gpg-agent.c (main): Call them.
2004-12-19 17:45:50 +00:00
Werner Koch
8f22f895e9 * query.c (initialize_module_query):
* call-scd.c (initialize_module_call_scd): New.

* w32-pth.c (pth_init): Enable debugging depending on env var.
(pth_self): New.
(pth_mutex_release, pth_mutex_acquire): Implemented directly using
the W32 API.
2004-12-19 17:44:20 +00:00
Werner Koch
e73100a940 * maperror.c (map_assuan_err_with_source): Oops, args were swapped.
* w32-pth.c (pth_init): Enable debugging depending on env var.
2004-12-19 13:38:24 +00:00
David Shaw
1e487ab1d6 * keygen.c (keygen_get_std_prefs): Set reference count when creating the
temporary user ID.

* keyedit.c (keyedit_menu): Merge updpref and setpref.  Keep updpref as an
invisible alias.  Add invisible alias for revphoto. Fix small memory leak
when using "setpref" (not all of the uid was freed). (menu_revkey):
Trigger a trust rebuild after revoking a key. Don't allow revoking an
already-revoked whole key. (menu_revsubkey): Don't allow revoking an
already-revoked subkey.
2004-12-19 05:20:07 +00:00
David Shaw
06c27b8a38 * keyedit.c (menu_revkey): Rename to menu_revsubkey. (menu_revkey): New.
Revoke a whole key. (keyedit_menu): Call it here for when 'revkey' is used
without any subkeys selected.  This is to be consistent with the other
functions which are "selected part if selected, whole key if not".
2004-12-19 04:30:16 +00:00
David Shaw
f3baa06020 Oddly commit missed this one.
* configure.ac: Call the new GNUPG_CHECK_READLINE macro for readline
stuff.
2004-12-18 22:39:31 +00:00
David Shaw
005b1d7960 Readline fix to be robust against platforms where readline has its own
dependencies.  We play guess-the-depedency for a while, and try termcap,
curses, and ncurses.
2004-12-18 22:23:49 +00:00
Werner Koch
694037f2a5 * configure.ac (AH_BOTTOM): Define EXEEXT_S.
* autogen.sh: Updated --build-w32 feature.

* gpg-agent.c (main):  Remove special Pth initialize.

* w32-pth.c (pth_init): Reverse return values.  Use TRUE and FALSE
constants.
(pth_kill, pth_mutex_acquire, pth_attr_set, pth_join, pth_cancel):
Ditto.

* scdaemon.c (main) [W32]: Remove special Pth initialize..
2004-12-18 18:53:32 +00:00
Werner Koch
3666a2859b Avoid the " map_to_assuan_status called with no error source" diagnostic. 2004-12-18 10:22:10 +00:00
David Shaw
39b0f6e4ea * configure.ac: Add a --with-ldap=DIR so people can add to the search
path.
2004-12-17 23:07:59 +00:00
Moritz Schulte
d75eda2b87 2004-12-17 Moritz Schulte <moritz@g10code.com>
* query.c: Undo change from 2004-12-05.
2004-12-17 20:41:50 +00:00
Werner Koch
74330a49ec * passphrase.c (agent_get_passphrase): Define NREAD locally as
size_t or int.

* keylist.c (list_keyblock_print): Make field width an int.
* keyedit.c (show_key_with_all_names): Ditto.
2004-12-17 18:51:32 +00:00
Werner Koch
0ccb120f68 * call-dirmngr.c (isvalid_status_cb, lookup_status_cb)
(run_command_status_cb): Return cancel status if gpgsm_status
returned an error.

* server.c (gpgsm_status, gpgsm_status2)
(gpgsm_status_with_err_code): Return an error code.
(gpgsm_status2): Always call va_end().
2004-12-17 14:36:16 +00:00
David Shaw
4ec9365c6d * configure.ac: Check for arpa/nameser.h. 2004-12-16 18:45:48 +00:00
David Shaw
2b9e678fde * configure.ac: Check for arpa/nameser.h.
* srv.h: Don't include arpa/nameser.h unless we have it.  Include
"types.h" for u16.
2004-12-16 18:36:42 +00:00
Werner Koch
97587c6d7a post release updates 2004-12-16 10:53:25 +00:00
Werner Koch
ec59e8a20e Minor fixes 2004-12-16 10:28:50 +00:00
Werner Koch
774b52fc8d Add a note on how to send translations. 2004-12-16 10:13:02 +00:00
Werner Koch
d171615f5b About to release 1.4.0 2004-12-16 10:04:36 +00:00
David Shaw
60d1c12048 * gpg.sgml: Document --require-secmem/--no-require-secmem. Note that the
sign flags (l, t, nr) can be mixed.  Remove --nrsign-key.
2004-12-16 06:01:19 +00:00
David Shaw
e79f2db8e4 * g10.c (main): Add --require-secmem/--no-require-secmem to cause gpg to
exit if it cannot lock memory.  Also remove --nrsign-key and --nrlsign-key
since this can better be done via --edit-key.

* secmem.c (secmem_init): Return a flag to indicate whether we got the
lock.

* memory.h: Return a flag to indicate whether we got the lock.
2004-12-16 05:16:09 +00:00
Werner Koch
4350c58757 (lookup_status_cb): Send progress messages
upstream.
(isvalid_status_cb): Ditto.
(gpgsm_dirmngr_isvalid): Put CTRL into status CB parameters.
(gpgsm_dirmngr_run_command, run_command_status_cb): Pass CTRL to
status callback and handle PROGRESS.
2004-12-15 14:38:37 +00:00
Werner Koch
69967b0412 A whole bunch of changes to allow building for W32. 2004-12-15 14:15:54 +00:00
David Shaw
7a388529a3 * apdu.c (apdu_send_le, apdu_send_direct), keylist.c
(status_one_subpacket, print_one_subpacket): Fix some compiler warnings.

* g10.c (main): Fix --compression-algo to take a string argument like
--compress-algo.

* trustdb.c (uid_trust_string_fixed): For safety, check for a pk.
2004-12-15 05:16:53 +00:00
Werner Koch
53ae21e745 Yep. No lost threads anymore.
(_pth_strerror): Renamed to ...
(w32_strerror): .. this. And let callers provide a buffer.
(spawn_helper_thread): Removed HD arg and hardwire the stack size
to 32k.
(do_pth_wait): Removed use of ATTR; not needed for the helper
threads.
(helper_thread): Renamed to ..
(launch_thread): .. this.  Release handle if not joinable.
(struct pth_priv_hd_s): Renamed to ...
(struct thread_info_s): .. this.  Add member JOINABLE and TH.
2004-12-14 19:20:36 +00:00
Timo Schulz
4becd8ddcc 2004-12-14 Timo Schulz <twoaday@g10code.com>
* w32-pth.c (pth_kill): Just release the crit section if
        pth_init was really called. And set all handles to NULL.
        (_pth_strerror): New.
        (do_pth_wait): Before we enter the loop we check if there
        are too much events in the ring.
2004-12-14 17:47:12 +00:00
David Shaw
b120400413 * keyedit.c (keyedit_menu): Re-remove the N_() markers. 2004-12-14 14:50:15 +00:00
Werner Koch
2946819dfc More fixes. First successful use; leaks threads, though. 2004-12-14 14:49:21 +00:00
David Shaw
7dd3fe2a79 * trustdb.c (uid_trust_string_fixed): Show uids as revoked if the key is
revoked.

* keyedit.c (show_key_with_all_names): Don't show validity for secret key
UIDs.

* keyedit.c (parse_sign_type): New.  Figure out the flags (local,
nonrevoke, trust) for a signature. (keyedit_menu): Call it here so we can
mix and match flags, and don't need "nrltsign", "ltsign", "tnrsign", etc,
etc, etc.
2004-12-14 14:42:41 +00:00
Werner Koch
837ce29cbc * w32-pth.h (pth_event_occured): Removed macro.
* w32-pth.c: Fixed license statement; its under the LGPL.
(enter_pth, leave_pth): Use them to bracket almost all public
functions.
2004-12-14 11:25:04 +00:00
Werner Koch
3a6e319232 post release updates 2004-12-14 08:33:01 +00:00
Werner Koch
160eaf1874 automake updates, removed one debug output 2004-12-14 08:03:56 +00:00
Werner Koch
d0b9eff4b6 Prepared for last 1.4 release candidate 2004-12-14 07:49:27 +00:00
Timo Schulz
db27cdff41 2004-12-13 Timo Schulz <twoaday@g10code.com>
* w32-pth.c (enter_pth, leave_pth): New.
        (pth_init): Initialize global mutex section.
        (pth_kill): Release global mutex section.
        (helper_thread): New.
        (pth_spawn): Make sure only one thread is running.
2004-12-13 18:00:35 +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
907c91960e Added real code written by Timo Schulz.
Not finished, though.
2004-12-13 09:05:31 +00:00
Werner Koch
1037420b76 (read_passphrase_from_fd): Fixed memory leak.
Noted by Andrei Darashenka.
2004-12-13 08:04:52 +00:00
Werner Koch
e4280026f4 (keys): Removed my old 621CC013 key
which expires at the end of this year.  Add g10 Code's source code
signing key 37D92FFB.
2004-12-12 16:03:47 +00:00
David Shaw
4c2bacac99 * keyserver.c (parse_preferred_keyserver): Force preferred keyserver
subpackets to have a URI scheme specified.
2004-12-12 05:10:22 +00:00
David Shaw
bf5d013bc8 * options.h, g10.c (main), textfilter.c (standard): Use --rfc2440 or
--openpgp directly to determine the end of line hashing rule.

* trustdb.c (uid_trust_string_fixed): Show uids as expired if the key is
expired.
2004-12-11 04:47:33 +00:00
Werner Koch
396f72d1b2 * sv.po: Take the update done for 1.2.6.
* zh_CN.po, fr.po, cs.po, ja.po: Updated.
2004-12-10 22:21:02 +00:00
Werner Koch
5a37f0deab * app-openpgp.c (send_fprtime_if_not_null): New.
(do_getattr): Add KEY_TIME.
(do_learn_status): Print KEY_TIME.
* cardglue.c (learn_status_cb): Parse KEY-TIME.
* card-util.c (card_status): Print creation time if available.
2004-12-10 10:49:14 +00:00
David Shaw
1c334577f3 * options.h, g10.c (main), textfilter.c (len_without_trailing_ws): Removed
(not used). (standard): 2440 says that textmode hashes should canonicalize
line endings to CRLF and remove spaces and tabs.  2440bis-12 says to just
canonicalize to CRLF.  So, we default to the 2440bis-12 behavior, but
revert to the strict 2440 behavior if the user specifies --rfc2440.  In
practical terms this makes no difference to any signatures in the real
world except for a textmode detached signature.
2004-12-10 05:35:54 +00:00
Werner Koch
9e52cf2758 * passphrase.c (agent_get_passphrase): New args CUSTOM_PROMPT and
CUSTOM_DESCRIPTION. 	Changed all callers.

* app-openpgp.c (do_getattr, do_learn_status, do_setattr): Support
the new private DOs.
(do_change_pin): Add a "N" prefix to the strings so that the
callback can act accordingly for a new PIN.  Unfortunately this
breaks existing translations but I see no wother way to overvome
this.

* cardglue.c (learn_status_cb): Ditto.
(agent_release_card_info): Ditto.
(struct pin_cb_info_s): Removed and changed all users.
(pin_cb): Reworked.

* card-util.c (card_status): Print them
(card_edit): New command PRIVATEDO.
(change_private_do): New.
2004-12-09 16:57:30 +00:00
David Shaw
53ae360457 * keygen.c (ask_algo): Add a choose-your-own-capabilities option for DSA. 2004-12-09 15:49:47 +00:00
David Shaw
467ac827b5 * highlights-1.4.txt: New.
* mksamplekeys, samplekeys.asc: Add the PGP global directory key.
2004-12-09 13:17:48 +00:00