1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-05-28 21:50:02 +02:00
Commit Graph

977 Commits

Author SHA1 Message Date
Werner Koch
f194ebc782 Fixes to make inclusion of card raleted source files into 1.3 easier. 2003-10-02 10:27:34 +00:00
Werner Koch
59a61b3c93 * command.c (cmd_getattr): New command GETATTR.
* app.c (app_setattr): New.
(do_getattr): New.
(do_learn_status): Reimplemented in terms of do_getattr.

* app-openpgp.c (do_change_pin): Make sure CVH1 and CHV2 are
always synced.
(verify_chv2, verify_chv3): New. Factored out common code.
(do_setattr, do_sign, do_auth, do_decipher): Change the names of
the prompts to match that we have only 2 different PINs.
(app_select_openpgp): Check whether the card enforced CHV1.
(convert_sig_counter_value): New. Factor out code from
get_sig_counter.
2003-09-30 17:35:05 +00:00
Werner Koch
316dc2fd60 * keylist.c (print_card_serialno): New.
(list_keyblock_print): Use it here.

* card-util.c (toggle_forcesig): New.
(card_edit): New command "forcesig".

* card-util.c (print_name, print_isoname): Use 0 and not LF fro
the max_n arg of tty_print_utf8_string2.

* call-agent.c (agent_scd_getattr): New.
(learn_status_cb): Release values before assignment so that it can
be used by getattr to update the structure.

* card-util.c (change_pin): Simplified.  We now have only a PIN
and an Admin PIN.
2003-09-30 17:34:38 +00:00
Werner Koch
3af881581f Minor fixes 2003-09-30 13:22:33 +00:00
Werner Koch
5cf6152b4c *** empty log message *** 2003-09-30 13:16:33 +00:00
Timo Schulz
acd7f7c70d 2003-09-26 Timo Schulz <twoaday@freakmail.de>
* card_status (card_status): Do not use fputs since the fp
        parameter can be NULL. This fixes a segv.
2003-09-26 11:03:08 +00:00
Werner Koch
791e69e3e9 (print_isoname,card_status): Handle opt.with_colons.
(print_sha1_fpr_colon): New.
2003-09-24 08:31:16 +00:00
Werner Koch
4c66e94ff9 Merged most of David Shaw's changes in 1.3 since 2003-06-03. 2003-09-23 17:48:33 +00:00
Timo Schulz
47959a306e 2003-09-22 Timo Schulz <twoaday@freakmail.de>
* card-util.c (card_status): Free pk in case of an error
        and return if the card is no OpenPGP card.
2003-09-22 20:43:25 +00:00
Werner Koch
43c5c29bc1 (parse_ccid_descriptor): New.
(read_device_info): New.
(ccid_open_reader): Check that the device has all required features.
2003-09-19 11:17:11 +00:00
Werner Koch
918eee7195 * g10.c: New command --card-edit.
* card-util.c (card_status): Use tty_fprintf for all output.
(print_sha1_fpr, print_isoname): Ditto.
(get_one_name,change_name, change_url, change_login,change_lang)
(change_sex): New; taken from keygen.c.
* keygen.c (smartcard_get_one_name, smartcard_change_name)
(smartcard_change_url, smartcard_change_login_data)
(smartcard_change_lang, smartcard_change_sex): Removed.
(check_smartcard): Removed most menu items.
2003-09-18 15:51:18 +00:00
Werner Koch
210b725748 (tty_fprintf): New.
(tty_print_string, tty_print_utf8_string2)
(tty_print_utf8_string): Made P argument const byte*.
2003-09-18 15:51:01 +00:00
Werner Koch
657f9d4e5c Post release version number update 2003-09-06 13:44:17 +00:00
Werner Koch
be034cf34c * configure.ac: Required newer versions of some libraries.
* misc.c (openpgp_pk_algo_usage): Allow AUTH where SIGN is allowed.

* keygen.c (ask_passphrase): No need to allocated S2K in secure
memory.

