summaryrefslogtreecommitdiff
path: root/p11-kit/iter.c
Commit message (Collapse)AuthorAgeFilesLines
* iter: Enable iteration over slots/tokens/modulesDaiki Ueno2017-02-081-25/+124
| | | | | | | | | While PKCS#11 URI can identify slots/tokens/modules, P11KitIter is only capable of iterating over objects. This patch adds new behaviors to P11KitIter to support iterations over slots/tokens/modules, using the C coroutine trick as described in: http://www.chiark.greenend.org.uk/~sgtatham/coroutines.html
* iter: Utilize 'slot-id' URI path attributeDaiki Ueno2016-09-021-1/+7
| | | | https://bugs.freedesktop.org/show_bug.cgi?id=97245
* iter: Utilize slot info URI path attributesDaiki Ueno2016-09-021-0/+27
| | | | https://bugs.freedesktop.org/show_bug.cgi?id=97245
* Fix typos flagged by codespellDaiki Ueno2016-08-221-4/+4
|
* iter: Fix return value in rare memory allocation caseStef Walter2014-01-131-1/+1
|
* iter: Add p11_kit_iter_get_attributes() functionStef Walter2014-01-131-0/+35
| | | | A simple wrapper for C_GetAttributeValue()
* iter: Add a p11_kit_iter_destroy_object() functionStef Walter2013-08-281-0/+18
| | | | Handy function since this is a common need.
* iter: Add p11_kit_iter_set_uri() functionStef Walter2013-08-281-7/+34
| | | | This is so we can set a filtering uri on the iterator after construction
* iter: Add p11_kit_iter_get_token() callStef Walter2013-08-281-4/+21
| | | | | To get the already loaded CK_TOKEN_INFO during iteration for the token that the current object is on.
* iter: Add new P11_KIT_ITER_WANT_WRITABLE iterator behaviorStef Walter2013-08-281-22/+14
| | | | | This allows us to try to get a RW session, but if not fallback to a read-only session.
* Fix various issues highlighted by coverity scannerStef Walter2013-07-181-6/+6
| | | | Among others fix possible usage of large stack allocation.
* iter: Document guarantees for filter matches argumetStef Walter2013-07-181-0/+4
| | | | | | | | The matches argument is always initialized to CK_TRUE when a filter is called, and it's up to filters to set it to CK_FALSE. Filters don't need to set to CK_TRUE. https://bugzilla.redhat.com/show_bug.cgi?id=985009
* Various documentation tweaks and fixes for warningsStef Walter2013-07-101-0/+8
|
* iter: Add iteration mode where session is not busyStef Walter2013-07-031-19/+40
| | | | | | | | | | | In order to use the session we are iterating on for other tasks such as other C_FindObject() calls, we need to make sure that it's not in the middle of a find operation. Finish up the complete find operation in advance of returning objects from a session. Make this the default mode. The previous behavior remains as an option. Add tests.
* Fix memory leaks reported by 'make leakcheck'Stef Walter2013-03-201-0/+3
|
* iter: Don't skip tokens that don't have CKF_TOKEN_INITIALIZEDStef Walter2013-03-081-4/+0
| | | | | This flag is not required to be set unless C_InitToken has been called. Many modules, like libnssckbi.so, do not set this flag.
* Remove duplicate typedefStef Walter2013-03-041-2/+2
| | | | https://bugs.freedesktop.org/show_bug.cgi?id=60894
* Add public iterator API to p11-kitStef Walter2013-02-051-0/+829