diff options
author | Stef Walter <stefw@gnome.org> | 2013-03-20 10:55:06 +0100 |
---|---|---|
committer | Stef Walter <stefw@gnome.org> | 2013-03-20 10:55:06 +0100 |
commit | fc562261c6bbb35dfed585a78fdec9a408b981c7 (patch) | |
tree | c6afefe98a5251ce10eab6289a655485e0b5bec8 /common/attrs.h | |
parent | f45942a4fc3e1c5219e9b5201b82203337ee7280 (diff) | |
download | p11-kit-fc562261c6bbb35dfed585a78fdec9a408b981c7.tar.gz |
attrs: Print out the CKA_VALUE for certificates when debugging
While it's true that we shouldn't be pritning out CKA_VALUE in
certain cases, like for keys, we obviously can do so for certificates.
We don't have keys anyway, but in the interest of being general
purpose use the class to determine whether CKA_VALUE can be printed
Diffstat (limited to 'common/attrs.h')
-rw-r--r-- | common/attrs.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/common/attrs.h b/common/attrs.h index 87e0af1..233ac79 100644 --- a/common/attrs.h +++ b/common/attrs.h @@ -74,16 +74,21 @@ CK_ATTRIBUTE * p11_attrs_findn (CK_ATTRIBUTE *attrs, CK_ULONG count, CK_ATTRIBUTE_TYPE type); -bool p11_attrs_find_bool (CK_ATTRIBUTE *attrs, +bool p11_attrs_find_bool (const CK_ATTRIBUTE *attrs, CK_ATTRIBUTE_TYPE type, CK_BBOOL *value); -bool p11_attrs_findn_bool (CK_ATTRIBUTE *attrs, +bool p11_attrs_findn_bool (const CK_ATTRIBUTE *attrs, CK_ULONG count, CK_ATTRIBUTE_TYPE type, CK_BBOOL *value); -bool p11_attrs_find_ulong (CK_ATTRIBUTE *attrs, +bool p11_attrs_find_ulong (const CK_ATTRIBUTE *attrs, + CK_ATTRIBUTE_TYPE type, + CK_ULONG *value); + +bool p11_attrs_findn_ulong (const CK_ATTRIBUTE *attrs, + CK_ULONG count, CK_ATTRIBUTE_TYPE type, CK_ULONG *value); @@ -107,7 +112,8 @@ bool p11_attrs_matchn (const CK_ATTRIBUTE *attrs, char * p11_attrs_to_string (const CK_ATTRIBUTE *attrs, int count); -char * p11_attr_to_string (const CK_ATTRIBUTE *attr); +char * p11_attr_to_string (const CK_ATTRIBUTE *attr, + CK_OBJECT_CLASS klass); bool p11_attr_equal (const void *one, const void *two); |