libopensc: extend DDO data type with the parsed 'aid', 'oid' and 'iid' members
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@5068 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
parent
b2d885fe34
commit
8ee55a38b3
|
@ -210,7 +210,7 @@ typedef struct sc_app_info {
|
|||
char *label;
|
||||
|
||||
struct sc_aid aid;
|
||||
struct sc_lv_data ddo;
|
||||
struct sc_ddo ddo;
|
||||
|
||||
struct sc_path path;
|
||||
|
||||
|
@ -1157,6 +1157,8 @@ int sc_parse_ef_atr(sc_card_t *card);
|
|||
void sc_free_ef_atr(sc_card_t *card);
|
||||
int sc_update_dir(sc_card_t *card, sc_app_info_t *app);
|
||||
|
||||
void sc_print_cache(struct sc_card *card);
|
||||
|
||||
struct sc_algorithm_info * sc_card_find_rsa_alg(sc_card_t *card,
|
||||
unsigned int key_length);
|
||||
struct sc_algorithm_info * sc_card_find_ec_alg(sc_card_t *card,
|
||||
|
|
|
@ -36,6 +36,7 @@ typedef unsigned char u8;
|
|||
#define SC_MAX_PIN_SIZE 256 /* OpenPGP card has 254 max */
|
||||
#define SC_MAX_ATR_SIZE 33
|
||||
#define SC_MAX_AID_SIZE 16
|
||||
#define SC_MAX_IIN_SIZE 10
|
||||
#define SC_MAX_OBJECT_ID_OCTETS 16
|
||||
#define SC_MAX_PATH_SIZE 16
|
||||
#define SC_MAX_PATH_STRING_SIZE (SC_MAX_PATH_SIZE * 2 + 1)
|
||||
|
@ -73,6 +74,22 @@ struct sc_atr {
|
|||
size_t len;
|
||||
};
|
||||
|
||||
/* Issuer ID */
|
||||
struct sc_iid {
|
||||
unsigned char value[SC_MAX_IIN_SIZE];
|
||||
size_t len;
|
||||
};
|
||||
|
||||
/* Discretionary ASN.1 data object */
|
||||
struct sc_ddo {
|
||||
struct sc_aid aid;
|
||||
struct sc_iid iid;
|
||||
struct sc_object_id oid;
|
||||
|
||||
size_t len;
|
||||
unsigned char *value;
|
||||
};
|
||||
|
||||
#define SC_PATH_TYPE_FILE_ID 0
|
||||
#define SC_PATH_TYPE_DF_NAME 1
|
||||
#define SC_PATH_TYPE_PATH 2
|
||||
|
@ -156,7 +173,6 @@ struct sc_crt {
|
|||
|
||||
#define SC_AC_KEY_REF_NONE 0xFFFFFFFF
|
||||
|
||||
|
||||
typedef struct sc_acl_entry {
|
||||
unsigned int method; /* See SC_AC_* */
|
||||
unsigned int key_ref; /* SC_AC_KEY_REF_NONE or an integer */
|
||||
|
@ -166,7 +182,6 @@ typedef struct sc_acl_entry {
|
|||
struct sc_acl_entry *next;
|
||||
} sc_acl_entry_t;
|
||||
|
||||
|
||||
/* File types */
|
||||
#define SC_FILE_TYPE_DF 0x04
|
||||
#define SC_FILE_TYPE_INTERNAL_EF 0x03
|
||||
|
|
Loading…
Reference in New Issue