aboutsummaryrefslogtreecommitdiffstats
path: root/agent/protect.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2013-07-01ssh: Support ECDSA keys.Werner Koch1-5/+26
* agent/command-ssh.c (SPEC_FLAG_IS_ECDSA): New. (struct ssh_key_type_spec): Add fields CURVE_NAME and HASH_ALGO. (ssh_key_types): Add types ecdsa-sha2-nistp{256,384,521}. (ssh_signature_encoder_t): Add arg spec and adjust all callers. (ssh_signature_encoder_ecdsa): New. (sexp_key_construct, sexp_key_extract, ssh_receive_key) (ssh_convert_key_to_blob): Support ecdsa. (ssh_identifier_from_curve_name): New. (ssh_send_key_public): Retrieve and pass the curve_name. (key_secret_to_public): Ditto. (data_sign): Add arg SPEC and change callers to pass it. (ssh_handler_sign_request): Get the hash algo from SPEC. * common/ssh-utils.c (get_fingerprint): Support ecdsa. * agent/protect.c (protect_info): Add flag ECC_HACK. (agent_protect): Allow the use of the "curve" parameter. * agent/t-protect.c (test_agent_protect): Add a test case for ecdsa. * agent/command-ssh.c (ssh_key_grip): Print a better error code. -- The 3 standard curves are now supported in gpg-agent's ssh-agent protocol implementation. I tested this with all 3 curves and keys generated by OpenSSH 5.9p1. Using existing non-ssh generated keys will likely fail for now. To fix this, the code should first undergo some more cleanup; then the fixes are pretty straightforward. And yes, the data structures are way too complicated. (cherry picked from commit 649b31c663b8674bc874b4ef283d714a13dc8cfe) Solved conflicts: agent/protect.c agent/t-protect.c common/ssh-utils.c (different variabale name)
2013-04-23w32: Almost everywhere include winsock2.h before windows.h.Werner Koch1-79/+82
-- This is required by newer mingw toolchain versions which demand that winsock2.h is included before windows.h. Now, due to the use of socket definitions in pth.h we need to include winsock2.h also in pth.h, now pth.h is often included after an include of windows.h and thus the compiler spits out a warning. To avoid that we include winsock2.h at all places the compiler complains about.
2010-02-18Fixed backport of libassuan-2 changes.gnupg-2.0.15rc1Werner Koch1-1/+1
2010-01-26Fixed a regression in 2.0.14Werner Koch1-13/+19
2009-12-14Implement dynamic S2K count computation for GPGSMWerner Koch1-4/+144
2009-06-24Fixed a bunch of little bugs as reported by Fabian Keil.Werner Koch1-2/+5
Still one problem left; marked with a gcc #warning.
2009-03-06New gpg-agent command to list key information.Werner Koch1-1/+66
Gpgsm does now print the S/N of cards. Consider ephemeral keys during listing an export.
2007-08-28Add more passphrase policy rules.Werner Koch1-27/+114
(--max-passphrase-days).
2007-07-04Changed to GPLv3.Werner Koch1-4/+2
Removed intl/.
2007-05-15Use estream_asprintf instead of the GNU asprintf.Werner Koch1-9/+7
2006-11-20Made some PIN pads work.Werner Koch1-1/+1
Some cleanups for 64 bit CPUs.
2006-06-20Updated FSF's address.Werner Koch1-1/+2
2005-07-27Removed directories which are only used by the 1.9 branchWerner Koch1-971/+0
2005-06-16gcc-4 defaults forced me to edit many many files to get rid of theWerner Koch1-11/+18
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.
2005-05-20* protect-tool.c: New option --canonical.Werner Koch1-1/+1
(show_file): Implement it. * keyformat.txt: Define the created-at attribute for keys. * ccid-driver.c: Replaced macro DEBUG_T1 by a new debug level. (parse_ccid_descriptor): Mark SCR335 firmware version 5.18 good. (ccid_transceive): Arghhh. The seqno is another bit in the R-block than in the I block, this was wrong at one place. * scdaemon.c: New options --debug-ccid-driver and --debug-disable-ticker. * app-openpgp.c (do_genkey, do_writekey): Factored code to check for existing key out into .. (does_key_exist): .. New function. * gpg-connect-agent.c (add_definq, show_definq, clear_definq) (handle_inquire): New. (read_and_print_response): Handle INQUIRE command. (main): Implement control commands.
2005-02-25* findkey.c (modify_description): Keep invalid % escapes, so thatWerner Koch1-2/+35
%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.
2005-02-23* command-ssh.c (get_passphrase): Removed.Werner Koch1-1/+1
(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.
2004-09-28(agent_unprotect): Fixed wiping of CLEARTEXT. ThanksWerner Koch1-1/+1
to Moritz for pointing this out.
2004-02-03* findkey.c (agent_key_from_file): Extra paranoid wipe.Werner Koch1-7/+19
* 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.
2003-12-16* protect.c (do_encryption): Use gcry_create_nonce instad of theWerner Koch1-4/+4
obsolete WEAK_RANDOM.
2003-08-05This commit was manufactured by cvs2svn to create branchRepo Admin1-0/+971
'GNUPG-1-9-BRANCH'.
2003-06-27Key generation and signing using the OpenPGP card does rudimentary work.Werner Koch1-14/+16
2003-06-04Update error handling to match gpg-error in CVS.Marcus Brinkmann1-45/+45
2003-06-03Make use of libgpg-errorWerner Koch1-85/+87
2002-10-19This commit was manufactured by cvs2svn to create branchRepo Admin1-967/+0
'GNUPG-1-9-BRANCH'.
2002-03-04* pksign.c (agent_pksign): Detect whether a Smartcard is to beWerner Koch1-74/+2
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-02-28Changes needed to support smartcards. Well, only _support_. There isWerner Koch1-1/+152
no real code yet.
2002-02-01* cache.c: Add a few debug outputs.Werner Koch1-0/+27
* 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-01-31* genkey.c (store_key): Protect the key.Werner Koch1-0/+861
(agent_genkey): Ask for the passphrase. * findkey.c (unprotect): Actually unprotect the key. * query.c (agent_askpin): Add an optional start_err_text.