diff options
author | djm@openbsd.org <djm@openbsd.org> | 2019-10-31 22:18:28 +0100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2019-10-31 23:46:09 +0100 |
commit | 884416bdb10468f1252e4d7c13d51b43dccba7f6 (patch) | |
tree | f81dc3ed23cddcda6163102363c5dc75a63430e6 /ssh.c | |
parent | upstream: Separate myproposal.h userauth pubkey types (diff) | |
download | openssh-884416bdb10468f1252e4d7c13d51b43dccba7f6.tar.xz openssh-884416bdb10468f1252e4d7c13d51b43dccba7f6.zip |
upstream: ssh client support for U2F/FIDO keys
OpenBSD-Commit-ID: eb2cfa6cf7419a1895e06e398ea6d41516c5b0bc
Diffstat (limited to 'ssh.c')
-rw-r--r-- | ssh.c | 18 |
1 files changed, 17 insertions, 1 deletions
@@ -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 @@ -1344,6 +1344,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) { |