version 1.66, 2003/03/05 22:33:43 |
version 1.66.2.2, 2004/03/04 18:18:16 |
|
|
if (private != NULL) |
if (private != NULL) |
break; |
break; |
clear_pass(); |
clear_pass(); |
strlcpy(msg, "Bad passphrase, try again: ", sizeof msg); |
snprintf(msg, sizeof msg, |
|
"Bad passphrase, try again for %.200s: ", comment); |
} |
} |
} |
} |
|
|
if (ssh_add_identity_constrained(ac, private, comment, lifetime, |
if (ssh_add_identity_constrained(ac, private, comment, lifetime, |
confirm)) { |
confirm)) { |
fprintf(stderr, "Identity added: %s (%s)\n", filename, comment); |
fprintf(stderr, "Identity added: %s (%s)\n", filename, comment); |
ret = 0; |
ret = 0; |
if (lifetime != 0) |
if (lifetime != 0) |
fprintf(stderr, |
fprintf(stderr, |
"Lifetime set to %d seconds\n", lifetime); |
"Lifetime set to %d seconds\n", lifetime); |
if (confirm != 0) |
if (confirm != 0) |
fprintf(stderr, |
fprintf(stderr, |
"The user has to confirm each use of the key\n"); |
"The user has to confirm each use of the key\n"); |
} else if (ssh_add_identity(ac, private, comment)) { |
} else if (ssh_add_identity(ac, private, comment)) { |
|
|
if (pin == NULL) |
if (pin == NULL) |
return -1; |
return -1; |
|
|
if (ssh_update_card(ac, add, id, pin)) { |
if (ssh_update_card(ac, add, id, pin, lifetime, confirm)) { |
fprintf(stderr, "Card %s: %s\n", |
fprintf(stderr, "Card %s: %s\n", |
add ? "added" : "removed", id); |
add ? "added" : "removed", id); |
ret = 0; |
ret = 0; |