summaryrefslogtreecommitdiff
path: root/common/attrs.c
Commit message (Collapse)AuthorAgeFilesLines
* attrs: Allow NULL attribute to be passed to p11_attr_hash()Stef Walter2014-01-131-5/+7
| | | | | | This allows simpler lookups. https://bugs.freedesktop.org/show_bug.cgi?id=73558
* Don't call memdup with zero length or NULL pointerStef Walter2013-07-181-2/+7
| | | | https://bugzilla.redhat.com/show_bug.cgi?id=985433
* attrs: Check printf formatting in buffer_append_printf()Stef Walter2013-07-181-0/+5
| | | | https://bugzilla.redhat.com/show_bug.cgi?id=985497
* trust: Port to use CKA_PUBLIC_KEY_INFO and updated trust store specStef Walter2013-07-041-0/+1
| | | | | | | | | | * Use the concepts and PKCS#11 objects described in the recently updated (still work in progress) storing trust spec. * Define our own CKA_X_PUBLIC_KEY_INFO define for now, since the the CKA_PUBLIC_KEY_INFO isn't defined yet. * Most notably, the association between certificates and stapled extensions is by public key. * Rework some of the tests to take into account the above.
* Add the log-calls module config optionStef Walter2013-05-211-11/+11
| | | | | If 'log-calls = yes' is set then all the PKCS#11 modules are logged to stderr.
* Update to MurmurHash3Stef Walter2013-04-031-1/+1
| | | | | | | This should also fix problems with accessing memory in a non-aligned fashion on platforms where this causes problems. https://bugs.freedesktop.org/show_bug.cgi?id=62819
* attrs: Print out the CKA_VALUE for certificates when debuggingStef Walter2013-03-201-9/+40
| | | | | | | | 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
* hash: Add the murmur2 hash and start using itStef Walter2013-03-201-4/+7
| | | | | | | | | | | Add implementation of the murmur2 hash function, and start using it for our dictionaries. Our implementation is incremental like our other hash functions. Also remove p11_oid_hash() which wasn't being used. In addition fix several tests whose success was based on the way that the dictionary hashed. This was a hidden testing bug.
* attrs: Change p11_attrs_to_string() to allow static templatesStef Walter2013-03-181-5/+8
| | | | | Allow passing the number of attributes to print, which lets us use this directly on templates passed in by callers of the PKCS#11 API.
* Refine looking up of attributes in arraysStef Walter2013-03-181-38/+24
| | | | | | | | There was a class of bugs for looking up invalid or empty attributes in the internal PKCS#11 attribute arrays. * Refine what p11_attrs_find_valid() treats as valid * Rename p11_attrs_is_empty() to p11_attrs_terminator() for clarity
* trust: Update frob-nss-tool so it can compare modules for trust infoStef Walter2013-03-151-0/+23
| | | | | Can run with two modules now so that it can compare tokens NSS trust info.
* attrs: Add info functions for constant names and valuesStef Walter2013-03-151-232/+10
| | | | | | | * For retrieving the name and/or nick of constants * The nick is what we'll use in the file format https://bugs.freedesktop.org/show_bug.cgi?id=62329
* attrs: New p11_attrs_merge() functionStef Walter2013-03-151-6/+46
| | | | | | | This takes one set of attributes and merges them into another, without copying memory needlessly. https://bugs.freedesktop.org/show_bug.cgi?id=62329
* trust: Use the new NSS PKCS#11 extension codesStef Walter2013-03-081-38/+38
| | | | | NSS had subtly changed the values of the distrust CK_TRUST codes so update them to stay in sync.
* Update the pkcs11.h header for missing mechanismsStef Walter2013-02-201-1/+1
|
* Fix dereference of varargs in p11_attrs_build()Stef Walter2013-02-111-1/+1
| | | | https://bugs.freedesktop.org/show_bug.cgi?id=60473
* Further tweaks and cleanup for functions dealing with PKCS#11 attributesStef Walter2013-02-041-40/+755
| | | | | | | | * Check that the size is correct when looking for a boolean or a ulong. * Make sure that the length is not the invalid negative ulong. * Functions for dumping out attribute contents * Make it possible to use attributes in hash tables
* Use the stdbool.h C99 bool typeStef Walter2013-01-231-6/+6
| | | | | | It was getting really wild knowing whether a function returning an int would return -1 on failure or 0 or whether the int return value was actually a number etc..
* Add common functions for manipulating CK_ATTRIBUTE arraysStef Walter2013-01-091-0/+310