aboutsummaryrefslogtreecommitdiffstats
path: root/agent/findkey.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Change all quotes in strings and comments to the new GNU standard.Werner Koch2012-06-051-8/+8
| | | | | | | | | | | | | | | | | | | The asymmetric quotes used by GNU in the past (`...') don't render nicely on modern systems. We now use two \x27 characters ('...'). The proper solution would be to use the correct Unicode symmetric quotes here. However this has the disadvantage that the system requires Unicode support. We don't want that today. If Unicode is available a generated po file can be used to output proper quotes. A simple sed script like the one used for en@quote is sufficient to change them. The changes have been done by applying sed -i "s/\`\([^'\`]*\)'/'\1'/g" to most files and fixing obvious problems by hand. The msgid strings in the po files were fixed with a similar command.
* Port to npth.Marcus Brinkmann2012-01-251-2/+2
| | | | | | | | | | | | | | | | | | | | | * configure.ac: Don't check for PTH but for NPTH. (AH_BOTTOM): Remove PTH_SYSCALL_SOFT. (have_pth): Rename to ... (have_npth): ... this. (USE_GNU_NPTH): Rename to ... (USE_GNU_PTH): ... this. * m4/npth.m4: New file. * agent/Makefile.am, agent/cache.c, agent/call-pinentry.c, agent/call-scd.c, agent/findkey.c, agent/gpg-agent.c, agent/trustlist.c, common/Makefile.am, common/estream.c, common/exechelp-posix.c, common/exechelp-w32.c, common/exechelp-w32ce.c, common/http.c, common/init.c, common/sysutils.c, dirmngr/Makefile.am, dirmngr/crlfetch.c, dirmngr/dirmngr.c, dirmngr/dirmngr_ldap.c, dirmngr/ldap-wrapper-ce.c, dirmngr/ldap-wrapper.c, dirmngr/ldap.c, g13/Makefile.am, g13/call-gpg.c, g13/g13.c, g13/runner.c, scd/Makefile.am, scd/apdu.c, scd/app.c, scd/ccid-driver.c, scd/command.c, scd/scdaemon.c, tools/Makefile.am: Port to npth.
* Support a confirm flag for ssh.Werner Koch2011-07-201-35/+57
| | | | | This implements the suggestion from bug#1349. With this change the fingerprint of the ssh key is also displayed in the pinentry prompts.
* Nuked almost all trailing white space.post-nuke-of-trailing-wsWerner Koch2011-02-041-33/+33
| | | | | | | | 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.
* Fixed the ECC interface to Libgcrypt to be ABI compatible with the previous ↵Werner Koch2011-01-311-2/+2
| | | | | | | | | | | | | | | | version. Quite some changes were needed but in the end we have less code than before. Instead of trying to do everything with MPIs and pass them back and forth between Libgcrypt and GnuPG, we know use the S-expression based interface and make heavy use of our opaque MPI feature. Encryption, decryption, signing and verification work with self-generared keys. Import and export does not yet work; thus it was not possible to check the test keys at https://sites.google.com/site/brainhub/pgpecckeys .
* Integrating http://code.google.com/p/gnupg-ecc/source/detail?r=15 .Andrey Jivsov2011-01-061-0/+10
| | | | | | | | | | 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.
* Re-implemented GPG's --passwd command and improved it.Werner Koch2010-10-261-1/+1
|
* More agent support for gpg.Werner Koch2010-10-131-5/+3
|
* Exporting secret keys via gpg-agent is now basically supported.Werner Koch2010-10-011-11/+51
| | | | | | A couple of forward ported changes. Doc updates.
* Obscure the cached passphrases.Werner Koch2010-09-021-8/+6
|
* Even less prompts for a new key now.Werner Koch2010-09-011-2/+22
|
* s/CACHE_MODE_IMPGEN/CACHE_MODE_NONCE/.Werner Koch2010-09-011-4/+6
| | | | | Prepare for more use cases of the cache nonce.
* Import OpenPGP keys into the agent.Werner Koch2010-08-311-2/+8
|
* .Werner Koch2010-08-261-2/+1
|
* Avoid using the protect-tool to import pkcs#12.Werner Koch2010-06-171-3/+3
|
* More changes on the way to remove secring.gpg.Werner Koch2010-04-211-46/+108
|
* Whole lot of changes to support CE.Werner Koch2010-04-141-46/+35
|
* Use cancel button in confirmation only if requested.Werner Koch2009-06-171-2/+2
|
* Fix bug #1053Werner Koch2009-05-151-7/+15
| | | | | Add option --qualitybar to command GET_PASSPHRASE.
* Ported changes from 1.4.Werner Koch2009-04-011-1/+1
|
* New gpg-agent command to list key information.Werner Koch2009-03-061-34/+96
| | | | | | Gpgsm does now print the S/N of cards. Consider ephemeral keys during listing an export.
* New PIN Callback attributes in gpg-agent.Werner Koch2009-03-051-1/+1
| | | | | | Common prompts for keypad and simple card reader. More support for Netkey cards; PIN management works now.
* Marked all unused args on non-W32 platforms.Werner Koch2008-10-201-0/+2
|
* Add more passphrase policy rules.Werner Koch2007-08-281-8/+107
| | | | | (--max-passphrase-days).
* Fixed creation of private keys under W32.Werner Koch2007-08-221-2/+6
| | | | | Minor code cleanups.
* Changed to GPLv3.Werner Koch2007-07-041-4/+2
| | | | | Removed intl/.
* New command GETEVENTCOUNTER.Werner Koch2006-11-141-1/+1
| | | | | | | | | | * command.c (bump_key_eventcounter): New. (bump_card_eventcounter): New. (cmd_geteventcounter): New command. * gpg-agent.c (handle_signal): Call bump_card_eventcounter. * findkey.c (agent_write_private_key): Call bump_key_eventcounter. * trustlist.c (agent_reload_trustlist): Ditto.
* FixesWerner Koch2006-10-191-1/+26
|
* Take advantage of newer gpg-error features.Werner Koch2006-09-141-9/+9
|
* Updated FSF's address.Werner Koch2006-06-201-1/+2
|
* * findkey.c (agent_public_key_from_file): Fixed array assignment.Werner Koch2005-07-251-1/+1
| | | | | | | This was the cause for random segvs. * call-agent.c (gpgsm_agent_readkey): New.
* gcc-4 defaults forced me to edit many many files to get rid of theWerner Koch2005-06-161-2/+2
| | | | | | | char * vs. unsigned char * warnings. The GNU coding standards used to say that these mismatches are okay and better than a bunch of casts. Obviously this has changed now.
* New debugging optionhs, updates to the manual.Werner Koch2005-06-071-11/+13
|
* * call-scd.c (inq_needpin): Skip leading spaces in of PINWerner Koch2005-05-241-1/+1
| | | | | | | | | description. * divert-scd.c (getpin_cb): Enhanced to cope with description flags. * query.c (agent_askpin): Add arg PROMPT_TEXT. Changed all callers.
* * findkey.c (modify_description): Keep invalid % escapes, so thatWerner Koch2005-02-251-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | %0A may pass through. * agent.h (server_control_s): New field USE_AUTH_CALL. * call-scd.c (agent_card_pksign): Make use of it. * command-ssh.c (data_sign): Set the flag. (ssh_send_key_public): New arg OVERRIDE_COMMENT. (card_key_available): Add new arg CARDSN. (ssh_handler_request_identities): Use the card s/n as comment. (sexp_key_extract): Use GCRYMPI_FMT_STD. (data_sign): Ditto. * learncard.c (make_shadow_info): Moved to .. * protect.c (make_shadow_info): .. here. Return NULL on malloc failure. Made global. * agent.h: Add prototype. * xasprintf.c (xtryasprintf): New. * app-openpgp.c (get_public_key): Make sure not to return negative numbers. (do_sign): Allow passing of indata with algorithm prefix. (do_auth): Allow OPENPGP.3 as an alternative ID. * app.c (app_getattr): Return just the S/N but not the timestamp. * no-libgcrypt.c (gcry_strdup): New.
* * command-ssh.c (get_passphrase): Removed.Werner Koch2005-02-231-56/+274
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (ssh_identity_register): Partly rewritten. (open_control_file, search_control_file, add_control_entry): New. (ssh_handler_request_identities): Return only files listed in our control file. * findkey.c (unprotect): Check for allocation error. * agent.h (opt): Add fields to record the startup terminal settings. * gpg-agent.c (main): Record them and do not force keep display with --enable-ssh-support. * command-ssh.c (start_command_handler_ssh): Use them here. * gpg-agent.c: Renamed option --ssh-support to --enable-ssh-support. * command.c (cmd_readkey): New. (register_commands): Register new command "READKEY". * command-ssh.c (ssh_request_process): Improved logging. * findkey.c (agent_write_private_key): Always use plain open. Don't depend on an umask for permissions. (agent_key_from_file): Factored file reading code out to .. (read_key_file): .. new function. (agent_public_key_from_file): New.
* (modify_description): Don't increment OUT_LEN duringWerner Koch2005-02-151-4/+7
| | | | | the second pass.
* * AUTHORS: Copied from 1.4 and edited to refelct the changes inWerner Koch2005-02-031-103/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1.9. * agent.h (agent_exit): Add JNLIB_GCC_A_NR to indicate that this function won't return. * gpg-agent.c (check_for_running_agent): Initialize pid to a default value if not needed. * command-ssh.c: Removed stdint.h. s/byte_t/unsigned char/, s/uint32/u32/ becuase that is what we have always used in GnuPG. (ssh_request_specs): Moved to top of file. (ssh_key_types): Ditto. (make_cstring): Ditto. (data_sign): Don't use a variable for the passphrase prompt, make it translatable. (ssh_request_process): * findkey.c (modify_description): Renamed arguments for clarity, polished documentation. Make comment a C-string. Fixed case of DESCRIPTION being just "%". (agent_key_from_file): Make sure comment string to a C-string. * gpg-agent.c (create_socket_name): Cleanup the implemntation, use DIMof, agent_exit, removed superflous args and return the allocated string as value. Documented. Changed callers. (create_server_socket): Cleanups similar to above. Changed callers. (cleanup_do): Renamed to .. (remove_socket): .. this. Changed caller. (handle_connections): The signals are to be handled in the select and not in the accept. Test all FDs after returning from a select. Remove the event tests from the accept calls. The select already assured that the accept won't block.
* 2005-01-26 Moritz Schulte <[email protected]>Moritz Schulte2005-01-261-5/+139
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * command-ssh.c: New file. * Makefile.am (gpg_agent_SOURCES): New source file: command-ssh.c. * findkey.c (modify_description): New function. (agent_key_from_file): Support comment field in key s-expressions. * gpg-agent.c (enum cmd_and_opt_values): New item: oSSHSupport. (opts) New entry for oSSHSupport. New variable: socket_name_ssh. (cleanup_do): New function based on cleanup(). (cleanup): Use cleanup_do() for socket_name and socket_name_ssh. (main): New switch case for oSSHSupport. (main): Move socket name creation code to ... (create_socket_name): ... this new function. (main): Use create_socket_name() for creating socket names for socket_name and for socket_name_ssh in case ssh support is enabled. Move socket creation code to ... (create_server_socket): ... this new function. (main): Use create_server_socket() for creating sockets. In case standard_socket is set, do not only store a socket name in socket_name, but also in socket_name_ssh. Generate additional environment info strings for ssh support. Pass additional ssh socket argument to handle_connections. (start_connection_thread_ssh): New function. (handle_connections): Use select to multiplex between gpg-agent and ssh-agent protocol. * agent.h (struct opt): New member: ssh_support. Declare function: start_command_handler_ssh.
* VArious hacks to make it at least build under W32.Werner Koch2004-12-131-1/+5
| | | | | | | | | | * stringhelp.c (w32_strerror) [W32]: New. * w32-pth.c, w32-pth.h: Added real code written by Timo Schulz. Not finished, though. * gpgconf-comp.c <ignore-ocsp-service-url>: Fixed typo.
* * command.c (cmd_passwd): Take acount of a key description.Werner Koch2004-02-211-1/+1
| | | | | | | | | * genkey.c (reenter_compare_cb): Do not set the error text. (agent_protect_and_store, agent_genkey): Force a re-enter after a non-matching passphrase. * query.c (agent_askpin): Add new arg INITIAL_ERRTEXT; changed all callers.
* * command.c (cmd_setkeydesc): New.Werner Koch2004-02-131-7/+9
| | | | | | | | | | | | (register_commands): Add command SETKEYDESC. (cmd_pksign, cmd_pkdecrypt): Use the key description. (reset_notify): Reset the description. * findkey.c (unprotect): Add arg DESC_TEXT. (agent_key_from_file): Ditto. * pksign.c (agent_pksign): Ditto. * pkdecrypt.c (agent_pkdecrypt): Ditto. Made CIPHERTEXT an unsigned char*.
* * findkey.c (agent_key_from_file): Extra paranoid wipe.Werner Koch2004-02-031-4/+4
| | | | | | | | | | * protect.c (agent_unprotect): Ditto. (merge_lists): Ditto. Add arg RESULTLEN. * pkdecrypt.c (agent_pkdecrypt): Don't show the secret key even in debug mode. * protect.c: Add DSA and Elgamal description.
* * findkey.c (agent_key_from_file): Now return an error code soWerner Koch2004-01-161-20/+28
| | | | | | | | | that we have more detailed error messages in the upper layers. This fixes the handling pinentry's cancel button. * pksign.c (agent_pksign): Changed accordingly. * pkdecrypt.c (agent_pkdecrypt): Ditto. * command.c (cmd_passwd): Ditto.
* This commit was manufactured by cvs2svn to create branchRepo Admin2003-08-051-0/+359
| | | | 'GNUPG-1-9-BRANCH'.
* This commit was manufactured by cvs2svn to create branchRepo Admin2002-10-191-350/+0
| | | | 'GNUPG-1-9-BRANCH'.
* 2002-09-03 Neal H. Walfield <[email protected]>Neal Walfield2002-09-051-4/+23
| | | | | | | * findkey.c: Include <fcntl.h>. (agent_write_private_key): Prefer POSIX compatibity, open and fdopen, over the simplicity of GNU extensions, fopen(file, "x").
* Minor fixesWerner Koch2002-08-091-21/+24
|
* * Makefile.am (pkglib_PROGRAMS): Put protect-tool there.Werner Koch2002-06-271-3/+3
| | | | | | | | | | | | | | | | * findkey.c (agent_write_private_key,agent_key_from_file) (agent_key_available): Use GNUPG_PRIVATE_KEYS_DIR constant. * gpg-agent.c (main): Use GNUPG_DEFAULT_HOMEDIR constant. * protect-tool.c (store_private_key): New. (import_p12_file): Store the new file if requested. (main): New options --force and --store. * gpg-agent.c (main): Set a global flag when runing detached. * query.c (start_pinentry): Pass the list of FD to keep in the child when not running detached. * call-scd.c (start_scd): Ditto.
* * agent.h: Add a callback function to the pin_entry_info structure.Werner Koch2002-06-171-20/+36
| | | | | | | | | | | | | | | * query.c (agent_askpin): Use the callback to check for a correct PIN. Removed the start_err_text argument becuase it is not anymore needed; changed callers. * findkey.c (unprotect): Replace our own check loop by a callback. (try_unprotect_cb): New. * genkey.c (reenter_compare_cb): New. (agent_genkey): Use this callback here. Fixed setting of the pi2 variable and a segv in case of an empty PIN. * divert-scd.c (getpin_cb): Removed some unused stuff and explained what we still have to change.