diff options
author | djm@openbsd.org <djm@openbsd.org> | 2020-02-28 01:06:05 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2020-02-28 12:27:41 +1100 |
commit | dd992520bed35387fc010239abe1bdc0c2665e38 (patch) | |
tree | d019a72919d796e608985131c1ed64f3a2d4bb3d | |
parent | b81e66dbe0345aef4717911abcb4f589fff33a0a (diff) |
upstream: better error message when trying to use a FIDO key
function and SecurityKeyProvider is empty
OpenBSD-Commit-ID: e56602c2ee8c82f835d30e4dc8ee2e4a7896be24
-rw-r--r-- | ssh-sk.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssh-sk.c,v 1.27 2020/02/06 22:30:54 naddy Exp $ */ | 1 | /* $OpenBSD: ssh-sk.c,v 1.28 2020/02/28 01:06:05 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2019 Google LLC | 3 | * Copyright (c) 2019 Google LLC |
4 | * | 4 | * |
@@ -100,6 +100,10 @@ sshsk_open(const char *path) | |||
100 | struct sshsk_provider *ret = NULL; | 100 | struct sshsk_provider *ret = NULL; |
101 | uint32_t version; | 101 | uint32_t version; |
102 | 102 | ||
103 | if (path == NULL || *path == '\0') { | ||
104 | error("No FIDO SecurityKeyProvider specified"); | ||
105 | return NULL; | ||
106 | } | ||
103 | if ((ret = calloc(1, sizeof(*ret))) == NULL) { | 107 | if ((ret = calloc(1, sizeof(*ret))) == NULL) { |
104 | error("%s: calloc failed", __func__); | 108 | error("%s: calloc failed", __func__); |
105 | return NULL; | 109 | return NULL; |