summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/ssh-keygen.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/ssh/ssh-keygen.c')
-rw-r--r--usr.bin/ssh/ssh-keygen.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/usr.bin/ssh/ssh-keygen.c b/usr.bin/ssh/ssh-keygen.c
index 7d374362a22..002d3161ffc 100644
--- a/usr.bin/ssh/ssh-keygen.c
+++ b/usr.bin/ssh/ssh-keygen.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-keygen.c,v 1.371 2019/11/25 00:54:23 djm Exp $ */
+/* $OpenBSD: ssh-keygen.c,v 1.372 2019/11/25 00:55:58 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -2994,13 +2994,19 @@ main(int argc, char **argv)
case 'x':
if (*optarg == '\0')
fatal("Missing security key flags");
- ull = strtoull(optarg, &ep, 0);
- if (*ep != '\0')
- fatal("Security key flags \"%s\" is not a "
- "number", optarg);
- if (ull > 0xff)
- fatal("Invalid security key flags 0x%llx", ull);
- sk_flags = (uint8_t)ull;
+ if (strcasecmp(optarg, "no-touch-required") == 0)
+ sk_flags &= ~SSH_SK_USER_PRESENCE_REQD;
+ else {
+ ull = strtoull(optarg, &ep, 0);
+ if (*ep != '\0')
+ fatal("Security key flags \"%s\" is "
+ "not a number", optarg);
+ if (ull > 0xff) {
+ fatal("Invalid security key "
+ "flags 0x%llx", ull);
+ }
+ sk_flags = (uint8_t)ull;
+ }
break;
case 'z':
errno = 0;