Commit Graph

463 Commits

Author SHA1 Message Date
Werner Koch 7d63aa42e5 Remove hacks which are not anymore needed since we now require Libgcrypt 1.4 2008-09-29 15:02:55 +00:00
Werner Koch f899b9683b Support the Certifciate DO of the v2 OpenPGP cards. 2008-09-23 09:57:45 +00:00
Werner Koch d30fdae24b Workaround for a mingw runtime bug. 2008-09-04 10:35:41 +00:00
Werner Koch 5a8bf0bec6 Fix gpg-preset-passphrase bug.
Cleanups
2008-09-03 09:37:32 +00:00
Werner Koch 7b81a6b074 Print a 'f' for validated non-root certificates in gpgsm colon style listing.
Doc fixes.
2008-08-13 15:41:48 +00:00
Marcus Brinkmann 7d2cfee1df 2008-08-08 Marcus Brinkmann <marcus@g10code.de>
* gpgsm.h (struct server_control_s): Remove member dirmngr_seen.
	* call-dirmngr.c (dirmngr2_ctx, dirmngr_ctx_locked)
	(dirmngr2_ctx_locked): New global variables.
	(prepare_dirmngr): Don't check dirmngr_seen anymore.
	(start_dirmngr): Move bunch of code to ...
	(start_dirmngr_ext): ... this new function.
	(release_dirmngr, start_dirmngr2, release_dirmngr2): New
	functions.
	(gpgsm_dirmngr_isvalid): Call release_dirmngr.
	(gpgsm_dirmngr_lookup): Call release_dirmngr.  If dirmngr_ctx is
	locked, use dirmngr2_locked.
	(gpgsm_dirmngr_run_command): Call release_dirmngr.
2008-08-08 01:06:48 +00:00
Werner Koch e253f0cb55 Minor fixes. 2008-06-26 19:21:45 +00:00
Werner Koch a6a9181818 Start support of TCOS 3 cards.
Support restriction attribute.
Fix utf-8 printing problems.
Use AES by default.
2008-06-26 19:09:07 +00:00
Werner Koch c241d02e0d Code cleanup. 2008-06-23 14:43:14 +00:00
Marcus Brinkmann 88fdd39749 2008-06-13 Marcus Brinkmann <marcus@ulysses.g10code.com>
* call-dirmngr.c (prepare_dirmngr): Fix error code to ignore.
2008-06-13 22:10:22 +00:00
Marcus Brinkmann 04e965c7fc sm/
2008-06-12  Marcus Brinkmann  <marcus@g10code.de>

	* gpgsm.h (struct keyserver_spec): New struct.
	(opt): Add member keyserver.
	* gpgsm.c (keyserver_list_free, parse_keyserver_line): New functions.
	(main): Implement --keyserver option.
	* call-dirmngr.c (prepare_dirmngr): Send LDAPSERVER commands.

tools/
2008-06-12  Marcus Brinkmann  <marcus@g10code.de>

	* gpgconf-comp.c (gc_options_gpgsm): Add option keyserver.
