Commit Graph

119 Commits

Author SHA1 Message Date
Moritz Schulte 4d2b474ef2 2005-01-26 Moritz Schulte <moritz@g10code.com>
* Makefile.am (libcommon_a_SOURCES): New source files: estream.c,
	estream.h.
	* estream.c, estream.h: New files.
2005-01-26 22:24:59 +00:00
Werner Koch 832edf9963 (send_pinentry_environment): Fixed changed from
2004-12-18; cut+paste error for lc-messages.
2005-01-03 11:30:43 +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 7b9e5a343f * homedir.c: New. Use CSIDL_APPDATA for W32 as the default home
directory.
2004-12-21 12:44:42 +00:00
Werner Koch 878cf20766 * gpg-agent.c (main): Use default_homedir().
* protect-tool.c (main): Ditto.

* signal.c (got_fatal_signal, got_usr_signal)
(got_fatal_signal) [DOSISH]: Don't build.
* simple-gettext.c: Include sysutils.h

* homedir.c: New.
* Makefile.am (libcommon_a_SOURCES): Add it.
(EXTRA_DIST): Removed mkerror and mkerrtok.

* gpgv.c, g10.c (main): Use default_hoemdir ().

* scdaemon.c (main): Use default_homedir().

* gpgsm.c (main): Use default_homedir().
2004-12-21 10:03:00 +00:00
Werner Koch 581f5ddb17 * configure.ac: Add PATHSEP_C and PATHSEP_S. For W32 let all
directories default to c:/gnupg.  Require libassuan 0.6.9.

* gpg-agent.c (main) [W32]: Now that Mutexes work we can remove
the pth_init kludge.
(main): Add new options --[no-]use-standard-socket.
(check_for_running_agent): Check whether it is running on the
standard socket.

* sysutils.h [W32]: Define sleep.
* util.h: Add prototype for mkdtemp.

* call-agent.c (start_agent): Before starting a pipe server start
to connect to a server on the standard socket.  Use PATHSEP
* call-dirmngr.c (start_dirmngr): Use PATHSEP.

* import.c: Include unistd.h for dup and close.
2004-12-20 16:17:25 +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
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
Werner Koch 3666a2859b Avoid the " map_to_assuan_status called with no error source" diagnostic. 2004-12-18 10:22:10 +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 b50a587d8d * asshelp.c (send_pinentry_environment) [W32]: Do not use ttyname.
* w32-pth.c, w32-pth.h: New.

* Makefile.am (gpgsm_LDADD): Put libassuan before jnlib because
under W32 we need the w32 pth code from jnlib.

* misc.c (setup_pinentry_env) [W32]: Disabled.
2004-12-07 11:21:40 +00:00
Werner Koch 0a058ac53c * exechelp.h, exechelp.c: New. Based on code from ../sm/import.c.
* gpgsm.c (run_protect_tool) [_WIN32]: Disabled.

* import.c (popen_protect_tool): Simplified by making use of
gnupg_spawn_process.
(parse_p12): Likewise, using gnupg_wait_process.
* export.c (popen_protect_tool): Ditto.
(export_p12): Ditto.
2004-12-06 18:28:56 +00:00
Werner Koch 237611cddf Fixed copyright comments. 2004-12-03 18:38:23 +00:00
Werner Koch 4a73d94757 First take on a W32 port 2004-12-02 07:48:09 +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 33310977ac (simple_pwquery): Handle gpg-error style return
code for canceled.
2004-08-18 14:37:22 +00:00
Werner Koch 2e10dbd6c8 * Makefile.am (sm): Build kbx only if gpgsm is to be build.
* maperror.c: Removed header ksba.h.  Not required anymore.
2004-07-20 18:41:49 +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
Werner Koch 438ece068b * util.h (xtrycalloc_secure,xtrymalloc_secure): New. 2004-06-06 12:59:02 +00:00
Werner Koch ac791c0a9a * sysutils.c (disable_core_dumps): Only set the current limit.
(enable_core_dumps): New.

* gpgsm.texi (Esoteric Options): Add --debug-allow-core-dump.

* gpgsm.c: New option --debug-allow-core-dump.

* gpgsm.h (opt): Add member CONFIG_FILENAME.
* gpgsm.c (main): Use it here instead of the local var.

