diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2020-02-28 01:06:06 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2020-02-28 01:06:06 +0000 |
commit | d60bbce63d65149353b52bb046b956336b1acd9e (patch) | |
tree | 6b5da1b06d306e798553cc2850a3221e8cfc53cf | |
parent | 7da3ec5f54d0bb0ff48d7b41845a07e075c9e280 (diff) |
better error message when trying to use a FIDO key function and
SecurityKeyProvider is empty
-rw-r--r-- | usr.bin/ssh/ssh-sk.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.bin/ssh/ssh-sk.c b/usr.bin/ssh/ssh-sk.c index 0cc6afa5282..85806ab33ba 100644 --- a/usr.bin/ssh/ssh-sk.c +++ b/usr.bin/ssh/ssh-sk.c @@ -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 * @@ -94,6 +94,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; |