2008-06-12 14:24:46 +00:00
Werner Koch ee3a1ec0d8 Fix --output option used when with --export-secret-kety-p12. 2008-05-20 08:00:40 +00:00
Werner Koch d9405f0c49 Updated German translation.
Fix in gpgconf for W32.
2008-05-09 09:54:35 +00:00
Werner Koch 4254e90426 Fixed bug#907.
Fixed a segv in keybox and made it more robust.
2008-05-06 14:03:36 +00:00
Werner Koch a7ced5d0b5 Fixed a C-89 incompatibility.
Minor changes to make it build on Debian bo.
Thanks to Alain Guibert.
2008-04-23 17:23:04 +00:00
Werner Koch 4896f5f47c Adjust for the changed Camellia draft.
W32 gettext changes.
Comment and typo fixes.
2008-04-18 09:20:25 +00:00
Werner Koch 80f77d79c5 Fix a problem with dirmngr looked up certificates.
Typo fixes.
2008-04-01 15:08:57 +00:00
Werner Koch 03d6961073 Fix problem when using the fallback dirmngr. 2008-03-31 10:31:20 +00:00
Werner Koch c2a8254be7 Fix a bug in the ambigious name detection.
Minor cleanups.
2008-03-20 15:31:43 +00:00
Werner Koch 6a78bca874 Fixed an email/DN bug.
Changed pinentry prompts.
2008-03-13 08:46:08 +00:00
Werner Koch f13c5a48fc Improve certificate chain construction.
Extend PKITS framework
2008-02-19 10:33:35 +00:00
Werner Koch 30a97e770c Poems for AllowSetForegroundWindow (W32) 2008-02-14 19:50:10 +00:00
Werner Koch 0819c1e8ca Always search missing certifcates using a running Dirmngr's cache. 2008-02-13 16:47:14 +00:00
Marcus Brinkmann 8ac61bc708 2008-01-29 Marcus Brinkmann <marcus@g10code.de>
* keylist.c (list_internal_keys): New variable lastcert.  Use it
	to suppress duplicates which immediately follow each other.
