aboutsummaryrefslogtreecommitdiffstats
path: root/g10/call-agent.h (unfollow)
Commit message (Collapse)AuthorFilesLines
2014-04-15gpg: Re-enable secret key deletion.Werner Koch1-0/+4
* g10/call-agent.c (agent_delete_key): New. * g10/keydb.h (FORMAT_KEYDESC_DELKEY): New. * g10/passphrase.c (gpg_format_keydesc): Support new format. * g10/delkey.c (do_delete_key): Add secret key deletion.
2013-08-28gpg: Make decryption with the OpenPGP card work.Werner Koch1-1/+2
* scd/app-common.h (APP_DECIPHER_INFO_NOPAD): New. * scd/app-openpgp.c (do_decipher): Add arg R_INFO. * scd/app-nks.c (do_decipher): Add arg R_INFO as a dummy. * scd/app.c (app_decipher): Add arg R_INFO. * scd/command.c (cmd_pkdecrypt): Print status line "PADDING". * agent/call-scd.c (padding_info_cb): New. (agent_card_pkdecrypt): Add arg R_PADDING. * agent/divert-scd.c (divert_pkdecrypt): Ditto. * agent/pkdecrypt.c (agent_pkdecrypt): Ditto. * agent/command.c (cmd_pkdecrypt): Print status line "PADDING". * g10/call-agent.c (padding_info_cb): New. (agent_pkdecrypt): Add arg R_PADDING. * g10/pubkey-enc.c (get_it): Use padding info. -- Decryption using a card never worked in gpg 2.1 because the information whether the pkcs#1 padding needs to be removed was not available. Gpg < 2.1 too this info from the secret sub key but that has gone in 2.1. Signed-off-by: Werner Koch <[email protected]>
2013-05-22Implement unattended OpenPGP secret key import.Werner Koch1-1/+1
* agent/command.c (cmd_import_key): Add option --unattended. * agent/cvt-openpgp.c (convert_transfer_key): New. (do_unprotect): Factor some code out to ... (prepare_unprotect): new function. (convert_from_openpgp): Factor all code out to ... (convert_from_openpgp_main): this. Add arg 'passphrase'. Implement openpgp-native protection modes. (convert_from_openpgp_native): New. * agent/t-protect.c (convert_from_openpgp_native): New dummy fucntion * agent/protect-tool.c (convert_from_openpgp_native): Ditto. * agent/protect.c (agent_unprotect): Add arg CTRL. Adjust all callers. Support openpgp-native protection. * g10/call-agent.c (agent_import_key): Add arg 'unattended'. * g10/import.c (transfer_secret_keys): Use unattended in batch mode. -- With the gpg-agent taking care of the secret keys, the user needs to migrate existing keys from secring.gpg to the agent. This and also the standard import of secret keys required the user to unprotect the secret keys first, so that gpg-agent was able to re-protected them using its own scheme. With many secret keys this is quite some usability hurdle. In particular if a passphrase is not instantly available. To make this migration smoother, this patch implements an unattended key import/migration which delays the conversion to the gpg-agent format until the key is actually used. For example: gpg2 --batch --import mysecretkey.gpg works without any user interaction due to the use of --batch. Now if a key is used (e.g. "gpg2 -su USERID_FROM_MYSECRETKEY foo"), gpg-agent has to ask for the passphrase anyway, converts the key from the openpgp format to the internal format, signs, re-encrypts the key and tries to store it in the gpg-agent format to the disk. The next time, the internal format of the key is used. This patch has only been tested with the old demo keys, more tests with other protection formats and no protection are needed. Signed-off-by: Werner Koch <[email protected]>
2013-02-12gpg: Implement card_store_subkey again.NIIBE Yutaka1-0/+4
* g10/call-agent.h (agent_keytocard): New. * g10/call-agent.c (agent_keytocard): New. * g10/card-util.c (replace_existing_key_p): Returns 1 when replace. (card_generate_subkey): Check return value of replace_existing_key_p. (card_store_subkey): Implement again using agent_keytocard.
2013-02-07gpg: Add pinentry-mode feature.Werner Koch1-0/+2
* g10/gpg.c: Include shareddefs.h. (main): Add option --pinentry-mode. * g10/options.h (struct opt): Add field pinentry_mode. * g10/passphrase.c: Include shareddefs.h. (have_static_passphrase): Take care of loopback pinentry_mode. (read_passphrase_from_fd): Ditto. (get_static_passphrase): New. (passphrase_to_dek_ext): Factor some code out to ... (emit_status_need_passphrase): new. * g10/call-agent.c (start_agent): Send the pinentry mode. (default_inq_cb): Take care of the PASSPHRASE inquiry. Return a proper error code. (agent_pksign): Add args keyid, mainkeyid and pubkey_algo. (agent_pkdecrypt): Ditto. * g10/pubkey-enc.c (get_it): Pass new args. * g10/sign.c (do_sign): Pass new args. * g10/call-agent.c (struct default_inq_parm_s): New. Change all similar structs to reference this one. Change all users and inquire callback to use this struct, instead of NULL or some undefined but not used structs. This change will help to eventually get rid of global variables. -- This new features allows to use gpg without a Pinentry. As a prerequisite the agent must be configured to allow the loopback pinentry mode (option --allow-loopback-pinentry). For example gpg2 --pinentry-mode=loopback FILE.gpg may be used to decrypt FILE.gpg while entering the passphrase on the tty. If batch is used, --passphrase et al. may be used, if --command-fd is used, the passphrase may be provided by another process. Note that there are no try-again prompts in case of a bad passphrase.
2011-11-06Allow creating subkeys using an existing keyWerner Koch1-0/+4
This works by specifying the keygrip instead of an algorithm (section number 13) and requires that the option -expert has been used. It will be easy to extend this to the primary key.
2011-03-02Fix usage of SHA-2 algorithm with OpenPGP cards.Werner Koch1-10/+0
This was a regression in 2.1 introduced due to having the agent do the signing in contrast to the old "SCD PKSIGN" command which accesses the scdaemon directly and passed the hash algorithm. The hash algorithm is used by app-openpgp.c only for a sanity check.
2011-02-04Nuked almost all trailing white space.post-nuke-of-trailing-wsWerner Koch1-3/+3
We better do this once and for all instead of cluttering all future commits with diffs of trailing white spaces. In the majority of cases blank or single lines are affected and thus this change won't disturb a git blame too much. For future commits the pre-commit scripts checks that this won't happen again.
2011-01-11'g10/gpg2 --encrypt --debug 15 -r ecdsa -a -o _e.asc _' and 'g10/gpg2 ↵Andrey Jivsov1-1/+0
--debug 15 _e.asc', as well as decoding of an old message posted on https://sites.google.com/site/brainhub/pgpecckeys work. This is the milestone 2 that brings in ECDH support from http://code.google.com/p/gnupg-ecc/source/detail?r=15 . This corresponds to the commit 899386826c85f1e757e75bcc5d5b2159d05676a0 in libgcrypt
2011-01-06Integrating http://code.google.com/p/gnupg-ecc/source/detail?r=15 .Andrey Jivsov1-0/+1
The following works: gpg2 --gen-key (ECC) gpg2 --list-keys gpg2 --list-packets ~/.gnupg/pubring.gpg gpg2 --list-packets <private key from http://sites.google.com/site/brainhub/pgpecckeys> ECDH doesn't work yet as the code must be re-written to adjust for gpg-agent refactoring.
2010-10-26Re-implemented GPG's --passwd command and improved it.Werner Koch1-1/+4
2010-10-14All tests work are again workingWerner Koch1-1/+1
2010-10-01Exporting secret keys via gpg-agent is now basically supported.Werner Koch1-0/+10
A couple of forward ported changes. Doc updates.
2010-09-01Even less prompts for a new key now.Werner Koch1-1/+2
2010-09-01Use passphrase caching for import and genkey.Werner Koch1-1/+3
2010-08-31Import OpenPGP keys into the agent.Werner Koch1-0/+8
2010-04-23Decryption and signi via agent is now implemented.Werner Koch1-0/+4
2010-04-21More changes on the way to remove secring.gpg.Werner Koch1-4/+5
2010-04-20Generating an OpenPGP key cia gpg-agent basically works.Werner Koch1-0/+18
2010-01-08Add dummu option --passwd for gpg.Werner Koch1-0/+3
Collected changes.
2009-08-11Ask to insert the right OpenPGP card.Werner Koch1-0/+3
2009-07-22Make use of the card's extended capabilities.Werner Koch1-0/+4
2009-06-17Add readcert command.Werner Koch1-0/+4
fix reading large certificates.
2009-05-15Made card key generate with backup key work for 2048 bit.Werner Koch1-0/+5
Improved card key generation prompts.
2009-03-17Move password repetition from gpg to gpg-agent.Werner Koch1-0/+1
2009-01-13Add a sample key.Werner Koch1-0/+1
Detect and show the card type.
2008-09-25Finished support for v2 cards with the exception of secure messaging.Werner Koch1-0/+1
2008-09-23Support the Certifciate DO of the v2 OpenPGP cards.Werner Koch1-0/+4
2007-07-05Fixed card key generation of gpg2.Werner Koch1-1/+1
Reveal less information about timings while generating a key.
2007-07-04Changed to GPLv3.Werner Koch1-4/+2
Removed intl/.
2006-10-04Fixed agent access for gpg.Werner Koch1-4/+11
2006-08-16With --enable-gpg the keyservers are now build and a first test using gpg2Werner Koch1-2/+6
shows no prblems. Needs more testing of course.
2006-06-20Updated FSF's address.Werner Koch1-1/+2
2006-05-23g10/ does build again.Werner Koch1-4/+13
2004-07-01* card-util.c (change_login): Kludge to allow reading data from aWerner Koch1-0/+6
file. (card_edit): Pass ARG_STRING to change_login. (card_status): Print CA fingerprints. (change_cafpr): New. (card_edit): New command CAFPR. * call-agent.h: Add members for CA fingerprints. * call-agent.c (agent_release_card_info): Invalid them. (learn_status_cb): Store them.
2003-10-21* card-util.c (card_edit): New command "passwd". Add logic toWerner Koch1-0/+4
check the PIN in advance. (card_status): Add new args to return the serial number. Changed all callers. * call-agent.c (agent_scd_checkpin): New.
2003-09-30* keylist.c (print_card_serialno): New.Werner Koch1-0/+3
(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-07-24* g10.c: New command --card-status.Werner Koch1-0/+9
* 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-23* keygen.c (generate_keypair): Create an AUTHKEYTYPE entry for cards.Werner Koch1-0/+6
(do_generate_keypair): Abd generate the authkey. (check_smartcard): Changed menu accordingly.
2003-07-03* options.h (DBG_CIPHER): Reintroduced it.Werner Koch1-6/+4
* 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-01* app-openpgp.c (store_fpr): Fixed fingerprint calculation.Werner Koch1-0/+1
* keygen.c (gen_card_key): Obviously we should use the creation date received from SCDAEMON, so that the fingerprints will match. * sign.c (do_sign): Pass the serialno to the sign code. * keyid.c (serialno_and_fpr_from_sk): New.
2003-06-27Key generation and signing using the OpenPGP card does rudimentary work.Werner Koch1-0/+39
2003-06-05A small step for GnuPG but a huge leap for error codes.Werner Koch1-22/+11
(Sorry, it does not build currently - I need to check it in to avoid duplicate work.)
2002-07-22* fseeko.c, ftello.c: New.Werner Koch1-7/+23
* configure.ac: Check for ftello and provide a replacement.
2002-06-29Update head to match stable 1.0David Shaw1-9/+8
2000-07-14See ChangeLog: Fri Jul 14 19:38:23 CEST 2000 Werner KochWerner Koch1-1/+1
2000-01-27See ChangeLog: Thu Jan 27 18:00:44 CET 2000 Werner KochWerner Koch1-3/+3
1999-03-20See ChangeLog: Sat Mar 20 11:53:40 CET 1999 Werner KochWerner Koch1-0/+1
1999-01-19See ChangeLog: Tue Jan 19 19:34:58 CET 1999 Werner KochWerner Koch1-0/+1
1999-01-16See ChangeLog: Sat Jan 16 09:27:30 CET 1999 Werner KochWerner Koch1-20/+6