* server.c (gpgsm_server): Print some additional information with
the hello in verbose mode.
2004-05-11 09:54:52 +00:00
Werner Koch 5b9023c6e7 (copy_and_escape): Relaxed quoting. 2004-04-13 09:45:23 +00:00
Werner Koch d3411b3277 (STATUS_NEWSIG): New. 2004-04-05 17:24:27 +00:00
Werner Koch b541bbde6d * dynload.h [__MINGW32__]: Define RTLD_LAZY. 2004-03-16 10:47:08 +00:00
Werner Koch 884483282f Preparing for a release 2004-03-06 20:11:19 +00:00
Werner Koch a1b487a17a * protect-tool.c: New options --have-cert and --prompt.
(export_p12_file): Read a certificate from STDIN and pass it to
p12_build.  Detect a keygrip and construct the filename in that
case.  Unprotcet a key if needed.  Print error messages for key
formats we can't handle.
(release_passphrase): New.
(get_passphrase): New arg PROMPTNO. Return the allocated
string. Changed all callers.

* minip12.c: Revamped the build part.
(p12_build): New args CERT and CERTLEN.

* simple-pwquery.c (agent_open): Don't mangle INFOSTR.

* export.c (export_p12, popen_protect_tool)
(gpgsm_p12_export): New.
* gpgsm.c (main): New command --export-secret-key-p12.
2004-02-19 16:26:32 +00:00
Werner Koch 103a442be9 * simple-pwquery.c (agent_open): Ignore an empty GPG_AGENT_INFO. 2004-02-18 16:58:00 +00:00
Werner Koch ef5546a48b Added STATUS_IMPORT_OK. 2004-02-17 15:04:28 +00:00
Werner Koch f0d63ef75d New. Based on code from ../sm/base64.c. 2004-02-10 19:27:54 +00:00
Marcus Brinkmann 0f7a19f3b0 2004-01-30 Marcus Brinkmann <marcus@g10code.de>
* Makefile.am (libcommon_a_SOURCES): Add xasprintf.c.
	* miscellaneous.c (xasprintf): Moved to ...
	* xasprintf (xasprintf): ... here.  New file.
	This allows to use xasprintf without sucking in gpg-error.
2004-01-30 12:37:09 +00:00
Werner Koch eb24d8b751 Some minor bug fixes, new test utilities and started support for other
smartcard applications.
2004-01-27 16:40:42 +00:00
Werner Koch 6103066b17 (map_assuan_err): Prepared for a new error code. 2003-12-23 10:24:49 +00:00
Werner Koch 8ab35a7d26 * gettime.c (asctimestamp): Add a note on a non-avoidable gcc warning.
* util.h [!HAVE_VASPRINTF]: Add printf format attribute to the
replacement function.

* miscellaneous.c (xasprintf): New.
2003-12-17 12:26:38 +00:00
Werner Koch fbb2d9de15 Preparing for 1.9.2 release. 2003-11-17 12:20:11 +00:00
Werner Koch ecba8bf1f5 Removed. 2003-11-14 11:36:04 +00:00
Werner Koch 9b32497c7e (vasprintf): Also fixed the prototype. 2003-11-13 19:15:38 +00:00
Werner Koch 53272a25fc (vasprintf): ARGS should not be a pointer. Fixed
segv on Solaris.  Reported by Andrew J. Schorr.
2003-11-13 07:37:18 +00:00
Werner Koch dba40e5e45 Mainly changes to adjust for the changed KSBA API. 2003-11-12 15:17:44 +00:00
Werner Koch f21638c9e3 * util.h (gnupg_isotime_t): New.
(gnupg_copy_time): New.

* gettime.c (gnupg_get_isotime): New.
2003-10-31 12:11:57 +00:00
Werner Koch 4c66e94ff9 Merged most of David Shaw's changes in 1.3 since 2003-06-03. 2003-09-23 17:48:33 +00:00
Werner Koch 210b725748 (tty_fprintf): New.
(tty_print_string, tty_print_utf8_string2)
(tty_print_utf8_string): Made P argument const byte*.
2003-09-18 15:51:01 +00:00
Marcus Brinkmann 238a1b26b8 2003-08-20 Marcus Brinkmann <marcus@g10code.de>
* maperror.c (map_ksba_err): Map -1.  Use gpg_err_make to set
	the error source.
