Small changes to make it work on non-C99 compilers

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1510 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
sth 2003-10-13 20:16:40 +00:00
parent a42044829c
commit b66e24bf55
5 changed files with 60 additions and 35 deletions

View File

@ -766,13 +766,18 @@ cflex_encode_public_key(struct sc_pkcs15_prkey_rsa *rsa,
}
struct sc_pkcs15init_operations sc_pkcs15init_cflex_operations = {
.erase_card = cflex_erase_card,
.create_dir = cflex_create_dir,
.create_domain = cflex_create_domain,
.select_pin_reference = cflex_select_pin_reference,
.create_pin = cflex_create_pin,
.create_key = cflex_create_key,
.generate_key = cflex_generate_key,
.store_key = cflex_store_key,
cflex_erase_card,
cflex_create_dir,
cflex_create_domain,
cflex_select_pin_reference,
cflex_create_pin,
NULL, /* select_key_reference */
cflex_create_key,
cflex_store_key,
cflex_generate_key,
NULL, /* init_app */
NULL, /* new_pin */
NULL, /* new_key */
NULL, /* miocos_new_file */
NULL /* old_generate_key*/
};

View File

@ -776,15 +776,18 @@ error(struct sc_profile *profile, const char *fmt, ...)
}
struct sc_pkcs15init_operations sc_pkcs15init_etoken_operations = {
.erase_card = etoken_erase,
.create_dir = etoken_create_dir,
.select_pin_reference = etoken_select_pin_reference,
.create_pin = etoken_create_pin,
.select_key_reference = etoken_select_key_reference,
.create_key = etoken_create_key,
.store_key = etoken_store_key,
//.new_pin = etoken_new_pin,
//.new_key = etoken_new_key,
.generate_key = etoken_generate_key
//.new_file = etoken_new_file,
etoken_erase,
etoken_create_dir,
NULL, /*create_domain */
etoken_select_pin_reference,
etoken_create_pin,
etoken_select_key_reference,
etoken_create_key,
etoken_store_key,
etoken_generate_key,
NULL, /* init_app */
NULL, /* new_pin */
NULL, /* new_key */
NULL, /* miocos_new_file */
NULL /* old_generate_key*/
};

View File

@ -1118,12 +1118,18 @@ debug(struct sc_profile *profile, const char *fmt, ...)
}
struct sc_pkcs15init_operations sc_pkcs15init_gpk_operations = {
.erase_card = gpk_erase_card,
.create_dir = gpk_create_dir,
.select_pin_reference = gpk_select_pin_reference,
.create_pin = gpk_create_pin,
.create_key = gpk_create_key,
.store_key = gpk_store_key,
// .new_key = gpk_new_key,
// .new_file = gpk_new_file,
gpk_erase_card,
gpk_create_dir, /* create_dir */
NULL, /* create_domain */
gpk_select_pin_reference,
gpk_create_pin,
NULL, /* select_key_reference */
gpk_create_key,
gpk_store_key,
NULL, /* generate_key */
NULL, /* init_app */
NULL, /*new_pin */
NULL, /* new_key */
NULL, /* new_file*/
NULL /* old_generate_key*/
};

View File

@ -120,8 +120,10 @@ extern struct sc_pkcs15init_operations sc_pkcs15init_cflex_operations;
extern struct sc_pkcs15init_operations sc_pkcs15init_etoken_operations;
static struct sc_pkcs15init_callbacks callbacks = {
.error = default_error_handler,
.debug = default_debug_handler
default_error_handler,
default_debug_handler,
NULL,
NULL
};
#define p15init_error callbacks.error

View File

@ -200,9 +200,18 @@ miocos_new_key(struct sc_profile *profile, struct sc_card *card,
}
struct sc_pkcs15init_operations sc_pkcs15init_miocos_operations = {
NULL,
.init_app = miocos_init_app,
.new_pin = miocos_new_pin,
.new_key = miocos_new_key,
.new_file = miocos_new_file,
NULL, /* erase_card */
NULL, /* create_dir */
NULL, /* create_domain */
NULL, /* select_pin_reference */
NULL, /* create_pin */
NULL, /* select_key_reference */
NULL, /* create_key */
NULL, /* store_key */
NULL, /* generate_key */
miocos_init_app,
miocos_new_pin,
miocos_new_key,
miocos_new_file,
NULL /* old_generate_key*/
};