<xi:include href="xml/p11-kit.xml"/>
<xi:include href="xml/p11-kit-uri.xml"/>
<xi:include href="xml/p11-kit-util.xml"/>
+ <xi:include href="xml/p11-kit-future.xml"/>
</chapter>
<index id="api-index-full">
* Use p11_kit_finalize_registered() to finalize these registered modules once
* the caller is done with them.
*
+ * If this function fails, then an error message will be available via the
+ * p11_kit_message() function.
+ *
* Returns: CKR_OK if the initialization succeeded, or an error code.
*/
CK_RV
* process, then this function must be called the same number of times before
* actual finalization will occur.
*
+ * If this function fails, then an error message will be available via the
+ * p11_kit_message() function.
+ *
* Returns: CKR_OK if the finalization succeeded, or an error code.
*/
* Custom initialization arguments cannot be supported when multiple consumers
* load the same module.
*
+ * If this function fails, then an error message will be available via the
+ * p11_kit_message() function.
+ *
* Returns: CKR_OK if the initialization was successful.
*/
CK_RV
* to use this function on registered modules if (and only if) they were
* initialized using p11_kit_initialize_module() for some reason.
*
+ * If this function fails, then an error message will be available via the
+ * p11_kit_message() function.
+ *
* Returns: CKR_OK if the finalization was successful.
*/
CK_RV
* Custom initialization arguments cannot be supported when multiple consumers
* load the same module.
*
+ * If this function fails, then an error message will be available via the
+ * p11_kit_message() function.
+ *
* Returns: CKR_OK if the initialization was successful.
*/
CK_RV
#include <stdio.h>
#include <string.h>
+/**
+ * SECTION:p11-kit-future
+ * @title: Future
+ * @short_description: Future Unstable API
+ *
+ * API that is not yet stable enough to be enabled by default. In all likelyhood
+ * this will be included in the next release. To use this API you must define a
+ * MACRO. See the p11-kit.h header for more details.
+ */
+
#define MAX_MESSAGE 512
static pthread_once_t key_once = PTHREAD_ONCE_INIT;
static pthread_key_t message_buffer_key = 0;
store_message_buffer (buffer, length);
}
+/**
+ * p11_kit_be_quiet:
+ *
+ * Once this function is called, the p11-kit library will no longer print
+ * failure or warning messages to stderr.
+ */
void
p11_kit_be_quiet (void)
{
_p11_unlock ();
}
+/**
+ * p11_kit_message:
+ *
+ * Gets the failure message for a recently called p11-kit function, which
+ * returned a failure code on this thread. Not all functions set this message.
+ * Each function that does so, will note it in its documentation.
+ *
+ * If the most recent p11-kit function did not fail, then this will return NULL.
+ * The string is owned by the p11-kit library and is only valid on the same
+ * thread that the failed function executed on.
+ *
+ * Returns: The last failure message, or %NULL.
+ */
const char*
p11_kit_message (void)
{