completely initialize the struct fmap fields
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3497 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
parent
c1311c8c6a
commit
040ac682d8
|
@ -34,11 +34,11 @@ struct fmap {
|
||||||
#define NELE(x) (sizeof(x)/sizeof((x)[0]))
|
#define NELE(x) (sizeof(x)/sizeof((x)[0]))
|
||||||
#define STR(x) #x
|
#define STR(x) #x
|
||||||
#define __(x) (x), #x
|
#define __(x) (x), #x
|
||||||
#define _(x) { (x), #x }
|
#define _(x) { (x), #x, NULL, NULL }
|
||||||
#define ul(x) { (x), #x, sc_pkcs11_print_ulong }
|
#define ul(x) { (x), #x, sc_pkcs11_print_ulong, NULL }
|
||||||
#define ulm(x) { (x), #x, sc_pkcs11_print_ulong, map_##x }
|
#define ulm(x) { (x), #x, sc_pkcs11_print_ulong, map_##x }
|
||||||
#define b(x) { (x), #x, sc_pkcs11_print_bool }
|
#define b(x) { (x), #x, sc_pkcs11_print_bool, NULL }
|
||||||
#define s(x) { (x), #x, sc_pkcs11_print_string }
|
#define s(x) { (x), #x, sc_pkcs11_print_string, NULL }
|
||||||
|
|
||||||
static void sc_pkcs11_print_attr(const char *, unsigned int,
|
static void sc_pkcs11_print_attr(const char *, unsigned int,
|
||||||
const char *, const char *,
|
const char *, const char *,
|
||||||
|
@ -58,14 +58,14 @@ static struct fmap map_CKA_CLASS[] = {
|
||||||
_(CKO_HW_FEATURE),
|
_(CKO_HW_FEATURE),
|
||||||
_(CKO_DOMAIN_PARAMETERS),
|
_(CKO_DOMAIN_PARAMETERS),
|
||||||
|
|
||||||
{ 0 }
|
{ 0, NULL, NULL, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct fmap map_CKA_CERTIFICATE_TYPE[] = {
|
static struct fmap map_CKA_CERTIFICATE_TYPE[] = {
|
||||||
_(CKC_X_509),
|
_(CKC_X_509),
|
||||||
_(CKC_X_509_ATTR_CERT),
|
_(CKC_X_509_ATTR_CERT),
|
||||||
|
|
||||||
{ 0 }
|
{ 0, NULL, NULL, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct fmap map_CKA_KEY_TYPE[] = {
|
static struct fmap map_CKA_KEY_TYPE[] = {
|
||||||
|
@ -85,7 +85,7 @@ static struct fmap map_CKA_KEY_TYPE[] = {
|
||||||
_(CKK_IDEA),
|
_(CKK_IDEA),
|
||||||
_(CKK_AES),
|
_(CKK_AES),
|
||||||
|
|
||||||
{ 0 }
|
{ 0, NULL, NULL, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct fmap p11_attr_names[] = {
|
static struct fmap p11_attr_names[] = {
|
||||||
|
@ -150,7 +150,7 @@ static struct fmap p11_attr_names[] = {
|
||||||
_(CKA_HAS_RESET),
|
_(CKA_HAS_RESET),
|
||||||
_(CKA_VENDOR_DEFINED),
|
_(CKA_VENDOR_DEFINED),
|
||||||
|
|
||||||
{ 0 }
|
{ 0, NULL, NULL, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
void sc_pkcs11_print_attrs(const char *file, unsigned int line,
|
void sc_pkcs11_print_attrs(const char *file, unsigned int line,
|
||||||
|
|
Loading…
Reference in New Issue