summaryrefslogtreecommitdiff
path: root/authfd.c
diff options
context:
space:
mode:
Diffstat (limited to 'authfd.c')
-rw-r--r--authfd.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/authfd.c b/authfd.c
index dfa33a978..b3c0d9d87 100644
--- a/authfd.c
+++ b/authfd.c
@@ -35,7 +35,7 @@
35 */ 35 */
36 36
37#include "includes.h" 37#include "includes.h"
38RCSID("$OpenBSD: authfd.c,v 1.41 2001/06/23 15:12:17 itojun Exp $"); 38RCSID("$OpenBSD: authfd.c,v 1.42 2001/06/26 04:59:59 markus Exp $");
39 39
40#include <openssl/evp.h> 40#include <openssl/evp.h>
41 41
@@ -534,6 +534,25 @@ ssh_remove_identity(AuthenticationConnection *auth, Key *key)
534 return decode_reply(type); 534 return decode_reply(type);
535} 535}
536 536
537int
538ssh_update_card(AuthenticationConnection *auth, int add, int reader_id)
539{
540 Buffer msg;
541 int type;
542
543 buffer_init(&msg);
544 buffer_put_char(&msg, add ? SSH_AGENTC_ADD_SMARTCARD_KEY :
545 SSH_AGENTC_REMOVE_SMARTCARD_KEY);
546 buffer_put_int(&msg, reader_id);
547 if (ssh_request_reply(auth, &msg, &msg) == 0) {
548 buffer_free(&msg);
549 return 0;
550 }
551 type = buffer_get_char(&msg);
552 buffer_free(&msg);
553 return decode_reply(type);
554}
555
537/* 556/*
538 * Removes all identities from the agent. This call is not meant to be used 557 * Removes all identities from the agent. This call is not meant to be used
539 * by normal applications. 558 * by normal applications.