Commit Graph

281 Commits

Author SHA1 Message Date
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 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 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 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
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 c3885e0995 * server.c (option_handler): New.
(gpgsm_server): Register it with assuan.
2002-01-20 16:49:46 +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
Werner Koch a9979e26a5 * import.c (gpgsm_import): Just do a basic cert check before
storing it.
* certpath.c (gpgsm_basic_cert_check): New.

* keydb.c (keydb_store_cert): New.
* import.c (store_cert): Removed and change all caller to use
the new function.
* verify.c (store_cert): Ditto.

* certlist.c (gpgsm_add_to_certlist): Validate the path

* certpath.c (gpgsm_validate_path): Check the trust list.
* call-agent.c (gpgsm_agent_istrusted): New.
2002-01-15 13:02:47 +00:00
Werner Koch 438b2bcb8c * call-dirmngr.c (inq_certificate): Changed for new interface semantic.
* certlist.c (gpgsm_find_cert): New.

DirMngr should now work.  Remember that there is a --disable-crl-check
option in gpgsm to be used when there is a problem with the dirmngr
communication or you want to do faster tests.
2002-01-14 12:15:30 +00:00
Werner Koch ae439af93a * fingerprint.c (gpgsm_get_certid): Print the serialand not the
hash after the dot.
2002-01-13 10:43:21 +00:00
Werner Koch 6af7631e54 * call-dirmngr.c: New.
* certpath.c (gpgsm_validate_path): Check the CRL here.
* fingerprint.c (gpgsm_get_certid): New.
* gpgsm.c: New options --dirmngr-program and --disable-crl-checks.
2002-01-11 17:07:51 +00:00
Werner Koch dc37fe1849 * base64.c (gpgsm_create_writer): Allow to set the object name
* server.c (cmd_genkey): New.
* certreqgen.c: New.  The parameter handling code has been taken
from gnupg/g10/keygen.c version 1.0.6.
* call-agent.c (gpgsm_agent_genkey): New.
2002-01-10 19:47:20 +00:00
Werner Koch 3b8cf6e497 * verify.c (gpgsm_verify): Implemented non-detached signature
verification.  Add OUT_FP arg, initialize a writer and changed all
callers.
* server.c (cmd_verify): Pass an out_fp if one has been set.
2001-12-20 16:51:06 +00:00
Werner Koch 5f116e9540 * base64.c (base64_reader_cb): Try to detect an S/MIME body part.
* certdump.c (print_sexp): Renamed to gpgsm_dump_serial, made
global.
(print_time): Renamed to gpgsm_dump_time, made global.
(gpgsm_dump_serial): Take a real S-Expression as argument and
print the first item.
* keylist.c (list_cert_colon): Ditto.
* keydb.c (keydb_search_issuer_sn): Ditto.
* decrypt.c (print_integer_sexp): Removed and made callers
use gpgsm_dump_serial.
* verify.c (print_time): Removed, made callers use gpgsm_dump_time.
2001-12-20 13:25:08 +00:00
Marcus Brinkmann 84b6169de7 assuan/
2001-12-14  Marcus Brinkmann  <marcus@g10code.de>

	* assuan-buffer.c (_assuan_read_line): New variable ATTICLEN, use
	it to save the length of the attic line.
	Rediddle the code a bit to make it more clear what happens.

agent/
2001-12-19  Marcus Brinkmann  <marcus@g10code.de>

	* query.c (start_pinentry): Add new argument to assuan_pipe_connect.

sm/
2001-12-19  Marcus Brinkmann  <marcus@g10code.de>

	* call-agent.c (start_agent): Add new argument to assuan_pipe_connect.
2001-12-19 00:18:11 +00:00
Werner Koch 56172ce393 Changes to be used with the new libksba interface.
libgcrypt-1.1.5 is required (cvs or tarball)
2001-12-18 17:37:48 +00:00
Werner Koch 73d2214abb * gpgsm.c (main): Renamed the default key database to "keyring.kbx". 2001-12-15 16:19:24 +00:00
Werner Koch 1301c0b5ef * decrypt.c (gpgsm_decrypt): Write STATUS_DECRYPTION_*.
* sign.c (gpgsm_sign): Write a STATUS_SIG_CREATED.
2001-12-15 12:36:39 +00:00
Werner Koch fb446a5aeb * keylist.c (list_cert_colon): Kludge to show an email address
encoded in the subject's DN.
2001-12-14 20:48:26 +00:00
Werner Koch 6d27c940b2 * verify.c (gpgsm_verify): Add hash debug helpers
* sign.c (gpgsm_sign): Ditto.

* base64.c (base64_reader_cb): Reset the linelen when we need to
skip the line and adjusted test; I somehow forgot about DeMorgan.

* server.c (cmd_encrypt,cmd_decrypt,cmd_sign,cmd_verify)
(cmd_import): Close the FDs on success.
(close_message_fd): New.
(input_notify): Setting autodetect_encoding to 0 after initializing
it to 0 is pretty pointless.  Easy to fix.
2001-12-14 19:36:33 +00:00
Werner Koch b47b62b5f5 * gpgsm.c (main): New option --debug-wait n, so that it is
possible to attach gdb when used in server mode.
2001-12-14 15:40:20 +00:00
Werner Koch b020999687 * sign.c (get_default_signer): Use keydb_classify_name here. 2001-12-14 13:35:34 +00:00
Marcus Brinkmann e6336cb1ff assuan/
2001-12-14  Marcus Brinkmann  <marcus@g10code.de>

	* assuan-defs.h (LINELENGTH): Define as ASSUAN_LINELENGTH.
	assuan.h: Define ASSUAN_LINELENGTH.

agent/
2001-12-14  Marcus Brinkmann  <marcus@g10code.de>

	* query.c (LINELENGTH): Removed.
	(agent_askpin): Use ASSUAN_LINELENGTH, not LINELENGTH.

sm/
2001-12-14  Marcus Brinkmann  <marcus@g10code.de>

	* call-agent.c (LINELENGTH): Removed.
	(gpgsm_agent_pksign): Use ASSUAN_LINELENGTH, not LINELENGTH.
	(gpgsm_agent_pkdecrypt): Likewise.
2001-12-13 23:20:02 +00:00
Werner Koch dda2440aea * keylist.c (list_cert_colon): Print alternative names of subject
and a few other values.
2001-12-13 13:11:40 +00:00
Werner Koch bc11060de9 * gpgsm.c (main): New options --assume-{armor,base64,binary}.
* base64.c (base64_reader_cb): Fixed non-autodetection mode.
2001-12-12 11:57:28 +00:00
Werner Koch e8676a0871 Started with decryption stuff 2001-12-05 23:48:01 +00:00
Werner Koch 944fee70bc * base64.c: New. Changed all other functions to use this instead
of direct creation of ksba_reader/writer.
* gpgsm.c (main): Set ctrl.auto_encoding unless --no-armor is used.
This way we can feed PEM encoded stuff to --verify.
2001-11-27 17:40:09 +00:00
Werner Koch d9aecd9eb7 * gpgsm.c: New option --agent-program
* call-agent.c (start_agent): Allow to override the default path
to the agent.
2001-11-26 17:54:49 +00:00
Werner Koch 99829ef5fb * keydb.c (keydb_add_resource): Create keybox
* keylist.c (gpgsm_list_keys): Fixed non-server keylisting.
* server.c (rc_to_assuan_status): New.  Use it for all commands.
2001-11-26 13:08:36 +00:00
Werner Koch a1b39ba850 Created configuration files 2001-10-31 11:47:04 +00:00