summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/ssh.c
diff options
context:
space:
mode:
authordjm <djm@openbsd.org>2019-10-31 21:18:28 +0000
committerdjm <djm@openbsd.org>2019-10-31 21:18:28 +0000
commite7ac10bae64c60af6ba2ce73fd12a593614920a0 (patch)
treee48abddb0daef458f37cab61c97309ec277723e9 /usr.bin/ssh/ssh.c
parentSeparate myproposal.h userauth pubkey types (diff)
downloadwireguard-openbsd-e7ac10bae64c60af6ba2ce73fd12a593614920a0.tar.xz
wireguard-openbsd-e7ac10bae64c60af6ba2ce73fd12a593614920a0.zip
ssh client support for U2F/FIDO keys
Diffstat (limited to 'usr.bin/ssh/ssh.c')
-rw-r--r--usr.bin/ssh/ssh.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/usr.bin/ssh/ssh.c b/usr.bin/ssh/ssh.c
index 282d31f1a4e..c4f7f6a90e1 100644
--- a/usr.bin/ssh/ssh.c
+++ b/usr.bin/ssh/ssh.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh.c,v 1.507 2019/09/13 04:27:35 djm Exp $ */
+/* $OpenBSD: ssh.c,v 1.508 2019/10/31 21:18:28 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -1323,6 +1323,22 @@ main(int ac, char **av)
exit(0);
}
+ /* Expand SecurityKeyProvider if it refers to an environment variable */
+ if (options.sk_provider != NULL && *options.sk_provider == '$' &&
+ strlen(options.sk_provider) > 1) {
+ if ((cp = getenv(options.sk_provider + 1)) == NULL) {
+ debug("Security key provider %s did not resolve; "
+ "disabling", options.sk_provider);
+ free(options.sk_provider);
+ options.sk_provider = NULL;
+ } else {
+ debug2("resolved SecurityKeyProvider %s => %s",
+ options.sk_provider, cp);
+ free(options.sk_provider);
+ options.sk_provider = xstrdup(cp);
+ }
+ }
+
if (muxclient_command != 0 && options.control_path == NULL)
fatal("No ControlPath specified for \"-O\" command");
if (options.control_path != NULL) {