summaryrefslogtreecommitdiffstats
path: root/scd/iso7816.h
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2005-11-28 12:52:25 +0100
committerWerner Koch <wk@gnupg.org>2005-11-28 12:52:25 +0100
commit6a13cf2c3dbacb9f3afd3f64e5d0c78b9c0e77e9 (patch)
tree86758522ae4f5ed44068bc6dbf5d2adb068a3ea1 /scd/iso7816.h
parentAdd translations (diff)
downloadgnupg2-6a13cf2c3dbacb9f3afd3f64e5d0c78b9c0e77e9.tar.xz
gnupg2-6a13cf2c3dbacb9f3afd3f64e5d0c78b9c0e77e9.zip
Preparing an interim release
Diffstat (limited to 'scd/iso7816.h')
-rw-r--r--scd/iso7816.h35
1 files changed, 34 insertions, 1 deletions
diff --git a/scd/iso7816.h b/scd/iso7816.h
index 04c7ae63e..8f7907405 100644
--- a/scd/iso7816.h
+++ b/scd/iso7816.h
@@ -28,10 +28,30 @@
#include "cardglue.h"
#endif
+/* Command codes used by iso7816_check_keypad. */
+#define ISO7816_VERIFY 0x20
+#define ISO7816_CHANGE_REFERENCE_DATA 0x24
+#define ISO7816_RESET_RETRY_COUNTER 0x2C
+
+
+/* Information to be passed to keypad equipped readers. See
+ ccid-driver.c for details. */
+struct iso7816_pininfo_s
+{
+ int mode; /* A mode of 0 means: Do not use the keypad. */
+ int minlen;
+ int maxlen;
+ int padlen;
+ int padchar;
+};
+typedef struct iso7816_pininfo_s iso7816_pininfo_t;
+
+
gpg_error_t iso7816_map_sw (int sw);
gpg_error_t iso7816_select_application (int slot,
- const char *aid, size_t aidlen);
+ const char *aid, size_t aidlen,
+ unsigned int flags);
gpg_error_t iso7816_select_file (int slot, int tag, int is_dir,
unsigned char **result, size_t *resultlen);
gpg_error_t iso7816_select_path (int slot,
@@ -39,13 +59,26 @@ gpg_error_t iso7816_select_path (int slot,
unsigned char **result, size_t *resultlen);
gpg_error_t iso7816_list_directory (int slot, int list_dirs,
unsigned char **result, size_t *resultlen);
+gpg_error_t iso7816_check_keypad (int slot, int command,
+ iso7816_pininfo_t *pininfo);
gpg_error_t iso7816_verify (int slot,
int chvno, const char *chv, size_t chvlen);
+gpg_error_t iso7816_verify_kp (int slot,
+ int chvno, const char *chv, size_t chvlen,
+ iso7816_pininfo_t *pininfo);
gpg_error_t iso7816_change_reference_data (int slot, int chvno,
const char *oldchv, size_t oldchvlen,
const char *newchv, size_t newchvlen);
+gpg_error_t iso7816_change_reference_data_kp (int slot, int chvno,
+ const char *oldchv, size_t oldchvlen,
+ const char *newchv, size_t newchvlen,
+ iso7816_pininfo_t *pininfo);
gpg_error_t iso7816_reset_retry_counter (int slot, int chvno,
const char *newchv, size_t newchvlen);
+gpg_error_t iso7816_reset_retry_counter_kp (int slot, int chvno,
+ const char *newchv,
+ size_t newchvlen,
+ iso7816_pininfo_t *pininfo);
gpg_error_t iso7816_get_data (int slot, int tag,
unsigned char **result, size_t *resultlen);
gpg_error_t iso7816_put_data (int slot, int tag,