gnupg.git
14 years ago* app-p15.c (micardo_mse): New.
Werner Koch [Wed, 27 Apr 2005 19:47:53 +0000 (19:47 +0000)]
* app-p15.c (micardo_mse): New.
(do_sign): Call it.
* iso7816.c (iso7816_manage_security_env): Allow passing DATA as
NULL to indicate an empty Lc.
* tlv.c (find_tlv): Check that a found object fits into the
buffer.
(find_tlv_unchecked): New as replacement for the old non-checking
variant.
* app.c (select_application): Keep on using the non-checking
variant.
* app-openpgp.c (get_one_do, dump_all_do): Ditto.

14 years ago(symcryptrun): Added.
Werner Koch [Wed, 27 Apr 2005 13:39:16 +0000 (13:39 +0000)]
(symcryptrun): Added.

14 years ago* configure.ac: Removed OpenSC detection and options.
Werner Koch [Wed, 27 Apr 2005 12:09:21 +0000 (12:09 +0000)]
* configure.ac: Removed OpenSC detection and options.
* acinclude.m4: Ditto.

* scdaemon.texi: Removed OpenSC specific options.

* app-p15.c: New.  Basic support for pkcs15 cards without OpenSC.
There are quite a couple of things missing but at least I can use
my old TCOS cards from the Aegypten-1 development for signing.
* app.c (select_application): Detect pkcs15 applications.
* Makefile.am (scdaemon_SOURCES): Removed card.c, card-common.h
and card-p15.c because they are now obsolete. Added app-p15.c.
Removed all OpenSC stuff.
* command.c (do_reset, open_card, cmd_serialno, cmd_learn)
(cmd_readcert, cmd_readkey, cmd_pksign, cmd_pkdecrypt): Removed
all special cases for the old card.c based mechanisms.
* scdaemon.c, apdu.c: Removed all special cases for OpenSC.

14 years agopost release version number update
Werner Koch [Thu, 21 Apr 2005 14:59:18 +0000 (14:59 +0000)]
post release version number update

14 years agoPreparing a release V1-9-16
Werner Koch [Thu, 21 Apr 2005 14:39:00 +0000 (14:39 +0000)]
Preparing a release

14 years ago(main): Optionally allow the input file as command
Werner Koch [Thu, 21 Apr 2005 10:07:41 +0000 (10:07 +0000)]
(main): Optionally allow the input file as command
line argument.

14 years ago* configure.ac: Do not build gpg by default.
Werner Koch [Thu, 21 Apr 2005 09:33:07 +0000 (09:33 +0000)]
* 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.

