summaryrefslogtreecommitdiff
path: root/vcard_emul.h
diff options
context:
space:
mode:
authorRobert Relyea <rrelyea@redhat.com>2010-08-05 10:18:26 +0300
committerAlon Levy <alevy@redhat.com>2010-08-05 10:18:26 +0300
commitd561895862eb34615cc3812a57af493ace266607 (patch)
tree8f84ad991b14e69c5394d1abb87cf69e4d07c407 /vcard_emul.h
parentb953e440c2b323ee8cdb35c74f7886fd9c547f16 (diff)
README, soft card updates, pin fix, applet reset, manual insert and remove.
1. Updated and more detailed README. I presume this would be helpful in putting things upstream. 2. I've added a parser to take some arguments to initialize soft cards. Unfortunately it's completely untested, so I haven't hooked it up. 3. Patches to fix two of the problems you found this morning (pin problems and no applet reset). 4. A little more indirection so that new card types can be added without touching a lot of code (README has instructions). This added 2 new files. 5. I've added the ability to manually insert and remove inserted cards from vscclient.c as commands from standard in. This too is untested, so if things go south, this is the first patch to back out.
Diffstat (limited to 'vcard_emul.h')
-rw-r--r--vcard_emul.h27
1 files changed, 4 insertions, 23 deletions
diff --git a/vcard_emul.h b/vcard_emul.h
index 388deda..9adfc10 100644
--- a/vcard_emul.h
+++ b/vcard_emul.h
@@ -12,36 +12,17 @@
#include "card_7816t.h"
#include "vcard.h"
+#include "vcard_emul_type.h"
/*
* types
*/
typedef enum {
- VCARD_EMUL_NONE =0,
- VCARD_EMUL_CAC
-} VCardEmulType;
-
-typedef enum {
- VCARD_EMUL_OK =0,
- VCARD_EMUL_FAIL
+ VCARD_EMUL_OK =0,
+ VCARD_EMUL_FAIL
} VCardEmulError;
-typedef struct VirtualReaderOptionsStruct VirtualReaderOptions;
-
-struct VirtualReaderOptionsStruct {
- char *name;
- VCardEmulType card_type;
- char **cert_name;
- int cert_count;
-};
-
typedef struct VCardEmulOptionsStruct VCardEmulOptions;
-struct VCardEmulOptionsStruct {
- void *nss_db;
- VirtualReaderOptions *vreader;
- int vreader_count;
- VCardEmulType hw_card_type;
-};
/*
* Login functions
@@ -58,7 +39,7 @@ VCard7816Status vcard_emul_login(VCard *card, unsigned char *pin, int pin_len);
void vcard_emul_delete_key(VCardKey *key);
/* RSA sign/decrypt with the key, signature happens 'in place' */
VCard7816Status vcard_emul_rsa_op(VCard *card, VCardKey *key,
- unsigned char *buffer, int buffer_size);
+ unsigned char *buffer, int buffer_size);
void vcard_emul_reset(VCard *card, VCardPower power);
void vcard_emul_get_atr(VCard *card, unsigned char *atr, int *atr_len);