1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-07-03 02:58:57 +02:00
Commit Graph

1117 Commits

Author SHA1 Message Date
Werner Koch
2b5dca457c Well and some stuff to access the SC will be helpful. Note, that the
code requires the latest OpenSC CVS code.
2002-03-05 17:17:08 +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
c8454f792d * gpgsm.c, gpgsm.h: Add local_user.
* sign.c (gpgsm_get_default_cert): New.
(get_default_signer): Use the new function if local_user is not
set otherwise used that value.
* encrypt.c (get_default_recipient): Removed.
(gpgsm_encrypt): Use gpgsm_get_default_cert.
* verify.c (gpgsm_verify): Better error text for a bad signature
found by comparing the hashs.
2002-03-05 15:56:46 +00:00
Werner Koch
dfda938ee9 Minor fixes; about to release 0.3.1 2002-03-04 10:35:34 +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
f8efc7c4ef Added more code fragments. 2002-03-04 10:34:09 +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
04f49d973b * server.c (option_handler): Allow to use -2 for "send all certs
except the root cert".
* sign.c (add_certificate_list): Implement it here.
* certpath.c (gpgsm_is_root_cert): New.
2002-02-25 18:18:40 +00:00
Werner Koch
2a2d713359 * keybox-search.c (blob_cmp_mail): Use case-insensitive compare
because mail addresses are in general case insensitive (well
RFC2822 allows for case sensitive mailbox parts, but this is in
general considired a Bad Thing). Add additional substr parameter
to allow for substring matches within the mail address.  Change
all callers to pass this along.
(blob_cmp_name): Likewise but do the case-insensitive search only
in sub string mode.
(keybox_search): Implement MAILSUB and SUBSTR mode.

* stringhelp.c (ascii_memcasemem): New.
2002-02-25 18:18:18 +00:00
Werner Koch
488243f56e * certpath.c (check_cert_policy): New.
(gpgsm_validate_path): And call it from here.
* gpgsm.c (main): New options --policy-file,
--disable-policy-checks and --enable-policy-checks.
* gpgsm.h (opt): Added policy_file, no_policy_checks.
2002-02-19 17:39:05 +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
5dac4711f9 * certpath.c (gpgsm_validate_path): Ask the agent to add the
certificate into the trusted list.
* call-agent.c (gpgsm_agent_marktrusted): New.
2002-02-18 20:47:29 +00:00
Werner Koch
49b3340e0f Some experimental code - don't use it. 2002-02-18 20:47:17 +00:00
Werner Koch
1df38417a3 More error codes 2002-02-18 20:46:09 +00:00
Werner Koch
a46e786221 A bunch of new features. Allow empty responses on an inquiry. 2002-02-18 20:45:52 +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
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
ebb00fa843 * assuan-buffer.c (writen,readline) [USE_GNU_PT]: Use pth_read/write.
* assuan-socket-server.c (accept_connection) [USE_GNU_PTH]: Ditto.
2002-02-12 20:41:34 +00:00
Werner Koch
eeb5cdb962 Set version numbers add a comment 2002-02-07 20:41:00 +00:00
Werner Koch
2a28f5d0ae * certlist.c (gpgsm_add_to_certlist): Check that the specified
name identifies a certificate unambiguously.
(gpgsm_find_cert): Ditto.
* server.c (cmd_listkeys): Check that the data stream is available.
(cmd_listsecretkeys): Ditto.
(has_option): New.
(cmd_sign): Fix ambiguousity in option recognition.
* gpgsm.c (main): Enable --logger-fd.
* encrypt.c (gpgsm_encrypt): Increased buffer size for better
performance.
* call-agent.c (gpgsm_agent_pksign): Check the S-Exp received from
the agent.
* keylist.c (list_cert_colon): Filter out control characters.
2002-02-07 18:43:22 +00:00
Werner Koch
6aa7267865 * decrypt.c (gpgsm_decrypt): Bail out after an decryption error.
* server.c (reset_notify): Close input and output FDs.
(cmd_encrypt,cmd_decrypt,cmd_verify,cmd_sign.cmd_import)
(cmd_genkey): Close the FDs and release the recipient list even in
the error case.
2002-02-06 14:52:03 +00:00
Werner Koch
0c4c0f2ecc * cache.c (housekeeping): Fixed linking in the remove case. 2002-02-06 14:51:35 +00:00
Marcus Brinkmann
a3839b57b6 2002-02-01 Marcus Brinkmann <marcus@g10code.de>
* Makefile.am (MOSTLYCLEANFILES): New variable.
2002-02-01 19:50:01 +00:00
Marcus Brinkmann
a34a03def9 2002-02-01 Marcus Brinkmann <marcus@g10code.de>
* sign.c (gpgsm_sign): Do not release certificate twice.
2002-02-01 18:08:32 +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
Werner Koch
400938f239 Added a few more error codes 2002-01-31 17:46:29 +00:00
Werner Koch
7d9ed16fe6 * genkey.c (store_key): Protect the key.
(agent_genkey): Ask for the passphrase.
* findkey.c (unprotect): Actually unprotect the key.
* query.c (agent_askpin): Add an optional start_err_text.
2002-01-31 16:38:45 +00:00
Werner Koch
a09c4d0d12 A few test certificates 2002-01-29 15:46:55 +00:00
Werner Koch
cd30feaa8e * call-agent.c (gpgsm_agent_havekey): New.
* keylist.c (list_cert_colon): New arg HAVE_SECRET, print "crs"
when we know that the secret key is available.
(gpgsm_list_keys): New arg MODE, check whether a secret key is
available.  Changed all callers.
* gpgsm.c (main): New command --list-secret-keys.
* server.c (cmd_listsecretkeys): New.
(cmd_listkeys): Return secret keys with "crs" record.
2002-01-29 10:05:24 +00:00
Werner Koch
2d1d9d928c * findkey.c (agent_key_available): New.
* command.c (cmd_havekey): New.
(register_commands): And register new command.
2002-01-29 10:05:05 +00:00
Werner Koch
fc8d8e9987 * certreqgen.c (create_request): Store the email address in the req.
Note, that I have not yet achieved to generate a cert with the
subjectAltName using OpenSSL.  It seems that openssl requires the
email address to be part of the subject DN (subjectAltName=email:copy)
but this is something we don't want to do.
2002-01-28 14:23:18 +00:00
Werner Koch
8536088075 Updated copyright notices 2002-01-26 13:41:48 +00:00
Werner Koch
108f62eb3e * scdaemon.c scdaemon.h, command.c: New. Based on the code from
the gpg-agent.
2002-01-26 13:38:38 +00:00
Werner Koch
151deac0df * gpgsm.c (main): Disable core dumps.
* sign.c (add_certificate_list): New.
(gpgsm_sign): Add the certificates to the CMS object.
* certpath.c (gpgsm_walk_cert_chain): New.
* gpgsm.h (server_control_s): Add included_certs.
* gpgsm.c: Add option --include-certs.
(gpgsm_init_default_ctrl): New.
(main): Call it.
* server.c (gpgsm_server): Ditto.
(option_handler): Support --include-certs.
2002-01-25 16:41:13 +00:00
Werner Koch
ecb785ac44 * assuan-socket-connect.c (LOGERRORX): and removed typo. 2002-01-23 16:00:48 +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
d9a4ccf94e * certpath.c (gpgsm_validate_path): Print the DN of a missing issuer.
* certdump.c (gpgsm_dump_string): New.
(print_dn): Replaced by above.
2002-01-23 13:40:38 +00:00
Marcus Brinkmann
e92ad49697 2002-01-22 Marcus Brinkmann <marcus@g10code.de>
* assuan-socket-connect.c (LOGERRORX): Reverse arguments to fputs.
2002-01-22 15:44:24 +00:00
Werner Koch
4f39f92eff * certpath.c (unknown_criticals): New.
(allowed_ca): New.
(gpgsm_validate_path): Check validity, CA attribute, path length
and unknown critical extensions.
2002-01-22 13:32:48 +00:00
Werner Koch
1146232890 * gpgsm.c: Add option --enable-crl-checks.
* call-agent.c (start_agent): Implemented socket based access.
* call-dirmngr.c (start_dirmngr): Ditto.
2002-01-21 12:03:38 +00:00
Werner Koch
e610a0aa21 * keybox-search.c (keybox_search): Allow KEYDB_SEARCH_MODE_FPR20. 2002-01-21 12:03:25 +00:00
Werner Koch
416c0b7ea2 * assuan-connect.c: Move all except assuan_get_pid to...
* assuan-pipe-connect.c: this.
(assuan_pipe_disconnect): Removed.
(do_finish, do_deinit): New
(assuan_pipe_connect): and set them into the context.
* assuan-socket-connect.c: New.