14 years ago(gpgsm_validate_chain): Check revocations even for
Werner Koch [Thu, 21 Apr 2005 07:16:41 +0000 (07:16 +0000)]
(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.

14 years ago.
Werner Koch [Wed, 20 Apr 2005 19:19:24 +0000 (19:19 +0000)]
.

14 years ago(Agent Configuration): New section.
Werner Koch [Wed, 20 Apr 2005 18:46:51 +0000 (18:46 +0000)]
(Agent Configuration): New section.

14 years ago2005-04-20 Moritz Schulte <moritz@g10code.com>
Moritz Schulte [Wed, 20 Apr 2005 14:47:19 +0000 (14:47 +0000)]
2005-04-20  Moritz Schulte  <moritz@g10code.com>

* command-ssh.c (ssh_handler_request_identities): Removed
debugging code (sleep call), which was commited unintenionally.

14 years ago2005-04-19 Marcus Brinkmann <marcus@g10code.de>
Marcus Brinkmann [Tue, 19 Apr 2005 12:00:29 +0000 (12:00 +0000)]
2005-04-19  Marcus Brinkmann  <marcus@g10code.de>

* symcryptrun.c: Add --input option.

14 years ago* configure.ac: Require libksba 0.9.11.
Werner Koch [Mon, 18 Apr 2005 10:44:46 +0000 (10:44 +0000)]
* 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.

14 years ago2005-04-15 Marcus Brinkmann <marcus@g10code.de>
Marcus Brinkmann [Fri, 15 Apr 2005 09:04:43 +0000 (09:04 +0000)]
2005-04-15  Marcus Brinkmann  <marcus@g10code.de>

* symcryptrun.c (TEMP_FAILURE_RETRY): Define if not defined.

14 years ago2005-04-15 Marcus Brinkmann <marcus@g10code.de>
Marcus Brinkmann [Fri, 15 Apr 2005 02:24:44 +0000 (02:24 +0000)]
2005-04-15  Marcus Brinkmann  <marcus@g10code.de>

* configure.ac: Check for /usr/bin/shred and define SHRED.

tools/
2005-04-15  Marcus Brinkmann  <marcus@g10code.de>

* symcryptrun.c (remove_file): New function.
(confucius_copy_file): Accept new argument PLAIN and shred the
file if it is set on error.

14 years ago2005-04-15 Marcus Brinkmann <marcus@g10code.de>
Marcus Brinkmann [Fri, 15 Apr 2005 01:33:46 +0000 (01:33 +0000)]
2005-04-15  Marcus Brinkmann  <marcus@g10code.de>

* configure.ac: Add --enable-symcryptrun, disabled by default.
Define automake variable BUILD_SYMCRYPTRUN.
Check for openpty -lutil, define LIBUTIL_LIBS.

tools/
2005-04-15  Marcus Brinkmann  <marcus@g10code.de>

* Makefile.am: Define symcryptrun make variable depending on
BUILD_SYMCRYPTUN.
(bin_PROGRAMS): Add ${symcryptrun} instead symcryptrun.
(symcryptrun_LDADD): Use $(LIBUTIL_LIBS) instead of -lutil.

14 years ago(retrieve_key_material): Rewritten. Return a
Werner Koch [Thu, 14 Apr 2005 17:25:43 +0000 (17:25 +0000)]
(retrieve_key_material): Rewritten.  Return a
proper error code.
(retrieve_next_token): Removed.
(retrieve_fpr_from_card): Rewritten to make use of DO caching and
to take the KEYNO as arg.
(get_public_key): Renamed variable for clarity.

14 years agoAdded missing file
Werner Koch [Wed, 13 Apr 2005 09:39:38 +0000 (09:39 +0000)]
Added missing file

14 years ago(confucius_mktmpdir): Changed to use mkdtmp(3).
Werner Koch [Mon, 11 Apr 2005 17:22:23 +0000 (17:22 +0000)]
(confucius_mktmpdir): Changed to use mkdtmp(3).

14 years ago* gpg-connect-agent.c (start_agent): Use PATHSEP_C instead of ':'.
Werner Koch [Mon, 11 Apr 2005 16:21:49 +0000 (16:21 +0000)]
* gpg-connect-agent.c (start_agent): Use PATHSEP_C instead of ':'.

14 years ago* call-dirmngr.c (start_dirmngr): Use PATHSEP_C instead of ':'.
Werner Koch [Mon, 11 Apr 2005 16:21:05 +0000 (16:21 +0000)]
* call-dirmngr.c (start_dirmngr): Use PATHSEP_C instead of ':'.
* call-agent.c (start_agent): Ditto.

14 years ago* app-openpgp.c (do_check_pin): Add hack to allow verification of
Werner Koch [Mon, 11 Apr 2005 16:20:10 +0000 (16:20 +0000)]
* app-openpgp.c (do_check_pin): Add hack to allow verification of
CHV3.
(get_public_key): Don't use gcry functions to create S-expressions.
(do_deinit, do_readkey, do_genkey, send_keypair_info): Adjust for
above change.

14 years ago* sexputil.c: New.
Werner Koch [Mon, 11 Apr 2005 16:10:03 +0000 (16:10 +0000)]
* sexputil.c: New.

14 years agotypo fixes
Werner Koch [Mon, 11 Apr 2005 16:09:18 +0000 (16:09 +0000)]
typo fixes

14 years ago2005-04-11 Marcus Brinkmann <marcus@g10code.de>
Marcus Brinkmann [Sun, 10 Apr 2005 23:54:39 +0000 (23:54 +0000)]
2005-04-11  Marcus Brinkmann  <marcus@g10code.de>

* symcryptrun.c: Implement config file parsing.

14 years ago2005-04-11 Marcus Brinkmann <marcus@g10code.de>
Marcus Brinkmann [Sun, 10 Apr 2005 23:10:52 +0000 (23:10 +0000)]
2005-04-11  Marcus Brinkmann  <marcus@g10code.de>

* Makefile.am (bin_PROGRAMS): Add symcryptrun.
(symcryptrun_SOURCES, symcryptrun_LDADD): New variables.
* symcryptrun.c: New file.

14 years ago2005-04-11 Marcus Brinkmann <marcus@g10code.de>
Marcus Brinkmann [Sun, 10 Apr 2005 22:12:31 +0000 (22:12 +0000)]
2005-04-11  Marcus Brinkmann  <marcus@g10code.de>

* simple-pwquery.c (simple_pwquery): Use spwq_secure_free.

14 years ago2005-04-03 Moritz Schulte <moritz@g10code.com>
Moritz Schulte [Sat, 9 Apr 2005 16:41:28 +0000 (16:41 +0000)]
2005-04-03  Moritz Schulte  <moritz@g10code.com>

* command-ssh.c (ssh_request_spec): New member: secret_input.
(REQUEST_SPEC_DEFINE): New argument: secret_input.
(request_specs): Add secret_input flag.
(request_spec_lookup): New function ...
(ssh_request_process): ... use it here; depending on secret_input
flag allocate secure or non-secure memory.

14 years ago2005-03-29 Moritz Schulte <moritz@g10code.com>
Moritz Schulte [Tue, 29 Mar 2005 20:46:18 +0000 (20:46 +0000)]
2005-03-29  Moritz Schulte  <moritz@g10code.com>

* app-openpgp.c (retrieve_fpr_from_card): New function.
(retrieve_next_token): New function.
(retrieve_key_material): New function.
(get_public_key): Implement retrival of key through expernal
helper (gpg) in case the openpgp card is not cooperative enough.

14 years ago* certcheck.c: Fixed use of DBG_CRYPTO and DBG_X509.
Werner Koch [Thu, 17 Mar 2005 19:10:37 +0000 (19:10 +0000)]
* 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.

14 years agoFixed description for dirmngr:honor-http-proxy
Werner Koch [Wed, 9 Mar 2005 19:22:54 +0000 (19:22 +0000)]
Fixed description for dirmngr:honor-http-proxy

14 years agoAdd honor-http-proxy.
Werner Koch [Wed, 9 Mar 2005 10:11:14 +0000 (10:11 +0000)]
Add honor-http-proxy.

14 years ago* acinclude.m4 (GNUPG_PTH_VERSION_CHECK): Accidently used
Werner Koch [Thu, 3 Mar 2005 10:15:07 +0000 (10:15 +0000)]
* 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.

14 years ago2005-03-02 Moritz Schulte <moritz@g10code.com>
Moritz Schulte [Wed, 2 Mar 2005 20:36:50 +0000 (20:36 +0000)]
2005-03-02  Moritz Schulte  <moritz@g10code.com>

* command-ssh.c (sexp_key_extract): Removed FIXME, since
xtrymallos does set errno correctly by now.
(sexp_extract_identifier): Remove const attribute from identifier.
(ssh_handler_request_identities): Remove const attribute from
key_type; removes ugly casts and FIXME.
(sexp_key_extract): Remove const attribute from comment.
(ssh_send_key_public): Remove const attribute from
key_type/comment; removes ugly cast.
(data_sign): Remove const attribute from identifier; removes ugly
cast.
(key_secret_to_public): Remove const attribute from comment;
removes ugly cast.
(ssh_handler_sign_request): Remove const attribute from p.
(sexp_key_extract): Use make_cstring().
(ssh_key_extract_comment): Likewise.
(ssh_key_to_buffer): Use secure memory for memory area to hold the
key S-Expression.
Added more comments.

14 years ago* findkey.c (modify_description): Keep invalid % escapes, so that
Werner Koch [Fri, 25 Feb 2005 16:14:55 +0000 (16:14 +0000)]
* findkey.c (modify_description): Keep invalid % escapes, so that
%0A may pass through.

* agent.h (server_control_s): New field USE_AUTH_CALL.
* call-scd.c (agent_card_pksign): Make use of it.
* command-ssh.c (data_sign): Set the flag.
(ssh_send_key_public): New arg OVERRIDE_COMMENT.
(card_key_available): Add new arg CARDSN.
(ssh_handler_request_identities): Use the card s/n as comment.
(sexp_key_extract): Use GCRYMPI_FMT_STD.
(data_sign): Ditto.

* learncard.c (make_shadow_info): Moved to ..
* protect.c (make_shadow_info): .. here. Return NULL on malloc
failure. Made global.
* agent.h: Add prototype.

* xasprintf.c (xtryasprintf): New.

* app-openpgp.c (get_public_key): Make sure not to return negative
numbers.
(do_sign): Allow passing of indata with algorithm prefix.
(do_auth): Allow OPENPGP.3 as an alternative ID.

* app.c (app_getattr): Return just the S/N but not the timestamp.

* no-libgcrypt.c (gcry_strdup): New.

14 years ago* call-scd.c (unescape_status_string): New. Actual a copy of
Werner Koch [Thu, 24 Feb 2005 21:40:48 +0000 (21:40 +0000)]
* call-scd.c (unescape_status_string): New. Actual a copy of
../g10/call-agent.c
(card_getattr_cb, agent_card_getattr): New.

* command-ssh.c (card_key_available): New.
(ssh_handler_request_identities): First see whether a card key is
available.

* app.c (app_getattr): Return APPTYPE or SERIALNO type even if the
application does dot support the getattr call.

* 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.
(scd_update_reader_status_file): Set the error flag on all changes.

14 years ago* gpg-agent.c (handle_connections): Need to check for events if
Werner Koch [Thu, 24 Feb 2005 17:36:11 +0000 (17:36 +0000)]
* 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.

14 years ago* command-ssh.c (get_passphrase): Removed.
Werner Koch [Wed, 23 Feb 2005 21:06:32 +0000 (21:06 +0000)]
* command-ssh.c (get_passphrase): Removed.
(ssh_identity_register): Partly rewritten.
(open_control_file, search_control_file, add_control_entry): New.
(ssh_handler_request_identities): Return only files listed in our
control file.

* findkey.c (unprotect): Check for allocation error.

* agent.h (opt): Add fields to record the startup terminal
settings.
* gpg-agent.c (main): Record them and do not force keep display
with --enable-ssh-support.
* command-ssh.c (start_command_handler_ssh): Use them here.

* gpg-agent.c: Renamed option --ssh-support to
--enable-ssh-support.

* command.c (cmd_readkey): New.
(register_commands): Register new command "READKEY".

* command-ssh.c (ssh_request_process): Improved logging.

* findkey.c (agent_write_private_key): Always use plain open.
Don't depend on an umask for permissions.
(agent_key_from_file): Factored file reading code out to ..
(read_key_file): .. new function.
(agent_public_key_from_file): New.

14 years ago(stream_read_string): Removed call to abort on
Werner Koch [Tue, 22 Feb 2005 18:08:28 +0000 (18:08 +0000)]
(stream_read_string): Removed call to abort on
memory error because the CVS version of libgcrypt makes sure
that ERRNO gets always set on error even with a faulty user
supplied function.

14 years agoRenmoved stale file
Werner Koch [Tue, 22 Feb 2005 17:30:17 +0000 (17:30 +0000)]
Renmoved stale file

14 years ago* app-openpgp.c (app_local_s): New field PK.
Werner Koch [Tue, 22 Feb 2005 17:29:07 +0000 (17:29 +0000)]
* app-openpgp.c (app_local_s): New field PK.
(do_deinit, do_genkey, app_openpgp_storekey): Clear it.
(get_public_key, send_keypair_info): New.
(do_learn_status): Send KEYPAIR info

* app-common.h (app_ctx_t): Add function pointer READKEY.
* app.c (app_readkey): New.
* command.c (cmd_readkey): Use READKEY function if possible.

14 years ago2005-02-19 Moritz Schulte <moritz@g10code.com>
Moritz Schulte [Sat, 19 Feb 2005 17:17:30 +0000 (17:17 +0000)]
2005-02-19  Moritz Schulte  <moritz@g10code.com>

* command-ssh.c (ssh_receive_mpint_list): Slightly rewritten, do
not use elems_secret member of key_spec.
(ssh_key_type_spec): Removed member: elems_secret.
(ssh_key_types): Removed elems_secret data.
(ssh_sexp_construct): Renamed to ...
(sexp_key_construct): ... this; changed callers.
(ssh_sexp_extract): Renamed to ...
(sexp_key_extract): ... this; changed callers.
(ssh_sexp_extract_key_type): Renamed to ...
(sexp_extract_identifier): ... this; changed callers; use
make_cstring().
Added more comments.

14 years ago2005-02-18 Moritz Schulte <moritz@g10code.com>
Moritz Schulte [Fri, 18 Feb 2005 19:08:24 +0000 (19:08 +0000)]
2005-02-18  Moritz Schulte  <moritz@g10code.com>

* command-ssh.c (ssh_sexp_construct): Rewritten generation of sexp
template, clarified.
(ssh_sexp_extract): Support shadowed-private-key-sexp; treat
protected-private key and shadowed-private-key as public keys.
(key_secret_to_public): Rewritten: simply use ssh_sexp_extract()
and ssh_sexp_construct().

14 years ago(modify_description): Don't increment OUT_LEN during
Werner Koch [Tue, 15 Feb 2005 16:23:45 +0000 (16:23 +0000)]
(modify_description): Don't increment OUT_LEN during
the second pass.

14 years ago2005-02-14 Moritz Schulte <moritz@g10code.com>
Moritz Schulte [Mon, 14 Feb 2005 20:44:22 +0000 (20:44 +0000)]
2005-02-14  Moritz Schulte  <moritz@g10code.com>

* command-ssh.c (uint32_construct): New macro ...
(stream_read_uint32): ... use it; removed unnecessary cast.

14 years ago2005-02-14 Moritz Schulte <moritz@g10code.com>
Moritz Schulte [Mon, 14 Feb 2005 20:07:01 +0000 (20:07 +0000)]
2005-02-14  Moritz Schulte  <moritz@g10code.com>

* command-ssh.c (es_read_byte): Renamed to ...
(stream_es_read_byte): ... this; changed callers.
(es_write_byte): Renamed to ...
(stream_write_byte): ... this; changed callers.
(es_read_uint32): Renamed to ...
(stream_read_uint32): ... this; changed callers.
(es_write_uint32): Renamed to ...
(stream_write_uint32): ... this; changed callers.
(es_read_data): Renamed to ...
(stream_read_data): ... this; changed callers.
(es_write_data): Renamed to ...
(stream_write_data): ... this; changed callers.
(es_read_string): Renamed to ...
(stream_read_string): ... this; changed callers.
(es_read_cstring): Renamed to ...
(stream_read_cstring): ... this; changed callers.
(es_write_string): Renamed to ...
(stream_write_string): ... this; changed callers.
(es_write_cstring): Renamed to ...
(stream_write_cstring): ... this; changed callers.
(es_read_mpi): Renamed to ...
(stream_read_mpi): ... this; changed callers.
(es_write_mpi): Renamed to ...
(stream_write_mpi): ... this; changed callers.
(es_copy): Renamed to ...
(stream_copy): ... this; changed callers.
(es_read_file): Renamed to ...
(file_to_buffer): ... this; changed callers.
(ssh_identity_register): Removed variable description_length;
changed code to use asprintf for description.
(stream_write_uint32): Do not filter out the last byte of shift
expression.

14 years ago* AUTHORS: Copied from 1.4 and edited to refelct the changes in
Werner Koch [Thu, 3 Feb 2005 17:40:02 +0000 (17:40 +0000)]
* AUTHORS: Copied from 1.4 and edited to refelct the changes in
1.9.

* agent.h (agent_exit): Add JNLIB_GCC_A_NR to indicate that this
function won't return.

* gpg-agent.c (check_for_running_agent): Initialize pid to a
default value if not needed.

* command-ssh.c: Removed stdint.h.  s/byte_t/unsigned char/,
s/uint32/u32/ becuase that is what we have always used in GnuPG.
(ssh_request_specs): Moved to top of file.
(ssh_key_types): Ditto.
(make_cstring): Ditto.
(data_sign): Don't use a variable for the passphrase prompt, make
it translatable.
(ssh_request_process):

* findkey.c (modify_description): Renamed arguments for clarity,
polished documentation.  Make comment a C-string.  Fixed case of
DESCRIPTION being just "%".
(agent_key_from_file): Make sure comment string to a C-string.

* gpg-agent.c (create_socket_name): Cleanup the implemntation, use
DIMof, agent_exit, removed superflous args and return the
allocated string as value.  Documented.  Changed callers.
(create_server_socket): Cleanups similar to above.  Changed callers.
(cleanup_do): Renamed to ..
(remove_socket): .. this.  Changed caller.
(handle_connections): The signals are to be handled in the select
and not in the accept.  Test all FDs after returning from a
select.  Remove the event tests from the accept calls.  The select
already assured that the accept won't block.

14 years agoForgot to commit the recent fixed to scd and logging - doing it now
Werner Koch [Thu, 3 Feb 2005 13:20:57 +0000 (13:20 +0000)]
Forgot to commit the recent fixed to scd and logging - doing it now

14 years agoThis commit was manufactured by cvs2svn to create branch
Repo Admin [Thu, 3 Feb 2005 10:21:26 +0000 (10:21 +0000)]
This commit was manufactured by cvs2svn to create branch
'GNUPG-1-9-BRANCH'.

14 years ago2005-01-29 Moritz Schulte <moritz@g10code.com>
Moritz Schulte [Sat, 29 Jan 2005 22:43:00 +0000 (22:43 +0000)]
2005-01-29  Moritz Schulte  <moritz@g10code.com>

* command-ssh.c (ssh_handler_request_identities)
(ssh_handler_sign_request, ssh_handler_add_identity)
(ssh_handler_remove_identity, ssh_handler_remove_all_identities)
(ssh_handler_lock, ssh_handler_unlock): Changed to return an error
code instead of a boolean.
(ssh_request_process): Changed to return a boolean instead of an
error; adjust caller.
(ssh_request_handle_t): Adjusted type.
(ssh_request_spec): New member: identifier.
(REQUEST_SPEC_DEFINE): New macro; use it for initialization of
request_specs[].
(ssh_request_process): In debugging mode, log identifier of
handler to execute.
(start_command_handler_ssh): Moved most of the stream handling
code ...
(ssh_request_process): ... here.

14 years ago2005-01-28 Moritz Schulte <moritz@g10code.com>
Moritz Schulte [Fri, 28 Jan 2005 19:57:14 +0000 (19:57 +0000)]
2005-01-28  Moritz Schulte  <moritz@g10code.com>

* command-ssh.c (ssh_handler_add_identity): Pass ctrl to
ssh_identity_register().
(ssh_identity_register): New argument: ctrl; pass ctrl to
get_passphrase().
(get_passphrase): Pass ctrl instead of NULL to agent_askpin().
(start_command_handler_ssh): Use agent_init_default_ctrl();
deallocate structure members, which might be dynamically
allocated.
(lifetime_default): Removed variable.
(ssh_handler_add_identity): Fix ttl handling; renamed variable
`death' to `ttl'.
(ssh_identity_register): Fix key grip handling.

14 years ago2005-01-27 Moritz Schulte <moritz@g10code.com>
Moritz Schulte [Wed, 26 Jan 2005 23:15:42 +0000 (23:15 +0000)]
2005-01-27  Moritz Schulte  <moritz@g10code.com>

* gpg-agent.texi: Document ssh-agent emulation layer.

14 years ago2005-01-26 Moritz Schulte <moritz@g10code.com>
Moritz Schulte [Wed, 26 Jan 2005 22:33:11 +0000 (22:33 +0000)]
2005-01-26  Moritz Schulte  <moritz@g10code.com>

* command-ssh.c (ssh_handler_sign_request): Confirm to agent
protocol in case of failure.

14 years agoadded missing file
Moritz Schulte [Wed, 26 Jan 2005 22:25:36 +0000 (22:25 +0000)]
added missing file

14 years ago2005-01-26 Moritz Schulte <moritz@g10code.com>
Moritz Schulte [Wed, 26 Jan 2005 22:24:59 +0000 (22:24 +0000)]
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.

14 years ago2005-01-26 Moritz Schulte <moritz@g10code.com>
Moritz Schulte [Wed, 26 Jan 2005 22:20:21 +0000 (22:20 +0000)]
2005-01-26  Moritz Schulte  <moritz@g10code.com>

* command-ssh.c: New file.
* Makefile.am (gpg_agent_SOURCES): New source file: command-ssh.c.

* findkey.c (modify_description): New function.
(agent_key_from_file): Support comment field in key s-expressions.

* gpg-agent.c (enum cmd_and_opt_values): New item: oSSHSupport.
(opts) New entry for oSSHSupport.
New variable: socket_name_ssh.
(cleanup_do): New function based on cleanup().
(cleanup): Use cleanup_do() for socket_name and socket_name_ssh.
(main): New switch case for oSSHSupport.
(main): Move socket name creation code to ...
(create_socket_name): ... this new function.
(main): Use create_socket_name() for creating socket names for
socket_name and for socket_name_ssh in case ssh support is
enabled.
Move socket creation code to ...
(create_server_socket): ... this new function.
(main): Use create_server_socket() for creating sockets.
In case standard_socket is set, do not only store a socket name in
socket_name, but also in socket_name_ssh.
Generate additional environment info strings for ssh support.
Pass additional ssh socket argument to handle_connections.
(start_connection_thread_ssh): New function.
(handle_connections): Use select to multiplex between gpg-agent
and ssh-agent protocol.

* agent.h (struct opt): New member: ssh_support.
Declare function: start_command_handler_ssh.

14 years agopost release updates
Werner Koch [Thu, 13 Jan 2005 19:03:37 +0000 (19:03 +0000)]
post release updates

14 years ago* acinclude.m4 (GNUPG_PTH_VERSION_CHECK): Link a simple test V1-9-15
Werner Koch [Thu, 13 Jan 2005 18:00:46 +0000 (18:00 +0000)]
* 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.

14 years agoUpdated.
Werner Koch [Tue, 4 Jan 2005 15:57:10 +0000 (15:57 +0000)]
Updated.

14 years ago(agent_put_cache): Fix the test for using the default
Werner Koch [Tue, 4 Jan 2005 08:33:20 +0000 (08:33 +0000)]
(agent_put_cache): Fix the test for using the default
TTL.

14 years ago(send_pinentry_environment): Fixed changed from
Werner Koch [Mon, 3 Jan 2005 11:30:43 +0000 (11:30 +0000)]
(send_pinentry_environment): Fixed changed from
2004-12-18; cut+paste error for lc-messages.

14 years ago(find_endpoint): New.
Werner Koch [Tue, 28 Dec 2004 07:13:24 +0000 (07:13 +0000)]
(find_endpoint): New.
(scan_or_find_devices): Add new args to return endpoint info and
interface number.
(ccid_open_reader, ccid_shutdown_reader): Take care of these new
args.
(bulk_in, bulk_out): Use the correct endpoints.
(ccid_transceive_apdu_level): New.
(ccid_transceive): Divert to above.
(parse_ccid_descriptor): Allow APDU level exchange mode.

14 years agoPost release updates
Werner Koch [Wed, 22 Dec 2004 19:07:46 +0000 (19:07 +0000)]
Post release updates

14 years agoMinor tweaks V1-9-14
Werner Koch [Wed, 22 Dec 2004 18:22:49 +0000 (18:22 +0000)]
Minor tweaks

14 years agoPreapring a release
Werner Koch [Wed, 22 Dec 2004 18:05:14 +0000 (18:05 +0000)]
Preapring a release

14 years ago(set_binary): New.
Werner Koch [Wed, 22 Dec 2004 17:55:28 +0000 (17:55 +0000)]
(set_binary): New.
(main, open_read, open_fwrite): Use it.

14 years ago* gnupg.texi: Reordered.
Werner Koch [Wed, 22 Dec 2004 17:24:13 +0000 (17:24 +0000)]
* gnupg.texi: Reordered.
* contrib.texi: Updated.

14 years agoAdding the tool itself.
Werner Koch [Tue, 21 Dec 2004 20:47:40 +0000 (20:47 +0000)]
Adding the tool itself.

14 years ago(gpg-preset-passphrase): New section.
Werner Koch [Tue, 21 Dec 2004 20:47:04 +0000 (20:47 +0000)]
(gpg-preset-passphrase): New section.

14 years ago* preset-passphrase.c (preset_passphrase): Handle --passphrase.
Werner Koch [Tue, 21 Dec 2004 19:05:15 +0000 (19:05 +0000)]
* 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.

14 years ago* homedir.c: New. Use CSIDL_APPDATA for W32 as the default home
Werner Koch [Tue, 21 Dec 2004 12:44:42 +0000 (12:44 +0000)]
* homedir.c: New. Use CSIDL_APPDATA for W32 as the default home
directory.

14 years ago* gpg-agent.c (main): Use default_homedir().
Werner Koch [Tue, 21 Dec 2004 10:03:00 +0000 (10:03 +0000)]
* 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().

14 years ago* configure.ac: Add PATHSEP_C and PATHSEP_S. For W32 let all
Werner Koch [Mon, 20 Dec 2004 16:17:25 +0000 (16:17 +0000)]
* 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.

14 years ago(do_pth_event_free): The events are hold in a ring
Werner Koch [Mon, 20 Dec 2004 11:36:46 +0000 (11:36 +0000)]
(do_pth_event_free): The events are hold in a ring
buffer.  Adjust for that.
(do_pth_event_body): Ditto.
(pth_event_isolate): Ditto.
(do_pth_wait): Ditto.
(_pth_event_count): Renamed to ..
(event_count): .. and adjusted as above.
(pth_init): Define 3 debug levels and change all debug calls to
make use of them.  This makes the moule now silent.

14 years ago* call-scd.c (init_membuf, put_membuf, get_membuf): Removed. We
Werner Koch [Mon, 20 Dec 2004 08:32:56 +0000 (08:32 +0000)]
* 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.

14 years ago * query.c (initialize_module_query): New.
Werner Koch [Sun, 19 Dec 2004 17:45:50 +0000 (17:45 +0000)]
* query.c (initialize_module_query): New.
* call-scd.c (initialize_module_call_scd): New.
* gpg-agent.c (main): Call them.

14 years ago* query.c (initialize_module_query):
Werner Koch [Sun, 19 Dec 2004 17:44:20 +0000 (17:44 +0000)]
* 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.

14 years ago* maperror.c (map_assuan_err_with_source): Oops, args were swapped.
Werner Koch [Sun, 19 Dec 2004 13:38:24 +0000 (13:38 +0000)]
* maperror.c (map_assuan_err_with_source): Oops, args were swapped.

* w32-pth.c (pth_init): Enable debugging depending on env var.

14 years ago* configure.ac (AH_BOTTOM): Define EXEEXT_S.
Werner Koch [Sat, 18 Dec 2004 18:53:32 +0000 (18:53 +0000)]
* 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..

14 years agoAvoid the " map_to_assuan_status called with no error source" diagnostic.
Werner Koch [Sat, 18 Dec 2004 10:22:10 +0000 (10:22 +0000)]
Avoid the " map_to_assuan_status called with no error source" diagnostic.

14 years ago2004-12-17 Moritz Schulte <moritz@g10code.com>
Moritz Schulte [Fri, 17 Dec 2004 20:41:50 +0000 (20:41 +0000)]
2004-12-17  Moritz Schulte  <moritz@g10code.com>

* query.c: Undo change from 2004-12-05.

14 years ago* call-dirmngr.c (isvalid_status_cb, lookup_status_cb)
Werner Koch [Fri, 17 Dec 2004 14:36:16 +0000 (14:36 +0000)]
* 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().

14 years ago(lookup_status_cb): Send progress messages
Werner Koch [Wed, 15 Dec 2004 14:38:37 +0000 (14:38 +0000)]
(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.

14 years agoA whole bunch of changes to allow building for W32.
Werner Koch [Wed, 15 Dec 2004 14:15:54 +0000 (14:15 +0000)]
A whole bunch of changes to allow building for W32.

14 years agoYep. No lost threads anymore.
Werner Koch [Tue, 14 Dec 2004 19:20:36 +0000 (19:20 +0000)]
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.

14 years ago2004-12-14 Timo Schulz <twoaday@g10code.com>
Timo Schulz [Tue, 14 Dec 2004 17:47:12 +0000 (17:47 +0000)]
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.

14 years agoMore fixes. First successful use; leaks threads, though.
Werner Koch [Tue, 14 Dec 2004 14:49:21 +0000 (14:49 +0000)]
More fixes.  First successful use; leaks threads, though.

14 years ago* w32-pth.h (pth_event_occured): Removed macro.
Werner Koch [Tue, 14 Dec 2004 11:25:04 +0000 (11:25 +0000)]
* 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.

14 years ago2004-12-13 Timo Schulz <twoaday@g10code.com>
Timo Schulz [Mon, 13 Dec 2004 18:00:35 +0000 (18:00 +0000)]
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.

14 years agoVArious hacks to make it at least build under W32.
Werner Koch [Mon, 13 Dec 2004 15:49:56 +0000 (15:49 +0000)]
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.

14 years agoAdded real code written by Timo Schulz.
Werner Koch [Mon, 13 Dec 2004 09:05:31 +0000 (09:05 +0000)]
Added real code written by Timo Schulz.
Not finished, though.

14 years ago(keybox_release): Close the file pointer.
Werner Koch [Tue, 7 Dec 2004 18:07:30 +0000 (18:07 +0000)]
(keybox_release): Close the file pointer.

14 years ago* asshelp.c (send_pinentry_environment) [W32]: Do not use ttyname.
Werner Koch [Tue, 7 Dec 2004 11:21:40 +0000 (11:21 +0000)]
* 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.

14 years ago* exechelp.h, exechelp.c: New. Based on code from ../sm/import.c.
Werner Koch [Mon, 6 Dec 2004 18:28:56 +0000 (18:28 +0000)]
* 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.

14 years ago* configure.ac (have_w32_system): New. Disable Pth checks for W32.
Werner Koch [Mon, 6 Dec 2004 13:49:14 +0000 (13:49 +0000)]
* 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.

14 years ago2004-12-05 Moritz Schulte <moritz@g10code.com>
Moritz Schulte [Sun, 5 Dec 2004 15:36:49 +0000 (15:36 +0000)]
2004-12-05  Moritz Schulte  <moritz@g10code.com>

* query.c (start_pinentry): Allow CTRL be NULL.

14 years agopost release version number updates
Werner Koch [Fri, 3 Dec 2004 19:43:11 +0000 (19:43 +0000)]
post release version number updates

14 years agoFixed copyright comments. V1-9-13
Werner Koch [Fri, 3 Dec 2004 18:38:23 +0000 (18:38 +0000)]
Fixed copyright comments.

14 years agoPreparing 1.9.13
Werner Koch [Fri, 3 Dec 2004 17:44:57 +0000 (17:44 +0000)]
Preparing 1.9.13

14 years agoFirst take on a W32 port
Werner Koch [Thu, 2 Dec 2004 07:48:09 +0000 (07:48 +0000)]
First take on a W32 port