diff options
author | djm@openbsd.org <djm@openbsd.org> | 2019-10-31 21:23:19 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2019-11-01 09:46:10 +1100 |
commit | 9a14c64c38fc14d0029f1c7bc70cf62cc7f0fdf9 (patch) | |
tree | d79bb8d66eeba8e353f18dac919cb65d0ad896c7 /ssh-agent.c | |
parent | 07da39f71d36fb547749a5b16aa8892e621a7e4a (diff) |
upstream: Refactor signing - use sshkey_sign for everything,
including the new U2F signatures.
Don't use sshsk_ecdsa_sign() directly, instead make it reachable via
sshkey_sign() like all other signature operations. This means that
we need to add a provider argument to sshkey_sign(), so most of this
change is mechanically adding that.
Suggested by / ok markus@
OpenBSD-Commit-ID: d5193a03fcfa895085d91b2b83d984a9fde76c8c
Diffstat (limited to 'ssh-agent.c')
-rw-r--r-- | ssh-agent.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/ssh-agent.c b/ssh-agent.c index 6bf9536fb..07f19c53a 100644 --- a/ssh-agent.c +++ b/ssh-agent.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssh-agent.c,v 1.238 2019/10/31 21:22:01 djm Exp $ */ | 1 | /* $OpenBSD: ssh-agent.c,v 1.239 2019/10/31 21:23:19 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
@@ -430,12 +430,13 @@ process_sign_request2(SocketEntry *e) | |||
430 | if ((r = provider_sign(id->sk_provider, id->key, &signature, | 430 | if ((r = provider_sign(id->sk_provider, id->key, &signature, |
431 | &slen, data, dlen, agent_decode_alg(key, flags), | 431 | &slen, data, dlen, agent_decode_alg(key, flags), |
432 | compat)) != 0) { | 432 | compat)) != 0) { |
433 | error("%s: sshkey_sign: %s", __func__, ssh_err(r)); | 433 | error("%s: sign: %s", __func__, ssh_err(r)); |
434 | goto send; | 434 | goto send; |
435 | } | 435 | } |
436 | } else { | 436 | } else { |
437 | if ((r = sshkey_sign(id->key, &signature, &slen, | 437 | if ((r = sshkey_sign(id->key, &signature, &slen, |
438 | data, dlen, agent_decode_alg(key, flags), compat)) != 0) { | 438 | data, dlen, agent_decode_alg(key, flags), |
439 | NULL, compat)) != 0) { | ||
439 | error("%s: sshkey_sign: %s", __func__, ssh_err(r)); | 440 | error("%s: sshkey_sign: %s", __func__, ssh_err(r)); |
440 | goto send; | 441 | goto send; |
441 | } | 442 | } |