* scdaemon.c (main): --pcsc-driver again defaults to pcsclite.
David Corcoran was so kind to remove the GPL incompatible
advertisng clause from pcsclite.
* apdu.c (apdu_open_reader): Actually make pcsc-driver option work.
2003-09-06 13:23:48 +00:00
Werner Koch
25430119e8 * ccid-driver.c: More work, data can now actually be retrieved.
* ccid-driver.c, ccid-driver.h: Alternativley allow use under BSD
conditions.
2003-09-05 07:40:41 +00:00
Werner Koch
3598504854 * keygen.c (do_add_key_flags, parse_parameter_usage)
(do_generate_keypair): Add support the proposed AUTH key flag.
* getkey.c (fixup_uidnode, merge_selfsigs_main)
(merge_selfsigs_subkey, premerge_public_with_secret): Ditto.
* keylist.c (print_capabilities): Ditto.
2003-09-05 07:40:18 +00:00
Werner Koch
936250aac9 * configure.ac (HAVE_LIBUSB): Added a simple test for libusb.
* scdaemon.c, scdaemon.h: New option --pcsc-ccid.
* ccid-driver.c, ccid-driver.h: New but far from being useful.
* Makefile.am: Add above.
* apdu.c: Add support for that ccid driver.
2003-09-02 19:06:34 +00:00
Timo Schulz
93c76df907 2003-08-26 Timo Schulz <twoaday@freakmail.de>
* apdu.c (new_reader_slot): Only set 'is_osc' when OpenSC
        is used.
2003-08-26 09:01:18 +00:00
Timo Schulz
93ddaf9acc 2003-08-25 Timo Schulz <twoaday@freakmail.de>
* pkglue.c (mpi_from_sexp): New. Used to factor out
        some common code.
2003-08-25 21:12:43 +00:00
Werner Koch
ab0f32351d (cmd_setattr): Use a copy of LINE.
(cmd_genkey): Use a copy of KEYNO.
(cmd_passwd): Use a copy of CHVNOSTR.
(cmd_pksign, cmd_pkauth, cmd_pkdecrypt): s/strdup/xtrystrdup/.
2003-08-25 09:58:02 +00:00
Timo Schulz
4498a55dfb 2003-08-20 Timo Schulz <twoaday@freakmail.de>
* pksign.c (do_encode_md): Allocate enough space. Cast md
        byte to unsigned char to prevent sign extension.
2003-08-20 20:20:59 +00:00
Marcus Brinkmann
238a1b26b8 2003-08-20 Marcus Brinkmann <marcus@g10code.de>
* maperror.c (map_ksba_err): Map -1.  Use gpg_err_make to set
	the error source.
2003-08-20 17:23:23 +00:00
Marcus Brinkmann
e8cf79c977 2003-08-20 Marcus Brinkmann <marcus@g10code.de>
* encrypt.c (encode_session_key): Allocate enough space.  Cast key
	byte to unsigned char to prevent sign extension.
	(encrypt_dek): Check return value before error.
2003-08-20 16:53:40 +00:00
Werner Koch
e3cdba8386 * scdaemon.c, scdaemon.h: New option --pcsc-driver.
* apdu.c (apdu_open_reader): Use that option here instead of a
hardcoded one.
2003-08-19 09:36:48 +00:00
Marcus Brinkmann
5e380eb635 2003-08-19 Marcus Brinkmann <marcus@g10code.de>
* configure.ac (AM_PATH_GPG_ERROR): Add missing comma in
	invocation.
2003-08-19 02:25:25 +00:00
Timo Schulz
f9867edfb8 * mdc.c (use_mdc): Simplified. 2003-08-18 21:32:19 +00:00
Timo Schulz
73b5da4c7d 2003-08-18 Timo Schulz <twoaday@freakmail.de>
* encode.c (encode_sesskey): Checked the code and removed
        the warning since all compatibility checks with PGP succeeded.
        * mainproc.c (symkey_decrypt_sesskey): Better check for the
        algorithm and check the return values of some functions.
2003-08-18 21:25:03 +00:00
Werner Koch
4eb5165019 * scdaemon.c, scdaemon.h: New option --disable-opensc.
* card.c (card_open): Implement it.
* apdu.c (open_osc_reader, osc_send_apdu): New.
(apdu_open_reader) [HAVE_OPENSC]: Use the opensc driver if not
disabled.
(error_string) [HAVE_OPENSC]: Use sc_strerror.
(send_apdu) [HAVE_OPENSC]: Call osc_apdu_send.

* card-p15.c (p15_enum_keypairs, p15_prepare_key): Adjusted for
libgpg-error.
2003-08-18 17:34:51 +00:00
Werner Koch
0506e4ebec * Makefile.am: Add OPENSC_LIBS to all programs.
* scdaemon.c, scdaemon.h: New option --disable-opensc.
* card.c (card_open): Implement it.
* apdu.c (open_osc_reader, osc_send_apdu): New.
(apdu_open_reader) [HAVE_OPENSC]: Use the opensc driver if not
disabled.
(error_string) [HAVE_OPENSC]: Use sc_strerror.
(send_apdu) [HAVE_OPENSC]: Call osc_apdu_send.
2003-08-18 17:34:28 +00:00
Timo Schulz
6bdd855d11 Add 'dynload.h' to Makefile.am. 2003-08-14 19:58:03 +00:00
Timo Schulz
81a0683e21 2003-08-14 Timo Schulz <twoaday@freakmail.de>
* encrypt.c (encode_session_key): Use new Libgcrypt interface.
2003-08-14 19:39:30 +00:00
Timo Schulz
aa6e3f7d28 Forgot to remove the unsued variable. 2003-08-14 19:10:12 +00:00
Timo Schulz
7abac1ad8e 2003-08-14 Timo Schulz <twoaday@freakmail.de>
* pksign.c: do_encode_md: Due to the fact pkcs#1 padding
        is now in Libgcrypt, use the new interface.
