1
0
mirror of git://git.gnupg.org/gnupg.git synced 2025-01-10 13:04:23 +01:00
Werner Koch b4cb20cfc3 ssh: Support ECDSA keys.
* 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-07-01 20:31:16 +02:00
..
2009-12-03 19:39:39 +00:00
2009-12-03 19:39:39 +00:00
2008-04-07 19:31:12 +00:00
2007-07-04 19:49:40 +00:00
2009-12-08 12:43:27 +00:00
2007-07-04 19:49:40 +00:00
2007-08-22 10:55:07 +00:00
2009-03-16 09:44:44 +00:00
2007-07-04 19:49:40 +00:00
2007-07-04 19:49:40 +00:00
2007-07-04 19:49:40 +00:00
2007-07-04 19:49:40 +00:00
2007-07-04 19:49:40 +00:00
2007-07-04 19:49:40 +00:00
2007-07-04 19:49:40 +00:00
2007-07-04 19:49:40 +00:00
2011-08-04 12:22:04 +02:00
2007-07-04 19:49:40 +00:00
2011-01-10 15:16:07 +01:00
2009-07-01 18:30:33 +00:00
2007-07-04 19:49:40 +00:00
2007-07-04 19:49:40 +00:00
2013-07-01 20:31:16 +02:00
2012-01-31 15:14:20 +01:00
2011-08-04 14:42:31 +02:00
2007-08-23 08:40:11 +00:00
2007-07-04 19:49:40 +00:00

Stuff used by several modules of GnuPG.

These directories use it:

gpg
sm
agent

These directories don't use it:

kbx