* assuan-util.c (_assuan_log_sanitized_string): New.

* assuan-pipe-server.c (assuan_init_pipe_server): Factored most
code out to ...
(_assuan_new_context): new func.
(_assuan_release_context): New
* assuan-connect.c (assuan_pipe_connect): Use the new functions.
2002-01-21 12:03:14 +00:00
Werner Koch
c3885e0995 * server.c (option_handler): New.
(gpgsm_server): Register it with assuan.
2002-01-20 16:49:46 +00:00
Werner Koch
a2fd247cf2 * assuan.h: Added Invalid Option error code.
* assuan-handler.c (std_handler_option): New.
(std_cmd_tbl): Add OPTION as standard command.
(assuan_register_option_handler): New.
(dispatch_command): Use case insensitive matching as a fallback.
(my_strcasecmp): New.
2002-01-20 16:49:34 +00:00
Werner Koch
6aae6603af * command.c (cmd_get_passphrase): Remove the plus signs.
* query.c (start_pinentry): Send no-grab option to pinentry
* gpg-agent.c (main): Move variable grab as no_grab to agent.h.
2002-01-20 16:49:10 +00:00
Werner Koch
eac306fc90 * gpg-agent.c (main): Disable core dumps.
* cache.c: New.
* command.c (cmd_get_passphrase): Use the cache.
(cmd_clear_passphrase): Ditto.

* gpg-agent.c:  Removed unused cruft and implement the socket
based server.
(my_strusage): Take bug report address from configure.ac.
* command.c (start_command_handler): Add an argument to start as
regular server.
(start_command_handler): Enable Assuan logging.
2002-01-19 20:59:19 +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
88bacd26a2 * server.c (gpgsm_server): Use assuan_deinit_server and setup
assuan logging if enabled.
* call-agent.c (inq_ciphertext_cb): Don't show the session key in
an Assuan log file.

* gpgsm.c (my_strusage): Take bugreport address from configure.ac
2002-01-19 18:21:14 +00:00