2003-08-20 17:23:23 +00:00
Timo Schulz f099ed75b8 *** empty log message *** 2003-08-14 12:16:58 +00:00
Timo Schulz 2bf665e188 2003-08-14 Timo Schulz <twoaday@freakmail.de>
* dlfcn.h. New. W32 wrapper around the dynload mechanism.
2003-08-14 12:06:43 +00:00
Repo Admin 9ca4830a5b This commit was manufactured by cvs2svn to create branch
'GNUPG-1-9-BRANCH'.
2003-08-05 17:11:04 +00:00
Repo Admin 82a17c9fb3 This commit was manufactured by cvs2svn to create branch
'GNUPG-1-9-BRANCH'.
2002-10-19 07:55:27 +00:00
Neal Walfield cab999130d 2002-09-04 Neal H. Walfield <neal@g10code.de>
* vasprintf.c (vasprintf) [va_copy]: Use va_copy.
	[!va_copy && __va_copy]: Use __va_copy.
	[!va_copy && !__va_copy]: Only now fall back to using memcpy.
2002-09-05 16:24:16 +00:00
Werner Koch 04011644ae * errors.h: Added STATUS_IMPORT_PROBLEM. 2002-08-21 15:41:11 +00:00
Werner Koch bc8364ec4f * vasprintf.c: Hack to handle NULL for %s. 2002-08-21 08:18:43 +00:00
Werner Koch 5b0ccaf949 * signal.c: New. Taken from GnuPG 1.1.91. 2002-08-09 18:13:41 +00:00
Werner Koch bbf580e702 * fseeko.c, ftello.c: New.
* configure.ac: Check for ftello and provide a replacement.
2002-07-22 10:20:39 +00:00
Werner Koch 0c0b0f5452 * maperror.c (map_to_assuan_status): Map more errorcodes to Bad
Certificate.
2002-06-28 16:16:57 +00:00
Werner Koch d905375003 * maperror.c (map_to_assuan_status): Map EOF to No_Data_Available. 2002-06-26 12:51:24 +00:00
Werner Koch 3221ef0add Various changes. 2002-06-12 09:56:05 +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 3910c0f005 * mkdtemp.c: Replaced byte by unsigned char because it is no longer
defined in gcrypt.h.
2002-05-22 06:23:22 +00:00
Werner Koch 4f7330e0bb * import.c (gpgsm_import): Try to identify the type of input and
handle certs-only messages.

* maperror.c (map_gcry_err): Add libgcrypt's new S-expression errors.
(map_ksba_err): Add a few mappings.

* configure.ac: We now require libgcrypt 1.1.7 and libksba 0.4.2.
2002-05-21 08:29:17 +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 11d568a62f * errors.h: Added STARUS_EXPSIG and STATUS_EXPKEYSIG. 2002-05-03 20:19:35 +00:00
Werner Koch 3719aa5148 * cryptmiss.c: New. 2002-04-15 10:10:59 +00:00
Werner Koch 1df38417a3 More error codes 2002-02-18 20:46:09 +00:00
Werner Koch 85d9e2e212 * fopencookie.c: Dummy function.
* vasprintf.c: New.  Taken from binutils-2.9.1 and dropped all non
ANSI-C stuff.  Merged with asprintf version.

* no-pth.c: New.
2002-02-12 20:42:25 +00:00
Werner Koch 1280f16d96 * mkdtemp.c: Copied from gnupg-1.0.6c and changed to use libgcrypt.
* configure.ac (mkdtemp): See whether we have to provide a
replacement.
2002-01-23 15:49:58 +00:00
Werner Koch 0e06a31d58 * sysutils.c: New. This is the misc.c file from gnupg 1.0.6 with
the OpenPGP stuff removed.
* sysutils.h: New.
2002-01-19 20:58:41 +00:00
Werner Koch a6a2595dba * maperror.c: Add mapping for Not_Trusted. 2002-01-15 13:02:13 +00:00
Werner Koch 98b2622ef0 * maperror.c (map_assuan_err): Codes for CRL 2002-01-11 17:07:15 +00:00
Werner Koch 8bad9e344b *** empty log message *** 2002-01-10 19:46:20 +00:00
Werner Koch ee1b7e428b * maperror.c (map_gcry_err): Add some mappings. 2001-12-20 16:49:48 +00:00
Werner Koch 86521773df * Makefile.am (AM_CPPFLAGS): Add flags for libksba
* Makefile.am (AM_CPPFLAGS): Include flags for gcrypt and ksba
* Makefile.am: Use LIBGCRYPT macros
2001-12-18 19:35:12 +00:00
Werner Koch 317bccd134 * util.h (digitp, hexdigitp): New ctype like macros.
(atoi_1,atoi_2,atoi_4,xtoi_1,xtoi_2): New.
2001-12-14 13:37:08 +00:00