2003-08-14 19:06:46 +00:00
Timo Schulz
abbb66e037 * Always use 'dynload.h' instead of 'dlfcn.h'. 2003-08-14 12:20:08 +00:00
Timo Schulz
f099ed75b8 *** empty log message *** 2003-08-14 12:16:58 +00:00
Timo Schulz
2bf665e188 2003-08-14 Timo Schulz <twoaday@freakmail.de>
* dlfcn.h. New. W32 wrapper around the dynload mechanism.
2003-08-14 12:06:43 +00:00
Werner Koch
dbb7f4c89c (pk_sign): Fix last change.
(pk_verify): Check for valid DATA array so that we don't segv in
Libgcrypt.
(pk_verify): Ditto.
2003-08-07 07:05:38 +00:00
Werner Koch
4140c3d447 Bumbed version number 2003-08-05 18:55:40 +00:00
Werner Koch
c9c4192763 About to release the first 1.9 version. 2003-08-05 17:20:18 +00:00
Werner Koch
1bcf8ef9de Cleanups, fixes and PC/SC support 2003-08-05 17:11:04 +00:00
Repo Admin
9ca4830a5b This commit was manufactured by cvs2svn to create branch
'GNUPG-1-9-BRANCH'.
2003-08-05 17:11:04 +00:00
Werner Koch
eba8c18657 minor changes to make make distcheck happy 2003-07-31 15:45:11 +00:00
Werner Koch
6f7ed05900 * gpgsm.c (main): Add secmem features and set the random seed file.
(gpgsm_exit): Update the random seed file and enable debug output.

* g10.c (main): Add secmem features and set the random seed file.
(g10_exit): Update the random seed file.

* parse-packet.c (parse_signature,read_protected_v3_mpi)
(parse_key): Fixed use of mpi_set_opaque.
* keygen.c (gen_card_key): Ditto.
2003-07-29 08:53:19 +00:00
Werner Koch
979ed0ca26 Adjusted for use with current libgcrypt (1.1.42). 2003-07-28 08:59:18 +00:00
Werner Koch
0fe6a1287f * g10.c: New command --card-status.
* card-util.c (card_status): New.
* call-agent.c (learn_status_cb): Parse more information.

* keylist.c (print_pubkey_info): Add FP arg for optinal printing
to a stream.  Changed all callers.
2003-07-24 09:06:43 +00:00
Werner Koch
44f4303bcf * keygen.c (generate_keypair): Create an AUTHKEYTYPE entry for cards.
(do_generate_keypair): Abd generate the authkey.
(check_smartcard): Changed menu accordingly.
2003-07-23 07:11:06 +00:00
Werner Koch
4622a2180d * export.c (parse_export_options): New option sexp-format.
(export_seckeys,export_secsubkeys): Check sexp-format option.
(do_export): Ignore armor for sexp format.
(do_export_stream): Handle sexp-format.
(write_sexp_line,write_sexp_keyparm, build_sexp_seckey): New.
(build_sexp): New.
2003-07-16 13:45:15 +00:00
Werner Koch
89a3dbae85 Minor changes to make make dist work correctly. 2003-07-04 09:40:19 +00:00
Werner Koch
ca3818df83 * cipher.h (DBG_CIPHER,g10c_debug_mode): Removed. 2003-07-03 18:09:55 +00:00
Werner Koch
1753a2f3b0 * options.h (DBG_CIPHER): Reintroduced it.
* seskey.c (encode_session_key): Debug output of the session key.

* pubkey-enc.c (get_it): Handle card case.
* call-agent.c (agent_scd_pkdecrypt): New.
* pkglue.c (pk_encrypt): Add RSA support.

* g10.c (main): Default to --use-agent.

* keygen.c (show_smartcard): Print info about the public key.
(check_smartcard): Check for existing key here.
(gen_card_key): And not anymore here.
(fpr_is_zero): New.
(generate_keypair): Generate both keys for a card.
(smartcard_change_url): Nw.
2003-07-03 18:08:16 +00:00