summaryrefslogtreecommitdiff
path: root/authfd.c
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2002-03-22 03:51:06 +0000
committerBen Lindstrom <mouring@eviladmin.org>2002-03-22 03:51:06 +0000
commitba72d30aa541015c4e17c21cc1328c7db399d26a (patch)
tree48d275fba1025501485f2f67a6a3b6140a4e63ba /authfd.c
parent266ec63eb36e2d3154ead355ce67cdee5c9394a3 (diff)
downloadopenssh-git-ba72d30aa541015c4e17c21cc1328c7db399d26a.tar.gz
- rees@cvs.openbsd.org 2002/03/21 22:44:05
[authfd.c authfd.h ssh-add.c ssh-agent.c ssh.c] Add PIN-protection for secret key.
Diffstat (limited to 'authfd.c')
-rw-r--r--authfd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/authfd.c b/authfd.c
index fa764358..f3050d64 100644
--- a/authfd.c
+++ b/authfd.c
@@ -35,7 +35,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: authfd.c,v 1.48 2002/02/24 19:14:59 markus Exp $");
+RCSID("$OpenBSD: authfd.c,v 1.49 2002/03/21 22:44:05 rees Exp $");
#include <openssl/evp.h>
@@ -532,7 +532,7 @@ ssh_remove_identity(AuthenticationConnection *auth, Key *key)
}
int
-ssh_update_card(AuthenticationConnection *auth, int add, const char *reader_id)
+ssh_update_card(AuthenticationConnection *auth, int add, const char *reader_id, const char *pin)
{
Buffer msg;
int type;
@@ -541,6 +541,7 @@ ssh_update_card(AuthenticationConnection *auth, int add, const char *reader_id)
buffer_put_char(&msg, add ? SSH_AGENTC_ADD_SMARTCARD_KEY :
SSH_AGENTC_REMOVE_SMARTCARD_KEY);
buffer_put_cstring(&msg, reader_id);
+ buffer_put_cstring(&msg, pin);
if (ssh_request_reply(auth, &msg, &msg) == 0) {
buffer_free(&msg);
return 0;