mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
* card-common.h (struct p15_private_s): Forward declaration. Add
it to card_ctx_s. * card.c (card_close): Make sure private data is released. * card-p15.c (p15_release_private_data): New. (init_private_data): New to work around an OpenSC weirdness. (p15_enum_keypairs): Do an OpenSC get_objects only once.
This commit is contained in:
parent
e78e69f37a
commit
fd2f1c8aa3
5 changed files with 83 additions and 17 deletions
|
@ -21,12 +21,16 @@
|
|||
#ifndef CARD_COMMON_H
|
||||
#define CARD_COMMON_H
|
||||
|
||||
/* Declaration of private data structure used by card-p15.c */
|
||||
struct p15private_s;
|
||||
|
||||
|
||||
struct card_ctx_s {
|
||||
int reader; /* used reader */
|
||||
struct sc_context *ctx;
|
||||
struct sc_card *scard;
|
||||
struct sc_pkcs15_card *p15card; /* only if there is a pkcs15 application */
|
||||
struct p15private_s *p15priv; /* private data used by card-p15.c */
|
||||
|
||||
struct {
|
||||
int initialized; /* the card has been initialied and the function
|
||||
|
@ -57,7 +61,8 @@ struct card_ctx_s {
|
|||
int map_sc_err (int rc);
|
||||
int card_help_get_keygrip (KsbaCert cert, unsigned char *array);
|
||||
|
||||
|
||||
/*-- card-15.c --*/
|
||||
void p15_release_private_data (CARD card);
|
||||
|
||||
/* constructors */
|
||||
void card_p15_bind (CARD card);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue