summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/ssh-add.c
diff options
context:
space:
mode:
authordjm <djm@openbsd.org>2020-01-06 02:00:46 +0000
committerdjm <djm@openbsd.org>2020-01-06 02:00:46 +0000
commita0caf565a734d3114ae5162bd03cff0ef863f7ee (patch)
treefbd1b691792f6812780b54fe39fa45e259e8b4b8 /usr.bin/ssh/ssh-add.c
parentCommon function to free key bindings. (diff)
downloadwireguard-openbsd-a0caf565a734d3114ae5162bd03cff0ef863f7ee.tar.xz
wireguard-openbsd-a0caf565a734d3114ae5162bd03cff0ef863f7ee.zip
Extends the SK API to accept a set of key/value options for all
operations. These are intended to future-proof the API a little by making it easier to specify additional fields for without having to change the API version for each. At present, only two options are defined: one to explicitly specify the device for an operation (rather than accepting the middleware's autoselection) and another to specify the FIDO2 username that may be used when generating a resident key. These new options may be invoked at key generation time via ssh-keygen -O This also implements a suggestion from Markus to avoid "int" in favour of uint32_t for the algorithm argument in the API, to make implementation of ssh-sk-client/helper a little easier. feedback, fixes and ok markus@
Diffstat (limited to 'usr.bin/ssh/ssh-add.c')
-rw-r--r--usr.bin/ssh/ssh-add.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/ssh/ssh-add.c b/usr.bin/ssh/ssh-add.c
index d60536fd522..e6c5cd92d54 100644
--- a/usr.bin/ssh/ssh-add.c
+++ b/usr.bin/ssh/ssh-add.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-add.c,v 1.148 2019/12/30 09:22:49 djm Exp $ */
+/* $OpenBSD: ssh-add.c,v 1.149 2020/01/06 02:00:46 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -542,7 +542,8 @@ load_resident_keys(int agent_fd, const char *skprovider, int qflag)
char *fp;
pass = read_passphrase("Enter PIN for security key: ", RP_ALLOW_STDIN);
- if ((r = sshsk_load_resident(skprovider, pass, &keys, &nkeys)) != 0) {
+ if ((r = sshsk_load_resident(skprovider, NULL, pass,
+ &keys, &nkeys)) != 0) {
error("Unable to load resident keys: %s", ssh_err(r));
return r;
}