2008-01-30 17:21:28 +00:00
Werner Koch 843d6c69ef Fixed a W32 crash in gpg2 when creating a new keyring.
Typo fixes.
2008-01-29 16:04:57 +00:00
Werner Koch d84d5ea748 [W32] Avoid extra console window when importing or exporting.
Fixes bug 875.
2008-01-27 14:43:52 +00:00
Werner Koch c3b9005ec3 Typo fixes.
Portability fix for asschk.c
2008-01-26 22:12:23 +00:00
Werner Koch 9d66580cff Allow verification of some broken S-TRUST generated signatures. 2007-12-13 15:45:40 +00:00
Werner Koch bae4b256c7 Support DSA2.
Support Camellia for testing.
More audit stuff.
2007-12-12 10:28:30 +00:00
Werner Koch 89671cdd64 More code for the audit log. 2007-12-06 15:55:03 +00:00
Werner Koch 033a2c0bc9 Try to make sure that the standard descriptors are connected when calling
gpgsm.
2007-12-03 13:05:15 +00:00
Werner Koch 3d4ef0c814 Add option --data to GETAUDITLOG command.
Return HTML formatted dummy output.
2007-11-26 11:00:39 +00:00
Werner Koch 95b57d9337 New command GETAUDITLOG 2007-11-22 16:24:21 +00:00
Werner Koch c1270f06fe Document --auto-issuer-key-retrieve. 2007-11-19 16:32:05 +00:00
Werner Koch 55ba204bfa Started to implement the audit log feature.
Pass PINENTRY_USER_DATA and XAUTHORITY to Pinentry.
Improved support for the quality bar.
Minor internal restructuring.
Translation fixes.
2007-11-19 16:03:50 +00:00
Werner Koch c12ce55b25 Factored utf8 switching code out to i18n.c. 2007-10-19 15:58:38 +00:00
Werner Koch 19009f9959 Print used library version with --version.
Typo fixes
2007-09-14 13:38:36 +00:00
Werner Koch 8464627bf4 Extended the --check-program output: Error messages are now inlcued in an
easy parsable format.
2007-08-29 16:59:20 +00:00
Werner Koch b13587ef16 New command --check-programs for gpgconf. 2007-08-29 09:51:37 +00:00
Werner Koch 15d0cb42a1 Implemented more gpg-agen options to support certain passphrase policies.
New tool gpg-check-pattern.
2007-08-27 18:10:27 +00:00
Werner Koch 698ba5ae3c Add new features to kbxutil.
Fixed bug 829 (can't encrypt if duplicated certs are in the keybox)
2007-08-23 17:41:22 +00:00
Werner Koch 84efbe69c7 Fixed creation of private keys under W32.
Minor code cleanups.
2007-08-22 20:36:33 +00:00
Werner Koch f81f521a72 Updated estream.
More changes for Windows.
2007-08-22 10:55:07 +00:00
Werner Koch ed801e3771 About to do a release 2007-08-16 10:42:06 +00:00
Werner Koch d20d11a0ee Documentaion updates.
Support doe Dirmngr under W32.
Fixed a yat2m bug.
2007-08-14 16:50:27 +00:00
Werner Koch 74d344a521 Implemented the chain model for X.509 validation. 2007-08-10 16:52:05 +00:00
Werner Koch ebd36b6344 Factored common gpgconf constants out
Fixed W32 compare_filenames
2007-08-02 18:12:43 +00:00
Werner Koch 11573b09c4 Typo fixes.
Made --default-key work for gpgsm
Add --default-key and --encrypt-to to gpgconf.
2007-07-17 18:11:24 +00:00
Werner Koch bce4ea798a Properly close files opened by es_fopen.
Allow setting of an empty passphrase.
Assorted W32 changes.
2007-07-16 09:53:47 +00:00
Werner Koch 5f97dd2c44 Translate all file descriptors received from assuan. 2007-07-12 15:28:30 +00:00
Werner Koch 2f6b5cee0a Last minute Makefile library reordering for the sake of non-GNU systems. 2007-07-05 20:11:11 +00:00
Werner Koch 93d3811abc Changed to GPLv3.
Removed intl/.
2007-07-04 19:49:40 +00:00
Werner Koch a7fe86bc02 More W32 related changes 2007-06-26 13:48:44 +00:00
Werner Koch 831cd76256 Fixed a problem in estream-printf.c.
Changes for Windows (gpgsm -k does now work).
Minor cleanups.
2007-06-25 11:54:43 +00:00
Werner Koch 0b66f30d66 Implemented the --gen-key command as we can't use the gpgsm-gencert.sh under Windows. 2007-06-21 18:44:48 +00:00
Werner Koch 09cc0ee7be [w32] gpg-agent is now started automagically by gpgsm. 2007-06-20 11:16:42 +00:00
Werner Koch 540f9164c0 Made percent_escape more general.
Added regression tests support to jnlib.
W32 changes.
2007-06-19 09:11:11 +00:00
Marcus Brinkmann e47321829d jnlib/
2007-06-18  Marcus Brinkmann  <marcus@g10code.de>

	* stringhelp.h (percent_escape): New prototype.
	* stringhelp.c (percent_escape): New function.

agent/
2007-06-18  Marcus Brinkmann  <marcus@g10code.de>

	* gpg-agent.c (main): Percent escape pathname in --gpgconf-list
	output.

g10/
2007-06-18  Marcus Brinkmann  <marcus@g10code.de>

	* gpg.c (gpgconf_list): Percent escape output of --gpgconf-list.

scdaemon/
2007-06-18  Marcus Brinkmann  <marcus@g10code.de>

	* scdaemon.c (main): Percent escape output of --gpgconf-list.

sm/
2007-06-18  Marcus Brinkmann  <marcus@g10code.de>

	* gpgsm.c (main): Percent escape output of --gpgconf-list.
2007-06-18 20:15:01 +00:00
Werner Koch 0cfbfd6186 A whole bunch of changes to allow building for Windows.
See the ChangeLogs for details.
2007-06-14 17:05:07 +00:00
Werner Koch 2c9791db55 First steps towards supporting W32.
This is mainly source code reorganization.
Update gnulib.
g10/ does currently not build.
2007-06-06 18:12:30 +00:00
Werner Koch c2b08ff908 Print passphrase encoding info only in PEM mode. 2007-05-29 20:11:17 +00:00
Marcus Brinkmann b9042f1cec agent/
2007-05-19  Marcus Brinkmann  <marcus@g10code.de>

	* protect-tool.c (get_passphrase): Free ORIG_CODESET on error.

g10/
2007-05-19  Marcus Brinkmann  <marcus@g10code.de>

	* passphrase.c (passphrase_get): Free ORIG_CODESET on error.

sm/
2007-05-18  Marcus Brinkmann  <marcus@g10code.de>

	* qualified.c (gpgsm_qualified_consent,
	gpgsm_not_qualified_warning): Free ORIG_CODESET on error.
	* certdump.c (gpgsm_format_keydesc): Likewise.

tools/
2007-05-19  Marcus Brinkmann  <marcus@g10code.de>

	* symcryptrun.c (confucius_get_pass): Free ORIG_CODESET on error.
2007-05-18 22:58:59 +00:00
Werner Koch d5052fd228 Upgraded gettext.
Fixed accidental dependency on libgcrypt 1.3.0.
2007-05-07 19:49:12 +00:00
Werner Koch b89d98e335 Improved logging for error orginating from libgcrypt. 2007-04-20 16:59:37 +00:00
Werner Koch e3a8e6b727 * certcheck.c (do_encode_md): Add arg PKEY. Add support for DSA2
and all ECDSA sizes.
        (get_dsa_qbits): New.
        (pk_algo_from_sexp): A key will never contain ecdsa as algorithm,
        so remove that.
2007-04-20 10:54:46 +00:00
Werner Koch 4c48abebfe sm/
* certcheck.c (do_encode_md): Support 160 bit ECDSA.
2007-04-18 13:03:35 +00:00
Werner Koch 6ae6e18d5f g10/ and sm/
* call-agent.c (start_agent): Don't use log_error when using the
	fallback hack to start the agent.  This is bug 782.
scripts/
	* mail-to-translators: Copied from 1.4. and adjusted.
tools/
	* gpgconf-comp.c: Allow changing of --allow-mark-trusted.

	* gpg-connect-agent.c (main): New option --decode and commands
	decode and undecode.
	(read_and_print_response): Implement option.
2007-04-13 11:45:05 +00:00
Werner Koch 3bbc481935 Add a way to get a listing of available CCID readers. 2007-04-03 16:57:37 +00:00
Werner Koch 12cc96a176 kbx/
* keybox.h (KEYBOX_FLAG_BLOB_SECRET, KEYBOX_FLAG_BLOB_EPHEMERAL):
	New.
	* keybox-update.c (keybox_compress): Use it here instead of a
	magic constant.
sm/
	* fingerprint.c (gpgsm_get_fingerprint): Add caching.
	(gpgsm_get_fingerprint_string): Use bin2hexcolon().
	(gpgsm_get_fingerprint_hexstring): Use bin2hex and allocate only
	as much memory as required.
	(gpgsm_get_keygrip_hexstring): Use bin2hex.

	* certchain.c (gpgsm_validate_chain): Keep track of the
	certificate chain and reset the ephemeral flags.
	* keydb.c (keydb_set_cert_flags): New args EPHEMERAL and MASK.
	Changed caller to use a mask of ~0.  Return a proper error code if
	the certificate is not available.
2007-03-20 16:57:40 +00:00
Werner Koch 75f761e6ef Make gpgconf aware of --p12-charset. 2007-03-20 10:17:05 +00:00
Werner Koch fd628ffda1 Allow setting of the passphrase encoding of pkcs#12 files.
New option --p12-charset.
2007-03-20 10:00:55 +00:00
Werner Koch 9e95c2dff6 Allow export to work on systems without funopen/fopencookie. 2007-03-19 15:44:59 +00:00
Werner Koch 12b661166c Changes to let the key listing use estream to help systems without
funopen.
2007-03-19 14:35:04 +00:00
Werner Koch e0bbbb8a7f Preparing the 2.0.3 release 2007-03-08 14:16:15 +00:00
Werner Koch f6243073a8 Add new SVN only file README.maint
doc/
	* gpg.texi (GPG Configuration): Document envvar LANGUAGE.
	(GPG Configuration Options): Document show-primary-uid-only.
g10/
	* gpg.c (main): Add verify option show-primary-uid-only.
	* options.h (VERIFY_SHOW_PRIMARY_UID_ONLY): New.
	* mainproc.c (check_sig_and_print): Implement it.

	* encr-data.c (decrypt_data): Correctly test for unknown algorithm.
	* import.c (check_prefs): Ditto.
	* keyedit.c (show_prefs): Ditto.
	* mainproc.c (proc_symkey_enc): Ditto.
2007-02-26 20:24:29 +00:00
Werner Koch b861561e47 Included LIBICONV in all Makefiles.
g10/
	* passphrase.c (passphrase_get): Set the cancel flag on all error
	from the agent.  Fixes a bug reported by Tom Duerbusch.
sm/
	* gpgsm.c (main): Let --gen-key print a more informative error
	message.
2007-01-31 14:24:41 +00:00
Werner Koch 7eec2efa66 Added LIBINTL to more Makefile targets.
doc/
	* com-certs.pem: Added the current root certifcates of D-Trust and
	S-Trust.

g10/
	* status.c (write_status_begin_signing): New.
	* sign.c (sign_file, sign_symencrypt_file): Call it.
	* textfilter.c (copy_clearsig_text): Call it.

	* call-agent.c (agent_scd_pksign): Pass --hash-rmd160 to SCD if
	required.

	* gpg.c (main): Let --no-use-agent and --gpg-agent-info print a
	warning.  
	* misc.c (obsolete_option): New.
2007-01-30 20:16:28 +00:00
Werner Koch 05277262bc Add subjectAltName to the list of known critical extensions 2007-01-05 11:49:19 +00:00
Werner Koch fa17b95b39 Comment mtrace feature 2006-12-21 08:05:29 +00:00
Marcus Brinkmann 2b66a99109 2006-12-21 Marcus Brinkmann <marcus@g10code.de>
* certchain.c (gpgsm_basic_cert_check): Release SUBJECT.
2006-12-21 01:30:18 +00:00
Marcus Brinkmann a16deed61f 2006-12-21 Marcus Brinkmann <marcus@g10code.de>
* encrypt.c (encrypt_dek): Release S_CIPH.
2006-12-21 00:40:44 +00:00
Marcus Brinkmann c2c3b64905 2006-12-20 Marcus Brinkmann <marcus@g10code.de>
* server.c (gpgsm_server): Release CTRL->server_local.
2006-12-20 22:52:44 +00:00
Marcus Brinkmann be2c54dd94 2006-12-20 Marcus Brinkmann <marcus@g10code.de>
* base64.c: Add new members READER and WRITER in union U2.
	(gpgsm_create_reader): Initialise CTX->u2.reader.
	(gpgsm_destroy_reader): Invoke ksba_reader_release.  Return early
	if CTX is NULL.
	(gpgsm_create_writer): Initialise CTX->u2.writer.
	(gpgsm_destroy_writer): Invoke ksba_writer_release.  Return early
	if CTX is NULL.
2006-12-20 22:52:14 +00:00
Marcus Brinkmann f1f975577e 2006-12-18 Marcus Brinkmann <marcus@g10code.de>
* fingerprint.c (gpgsm_get_fingerprint): Close MD.
2006-12-18 01:03:07 +00:00
Werner Koch 252b668814 Preparing 2.0.1 2006-11-28 16:36:02 +00:00
Werner Koch e50c5f39cc No more warnings for AMD64 (at least when cross-compiling). Thus tehre is a
good chance that gpg2 will now work. 
Other cleanups.
Updated gettext.
2006-11-21 11:00:14 +00:00
Werner Koch 650293c4f6 sm/
* server.c (skip_options): Skip leading spaces.
(has_option): Honor "--".
(cmd_export): Add option --data to do an inline export.  Skip all
options.

* certdump.c (gpgsm_fpr_and_name_for_status): New.
* verify.c (gpgsm_verify): Use it to print correct status messages.

doc/
* gpgsm.texi (GPGSM EXPORT): Document changes.
2006-11-14 10:23:21 +00:00
Marcus Brinkmann eeacfec82f 2006-10-24 Marcus Brinkmann <marcus@g10code.de>
* Makefile.am (AM_CFLAGS): Add $(LIBASSUAN_CFLAGS).
2006-10-24 14:55:58 +00:00
Werner Koch 7b8ea82ab6 . 2006-10-23 14:02:13 +00:00
Werner Koch 58785c880d Allow to select X.509 certificates using the keygrip. 2006-10-20 11:38:48 +00:00
Werner Koch 0f49adb44e Preparing a release 2006-10-18 17:19:08 +00:00
Werner Koch be410be660 Pth tweaks and improved estream.c 2006-10-17 14:34:42 +00:00
Werner Koch 751f009c65 Fixed aegypten bug 372 2006-10-17 07:39:21 +00:00
Werner Koch d7160c2e34 Fixed aegypten bug 299 2006-10-16 17:33:03 +00:00
Werner Koch 43825e9dae Allow pkcs#10 creation directkly from a smart card 2006-10-11 17:52:15 +00:00
Werner Koch 2e8481c03b Various changes 2006-10-10 11:11:04 +00:00
Werner Koch 158a69aff7 bug fixes 2006-10-05 11:06:42 +00:00
Werner Koch 4b48bcacc9 Fix for bug 537 2006-10-02 11:54:35 +00:00
Marcus Brinkmann 807cb227d1 2006-10-02 Marcus Brinkmann <marcus@g10code.de>
* server.c (register_commands): New commands DUMPKEYS and
        DUMPSECRETKEYS.
        (cmd_dumpkeys, cmd_dumpsecretkeys): New functions.
        (option_handler): Support with-key-data option.
2006-10-02 10:58:08 +00:00
Werner Koch 1f380299e5 Finished implementation of the "relax" flag. 2006-09-26 10:00:12 +00:00
Werner Koch d94faf4a3d New "relax" option for trustlist.txt 2006-09-25 18:29:20 +00:00
Werner Koch 43ab905823 Various updates 2006-09-21 13:30:45 +00:00
Werner Koch c69dc436ce Cleanups. 2006-09-20 11:01:49 +00:00
Werner Koch e6f8654d03 Added common certificates. 2006-09-18 09:28:58 +00:00
Werner Koch 03d3322e5f Take advantage of newer gpg-error features. 2006-09-14 16:50:33 +00:00
Werner Koch 9577dd45ab Various fixes and new features.
Enhanced gpg-connect-agent.
2006-09-13 15:57:30 +00:00
Werner Koch eef036df23 The big Assuan error code removal. 2006-09-06 16:35:52 +00:00
Werner Koch 7b9fa9da99 Minor changes and typo fixes. 2006-09-06 11:53:24 +00:00
Werner Koch d8602648b8 See ChangeLogs 2006-08-29 16:18:30 +00:00
Werner Koch b744f963d7 With --enable-gpg the keyservers are now build and a first test using gpg2
shows no prblems.   Needs more testing of course.
2006-08-16 10:47:53 +00:00
Werner Koch 4954c5f1c3 better reporting of bad DNs 2006-07-03 13:26:19 +00:00
Werner Koch 98c6970ad1 Various smaller changes 2006-06-27 14:32:34 +00:00
Werner Koch f98537733a Updated FSF's address. 2006-06-20 17:21:37 +00:00
Werner Koch fbe4ac37f6 g10/ does build again. 2006-05-23 16:19:43 +00:00
Marcus Brinkmann 11544e7184 2006-05-19 Marcus Brinkmann <marcus@g10code.de>
* keydb.c (keydb_insert_cert): Do not lock here, but only check if
	it is locked.
	(keydb_store_cert): Lock here.

	* keydb.h (keydb_delete): Accept new argument UNLOCK.
	* keydb.c (keydb_delete): Likewise.  Only unlock if this is set.
	* delete.c (delete_one): Add new argument to invocation of
	keydb_delete.
2006-05-22 14:35:04 +00:00
Werner Koch 6b19366e4e Add Kludge for RegTP sillyness. 2006-03-21 09:56:47 +00:00
Werner Koch d59f87e94b Better warning messages 2006-02-19 22:09:10 +00:00
Werner Koch 6ec4e8c6a1 Added documentation for qualified signatures 2006-02-14 13:34:23 +00:00
Werner Koch 000a38ccf2 Add translations 2005-11-23 12:38:38 +00:00
Werner Koch b8795bb823 Print a note that the software has not been approved for qualified signatures. 2005-11-23 09:05:45 +00:00
Werner Koch b9633196f4 Added qualified signature features. 2005-11-13 19:07:06 +00:00
Marcus Brinkmann 41e8fded0a agent/
2005-10-08  Marcus Brinkmann  <marcus@g10code.de>

	* Makefile.am (gpg_protect_tool_LDADD): Add ../gl/libgnu.a.
	(gpg_preset_passphrase_LDADD, t_common_ldadd): Likewise.
	(gpg_agent_LDADD): Add ../gl/libgnu.a after ../common/libcommon.a.

kbx/
2005-10-08  Marcus Brinkmann  <marcus@g10code.de>

	* Makefile.am (kbxutil_LDADD): Add ../gl/libgnu.a after
	../jnlib/libjnlib.a.

scd/
2005-10-08  Marcus Brinkmann  <marcus@g10code.de>

	* Makefile.am (scdaemon_LDADD): Add ../gl/libgnu.a after
	../common/libcommon.a.
sm/
2005-10-08  Marcus Brinkmann  <marcus@g10code.de>

	* Makefile.am (gpgsm_LDADD): Add ../gl/libgnu.a after
	../common/libcommon.a.

tools/
2005-10-08  Marcus Brinkmann  <marcus@g10code.de>

	* Makefile.am (gpgconf_LDADD): Add ../gl/libgnu.a after
	../common/libcommon.a.
	(symcryptrun_LDADD, gpg_connect_agent_LDADD, gpgkey2ssh_LDADD):
	Likewise.
2005-10-08 00:13:27 +00:00
Werner Koch 6f90f05cb2 Bug fixes and ssh support for the BELPIC. 2005-09-09 11:18:08 +00:00
Werner Koch a2d1673d66 * findkey.c (agent_public_key_from_file): Fixed array assignment.
This was the cause for random segvs.

* call-agent.c (gpgsm_agent_readkey): New.
2005-07-25 14:35:04 +00:00
Werner Koch 99f403b015 * gpgsm.c (main): New options --no-log-file and --debug-none.
* certreqgen.c (get_parameter, get_parameter_value): Add SEQ arg
to allow enumeration.  Changed all callers.
(create_request): Process DNS and URI parameters.

* gpgsm-gencert.sh: Reworked to allow for multiple email addresses
as well as DNsanmes and URi.  Present the parameter file before
creating the certificate.
2005-07-21 18:29:13 +00:00
Werner Koch 68191d0c93 * keylist.c (email_kludge): Reworked.
* certdump.c (gpgsm_print_serial, gpgsm_dump_serial): Cast printf
arg to unsigned.
* call-dirmngr.c (gpgsm_dirmngr_run_command): Ditto
2005-07-20 15:05:05 +00:00
Werner Koch 8889f4a2ee (gpgsm_get_certid): Cast printf arg to unsigned.
Bug accidently introduced while solving the #$%^& gcc
signed/unsigned char* warnings.
2005-07-19 11:23:02 +00:00
Werner Koch deeba405a9 gcc-4 defaults forced me to edit many many files to get rid of the
char * vs. unsigned char * warnings.  The GNU coding standards used to
say that these mismatches are okay and better than a bunch of casts.
Obviously this has changed now.
2005-06-16 08:12:03 +00:00
Werner Koch cad9562436 * configure.ac (gl_INIT): Add gnulib stuff.
(fseeko, ftello, ttyname, isascii): Replaced the AC_REPLACE_FUNCS
by a simple check.
(putc_unlocked): Removed check.  Not used.
(strsep, mkdtemp, asprintf): Replaced checks by gnulib checks.
(xsize): Added will probably come handy soon.
(CFLAGS): Use -Wformat-security instead of
-Wformat-nonliteral. Add --Wno-format-y2k.
* gl/, gl/m4/: New.

* gpg-agent.c: Include setenv.h.

* Makefile.am (AM_CPPFLAGS): Added.

* util.h: Add some includes for gnulib.
(ttyname, isascii): Define them inline.
* fseeko.c, ftello.c: Removed.
* strsep.c, mkdtemp.c: Removed.
* ttyname.c, isascii.c: Removed.

* mkdtemp.c: Removed.
* exec.c: Include mkdtemp.h

* keybox-file.c (ftello) [!HAVE_FSEEKO]: New replacement
function.  Copied from ../common/ftello.c.
* keybox-update.c (fseeko) [!HAVE_FSEEKO]: New replacement
function.  Copied from ../common/iobuf.c.

* scdaemon.c: Include mkdtemp.h.

* misc.c: Include setenv.h.

* symcryptrun.c: Include mkdtemp.h.
2005-06-01 15:46:01 +00:00
Werner Koch 3ff9a743bf * configure.ac: Do not build gpg by default.
* gpgsm.c: New options --{enable,disable}-trusted-cert-crl-check.
* certchain.c (gpgsm_validate_chain): Make use of it.

* certchain.c (gpgsm_validate_chain): Check revocations even for
expired certificates.  This is required because on signature
verification an expired key is fine whereas a revoked one is not.

* gpgconf-comp.c: Add gpgsm option disable-trusted-cert-crl-check.
2005-04-21 09:33:07 +00:00
Werner Koch 314c234e7d (gpgsm_validate_chain): Check revocations even for
expired certificates.  This is required because on signature
verification an expired key is fine whereas a revoked one is not.
2005-04-21 07:16:41 +00:00
Werner Koch eff62d82bf * configure.ac: Require libksba 0.9.11.
sm/
* call-dirmngr.c (inq_certificate): Add new inquire SENDCERT_SKI.
* certlist.c (gpgsm_find_cert): Add new arg KEYID and implement
this filter.  Changed all callers.

* certchain.c (find_up_search_by_keyid): New helper.
(find_up): Also try using the AKI.keyIdentifier.
(find_up_external): Ditto.
2005-04-18 10:44:46 +00:00
Werner Koch 5a6edf162b * call-dirmngr.c (start_dirmngr): Use PATHSEP_C instead of ':'.
* call-agent.c (start_agent): Ditto.
2005-04-11 16:21:05 +00:00
Werner Koch fde76a2cf8 * certcheck.c: Fixed use of DBG_CRYPTO and DBG_X509.
* certchain.c (gpgsm_basic_cert_check): Dump certificates after a
failed gcry_pk_verify.
(find_up): Do an external lookup also for an authorityKeyIdentifier
lookup. Factored external lookup code out to ..
(find_up_external): .. new.
2005-03-17 19:10:37 +00:00
Werner Koch df05dde9d5 * acinclude.m4 (GNUPG_PTH_VERSION_CHECK): Accidently used
--ldflags instead of --cflags. Reported by Kazu Yamamoto.

* Makefile.am (AM_CFLAGS): Added PTH_CFLAGS.  Noted by Kazu Yamamoto.

* Makefile.am (gpgsm_LDADD): Added PTH_LIBS.  Noted by Kazu Yamamoto.
2005-03-03 10:15:07 +00:00
Werner Koch 444c93043d * acinclude.m4 (GNUPG_PTH_VERSION_CHECK): Link a simple test
program to see whether the installation is sane.

* certreqgen.c (proc_parameters): Cast printf arg.
2005-01-13 18:00:46 +00:00
Werner Koch de6f6d2015 (set_binary): New.
(main, open_read, open_fwrite): Use it.
2004-12-22 17:55:28 +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 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 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 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
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
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
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 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 8f620c8c2c * configure.ac (have_w32_system): New. Disable Pth checks for W32.
Link jnlib/w32-pth.h to pth.h.

* Makefile.am (pkglib_PROGRAMS): Build only for W32.

* keydb.c: Don't define DIRSEP_S here.
2004-12-06 13:49:14 +00:00