summaryrefslogtreecommitdiff
path: root/ssh-keygen.c
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2020-02-04 09:58:04 +0000
committerDamien Miller <djm@mindrot.org>2020-02-04 21:08:10 +1100
commitd596b1d30dc158915a3979fa409d21ff2465b6ee (patch)
treec7c5d1c14cbd5e2e2448043d69b4dc383c56effb /ssh-keygen.c
parent501f3582438cb2cb1cb92be0f17be490ae96fb23 (diff)
upstream: require FIDO application strings to start with "ssh:"; ok
markus@ OpenBSD-Commit-ID: 94e9c1c066d42b76f035a3d58250a32b14000afb
Diffstat (limited to 'ssh-keygen.c')
-rw-r--r--ssh-keygen.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/ssh-keygen.c b/ssh-keygen.c
index 4ee43ab98..2a64622c1 100644
--- a/ssh-keygen.c
+++ b/ssh-keygen.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssh-keygen.c,v 1.395 2020/01/28 08:01:34 djm Exp $ */ 1/* $OpenBSD: ssh-keygen.c,v 1.396 2020/02/04 09:58:04 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -3572,6 +3572,10 @@ main(int argc, char **argv)
3572 } else if (strncasecmp(opts[i], 3572 } else if (strncasecmp(opts[i],
3573 "application=", 12) == 0) { 3573 "application=", 12) == 0) {
3574 sk_application = xstrdup(opts[i] + 12); 3574 sk_application = xstrdup(opts[i] + 12);
3575 if (strncmp(sk_application, "ssh:", 4) != 0) {
3576 fatal("FIDO application string must "
3577 "begin with \"ssh:\"");
3578 }
3575 } else { 3579 } else {
3576 fatal("Option \"%s\" is unsupported for " 3580 fatal("Option \"%s\" is unsupported for "
3577 "FIDO authenticator enrollment", opts[i]); 3581 "FIDO authenticator enrollment", opts[i]);