summaryrefslogtreecommitdiff
path: root/ssh-keygen.c
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2020-01-25 23:13:09 +0000
committerDamien Miller <djm@mindrot.org>2020-01-26 10:18:42 +1100
commit59d01f1d720ebede4da42882f592d1093dac7adc (patch)
treed79871dcec88b95a6df86dd6821cbdf5e467f719 /ssh-keygen.c
parent99aa8035554ddb976348d2a9253ab3653019728d (diff)
upstream: improve the error message for u2f enrollment errors by
making ssh-keygen be solely responsible for printing the error message and convertint some more common error responses from the middleware to a useful ssherr.h status code. more detail remains visible via -v of course. also remove indepedent copy of sk-api.h declarations in sk-usbhid.c and just include it. feedback & ok markus@ OpenBSD-Commit-ID: a4a8ffa870d9a3e0cfd76544bcdeef5c9fb1f1bb
Diffstat (limited to 'ssh-keygen.c')
-rw-r--r--ssh-keygen.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ssh-keygen.c b/ssh-keygen.c
index 29013a20f..8df55f2c2 100644
--- a/ssh-keygen.c
+++ b/ssh-keygen.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssh-keygen.c,v 1.393 2020/01/25 23:02:13 djm Exp $ */ 1/* $OpenBSD: ssh-keygen.c,v 1.394 2020/01/25 23:13:09 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
@@ -3579,7 +3579,7 @@ main(int argc, char **argv)
3579 if (r == 0) 3579 if (r == 0)
3580 break; 3580 break;
3581 if (r != SSH_ERR_KEY_WRONG_PASSPHRASE) 3581 if (r != SSH_ERR_KEY_WRONG_PASSPHRASE)
3582 exit(1); /* error message already printed */ 3582 fatal("Key enrollment failed: %s", ssh_err(r));
3583 if (passphrase != NULL) 3583 if (passphrase != NULL)
3584 freezero(passphrase, strlen(passphrase)); 3584 freezero(passphrase, strlen(passphrase));
3585 passphrase = read_passphrase("Enter PIN for security " 3585 passphrase = read_passphrase("Enter PIN for security "