diff options
author | djm@openbsd.org <djm@openbsd.org> | 2020-02-28 02:06:05 +0100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2020-02-28 02:27:41 +0100 |
commit | dd992520bed35387fc010239abe1bdc0c2665e38 (patch) | |
tree | d019a72919d796e608985131c1ed64f3a2d4bb3d /ssh-sk.c | |
parent | upstream: Drop leading space from line count that was confusing (diff) | |
download | openssh-dd992520bed35387fc010239abe1bdc0c2665e38.tar.xz openssh-dd992520bed35387fc010239abe1bdc0c2665e38.zip |
upstream: better error message when trying to use a FIDO key
function and SecurityKeyProvider is empty
OpenBSD-Commit-ID: e56602c2ee8c82f835d30e4dc8ee2e4a7896be24
Diffstat (limited to '')
-rw-r--r-- | ssh-sk.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -1,4 +1,4 @@ -/* $OpenBSD: ssh-sk.c,v 1.27 2020/02/06 22:30:54 naddy Exp $ */ +/* $OpenBSD: ssh-sk.c,v 1.28 2020/02/28 01:06:05 djm Exp $ */ /* * Copyright (c) 2019 Google LLC * @@ -100,6 +100,10 @@ sshsk_open(const char *path) struct sshsk_provider *ret = NULL; uint32_t version; + if (path == NULL || *path == '\0') { + error("No FIDO SecurityKeyProvider specified"); + return NULL; + } if ((ret = calloc(1, sizeof(*ret))) == NULL) { error("%s: calloc failed", __func__); return NULL; |