1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-06-25 01:42:45 +02:00
Commit Graph

526 Commits

Author SHA1 Message Date
Werner Koch
c39b866d2a Doc fixes, moved some fizmes to TODO, fixed minor bugs. 2002-03-18 09:30:35 +00:00
Werner Koch
c6736b6435 * decrypt.c (gpgsm_decrypt): Allow multiple recipients. 2002-03-13 10:19:50 +00:00
Werner Koch
1f6d901db6 More error codes 2002-03-12 13:36:55 +00:00
Werner Koch
8337455483 * verify.c (gpgsm_verify): Detect certs-only message. 2002-03-12 13:36:29 +00:00
Werner Koch
c1791a8d15 * server.c (cmd_listkeys, cmd_listsecretkeys): Divert to
(do_listkeys): new.  Add pattern parsing.
* keylist.c (gpgsm_list_keys): Handle selection pattern.
2002-03-06 16:13:47 +00:00
Werner Koch
4e637f2285 sm/
* gpgsm.c: New command --learn-card
* call-agent.c (learn_cb,gpgsm_agent_learn): New.
* gpgsm.c (main): Print error messages for non-implemented commands.
agent/
* learncard.c: New.
* divert-scd.c (ask_for_card): The serial number is binary so
convert it to hex here.
* findkey.c (agent_write_private_key): New.
* genkey.c (store_key): And use it here.
scd/
* pkdecrypt.c (agent_pkdecrypt): Changed the way the diversion is done.
* divert-scd.c (divert_pkdecrypt): Changed interface and
implemented it.
2002-03-06 14:16:37 +00:00
Werner Koch
7a5d7787a0 * assuan-client.c (_assuan_read_from_server): Detect END.
(assuan_transact): Pass it to the data callback.
2002-03-06 14:15:14 +00:00
Werner Koch
303b4bd636 Decryption using a Cryptoflex card does now work. 2002-03-06 09:01:12 +00:00
Werner Koch
914e77c133 We got more error codes than actual code ;-) 2002-03-05 17:17:41 +00:00
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