diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | ssh-add.c | 15 |
2 files changed, 14 insertions, 6 deletions
@@ -1,6 +1,11 @@ | |||
1 | 20131229 | 1 | 20131229 |
2 | - (djm) [loginrec.c] Check for username truncation when looking up lastlog | 2 | - (djm) [loginrec.c] Check for username truncation when looking up lastlog |
3 | entries | 3 | entries |
4 | - (djm) OpenBSD CVS Sync | ||
5 | - djm@cvs.openbsd.org 2013/12/19 00:10:30 | ||
6 | [ssh-add.c] | ||
7 | skip requesting smartcard PIN when removing keys from agent; bz#2187 | ||
8 | patch from jay AT slushpupie.com; ok dtucker | ||
4 | 9 | ||
5 | 20131221 | 10 | 20131221 |
6 | - (dtucker) [regress/keytype.sh] Actually test ecdsa key types. | 11 | - (dtucker) [regress/keytype.sh] Actually test ecdsa key types. |
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssh-add.c,v 1.107 2013/12/15 18:17:26 pascal Exp $ */ | 1 | /* $OpenBSD: ssh-add.c,v 1.108 2013/12/19 00:10:30 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
@@ -293,14 +293,17 @@ add_file(AuthenticationConnection *ac, const char *filename, int key_only) | |||
293 | static int | 293 | static int |
294 | update_card(AuthenticationConnection *ac, int add, const char *id) | 294 | update_card(AuthenticationConnection *ac, int add, const char *id) |
295 | { | 295 | { |
296 | char *pin; | 296 | char *pin = NULL; |
297 | int ret = -1; | 297 | int ret = -1; |
298 | 298 | ||
299 | pin = read_passphrase("Enter passphrase for PKCS#11: ", RP_ALLOW_STDIN); | 299 | if (add) { |
300 | if (pin == NULL) | 300 | if ((pin = read_passphrase("Enter passphrase for PKCS#11: ", |
301 | return -1; | 301 | RP_ALLOW_STDIN)) == NULL) |
302 | return -1; | ||
303 | } | ||
302 | 304 | ||
303 | if (ssh_update_card(ac, add, id, pin, lifetime, confirm)) { | 305 | if (ssh_update_card(ac, add, id, pin == NULL ? "" : pin, |
306 | lifetime, confirm)) { | ||
304 | fprintf(stderr, "Card %s: %s\n", | 307 | fprintf(stderr, "Card %s: %s\n", |
305 | add ? "added" : "removed", id); | 308 | add ? "added" : "removed", id); |
306 | ret = 0; | 309 | ret = 0; |