pkcs15: include MD data into sc_pkcs15 data type
New data are used to support the card specific minidriver on-card files. Beeing included into internal pkcs15 data type, these new data are accessible at the all frameworks: emulation of pkcs15 and pkcs15init, minidriver.
This commit is contained in:
parent
411cbfb403
commit
40570143b9
|
@ -778,6 +778,11 @@ void sc_pkcs15_card_free(struct sc_pkcs15_card *p15card)
|
||||||
if (p15card->ops.clear)
|
if (p15card->ops.clear)
|
||||||
p15card->ops.clear(p15card);
|
p15card->ops.clear(p15card);
|
||||||
|
|
||||||
|
/* For more complicated MD data a dedicated release procedure
|
||||||
|
* has to be implemented. */
|
||||||
|
if (p15card->md_data)
|
||||||
|
free(p15card->md_data);
|
||||||
|
|
||||||
sc_pkcs15_remove_objects(p15card);
|
sc_pkcs15_remove_objects(p15card);
|
||||||
sc_pkcs15_remove_dfs(p15card);
|
sc_pkcs15_remove_dfs(p15card);
|
||||||
sc_pkcs15_free_unusedspace(p15card);
|
sc_pkcs15_free_unusedspace(p15card);
|
||||||
|
|
|
@ -412,6 +412,30 @@ struct sc_md_cmap_record {
|
||||||
unsigned keysize_keyexchange;
|
unsigned keysize_keyexchange;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* From Windows Smart Card Minidriver Specification
|
||||||
|
* Version 7.06
|
||||||
|
*
|
||||||
|
* typedef struct _CARD_CACHE_FILE_FORMAT
|
||||||
|
* {
|
||||||
|
* BYTE bVersion; // Cache version
|
||||||
|
* BYTE bPinsFreshness; // Card PIN
|
||||||
|
* WORD wContainersFreshness;
|
||||||
|
* WORD wFilesFreshness;
|
||||||
|
* } CARD_CACHE_FILE_FORMAT, *PCARD_CACHE_FILE_FORMAT;
|
||||||
|
*/
|
||||||
|
struct sc_md_cardcf {
|
||||||
|
unsigned char version;
|
||||||
|
unsigned char pin_freshness;
|
||||||
|
unsigned cont_freshness;
|
||||||
|
unsigned files_freshness;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
struct sc_md_data {
|
||||||
|
struct sc_md_cardcf cardcf;
|
||||||
|
void *prop_data;
|
||||||
|
};
|
||||||
|
|
||||||
struct sc_pkcs15_prkey_info {
|
struct sc_pkcs15_prkey_info {
|
||||||
struct sc_pkcs15_id id; /* correlates to public certificate id */
|
struct sc_pkcs15_id id; /* correlates to public certificate id */
|
||||||
unsigned int usage, access_flags;
|
unsigned int usage, access_flags;
|
||||||
|
@ -628,7 +652,8 @@ typedef struct sc_pkcs15_card {
|
||||||
|
|
||||||
unsigned int magic;
|
unsigned int magic;
|
||||||
|
|
||||||
void *dll_handle; /* shared lib for emulated cards */
|
void *dll_handle; /* shared lib for emulated cards */
|
||||||
|
struct sc_md_data *md_data; /* minidriver specific data */
|
||||||
|
|
||||||
struct sc_pkcs15_operations ops;
|
struct sc_pkcs15_operations ops;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue