summaryrefslogtreecommitdiff
path: root/ssh.c
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2019-10-31 21:18:28 +0000
committerDamien Miller <djm@mindrot.org>2019-11-01 09:46:09 +1100
commit884416bdb10468f1252e4d7c13d51b43dccba7f6 (patch)
treef81dc3ed23cddcda6163102363c5dc75a63430e6 /ssh.c
parent01a0670f69c5b86e471e033b92145d6c7cc77c58 (diff)
upstream: ssh client support for U2F/FIDO keys
OpenBSD-Commit-ID: eb2cfa6cf7419a1895e06e398ea6d41516c5b0bc
Diffstat (limited to 'ssh.c')
-rw-r--r--ssh.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/ssh.c b/ssh.c
index ee51823cd..4736b5dd0 100644
--- a/ssh.c
+++ b/ssh.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssh.c,v 1.507 2019/09/13 04:27:35 djm Exp $ */ 1/* $OpenBSD: ssh.c,v 1.508 2019/10/31 21:18:28 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
@@ -1344,6 +1344,22 @@ main(int ac, char **av)
1344 exit(0); 1344 exit(0);
1345 } 1345 }
1346 1346
1347 /* Expand SecurityKeyProvider if it refers to an environment variable */
1348 if (options.sk_provider != NULL && *options.sk_provider == '$' &&
1349 strlen(options.sk_provider) > 1) {
1350 if ((cp = getenv(options.sk_provider + 1)) == NULL) {
1351 debug("Security key provider %s did not resolve; "
1352 "disabling", options.sk_provider);
1353 free(options.sk_provider);
1354 options.sk_provider = NULL;
1355 } else {
1356 debug2("resolved SecurityKeyProvider %s => %s",
1357 options.sk_provider, cp);
1358 free(options.sk_provider);
1359 options.sk_provider = xstrdup(cp);
1360 }
1361 }
1362
1347 if (muxclient_command != 0 && options.control_path == NULL) 1363 if (muxclient_command != 0 && options.control_path == NULL)
1348 fatal("No ControlPath specified for \"-O\" command"); 1364 fatal("No ControlPath specified for \"-O\" command");
1349 if (options.control_path != NULL) { 1365 if (options.control_path != NULL) {