2
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
3
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
4
<refentry id="gp11-gp11-error">
6
<refentrytitle role="top_of_page" id="gp11-gp11-error.top_of_page">Errors</refentrytitle>
7
<manvolnum>3</manvolnum>
8
<refmiscinfo>GP11 Library</refmiscinfo>
12
<refname>Errors</refname>
13
<refpurpose>GP11 Errors and error codes.</refpurpose>
16
<refsynopsisdiv id="gp11-gp11-error.synopsis" role="synopsis">
17
<title role="synopsis.title">Synopsis</title>
20
#define <link linkend="GP11-VENDOR-CODE--CAPS">GP11_VENDOR_CODE</link>
21
#define <link linkend="GP11-ERROR--CAPS">GP11_ERROR</link>
22
const <link linkend="gchar">gchar</link>* <link linkend="gp11-message-from-rv">gp11_message_from_rv</link> (<link linkend="CK-RV--CAPS">CK_RV</link> rv);
23
#define <link linkend="CKR-GP11-MODULE-PROBLEM--CAPS">CKR_GP11_MODULE_PROBLEM</link>
35
<refsect1 id="gp11-gp11-error.description" role="desc">
36
<title role="desc.title">Description</title>
38
GP11 errors are returned as GError structures. The code member of GError
39
contains the raw PKCS11 CK_RV result value.</para>
44
<refsect1 id="gp11-gp11-error.details" role="details">
45
<title role="details.title">Details</title>
46
<refsect2 id="GP11-VENDOR-CODE--CAPS" role="macro">
47
<title>GP11_VENDOR_CODE</title>
48
<indexterm zone="GP11-VENDOR-CODE--CAPS"><primary sortas="GP11_VENDOR_CODE">GP11_VENDOR_CODE</primary></indexterm><programlisting>#define GP11_VENDOR_CODE 0x47503131 /* GP11 */
51
Custom PKCS11 errors that originate from the GP11 library, are
52
based at this error code.</para>
55
<refsect2 id="GP11-ERROR--CAPS" role="macro">
56
<title>GP11_ERROR</title>
57
<indexterm zone="GP11-ERROR--CAPS"><primary sortas="GP11_ERROR">GP11_ERROR</primary></indexterm><programlisting>#define GP11_ERROR (gp11_get_error_quark ())
60
The error domain for GP11 library errors.</para>
63
<refsect2 id="gp11-message-from-rv" role="function">
64
<title>gp11_message_from_rv ()</title>
65
<indexterm zone="gp11-message-from-rv"><primary sortas="gp11_message_from_rv">gp11_message_from_rv</primary></indexterm><programlisting>const <link linkend="gchar">gchar</link>* gp11_message_from_rv (<link linkend="CK-RV--CAPS">CK_RV</link> rv);</programlisting>
67
Get a message for a PKCS<link linkend="11--CAPS"><type>11</type></link> return value or error code. Do not
68
pass CKR_OK or other such non errors to this function.</para>
70
</para><variablelist role="params">
71
<varlistentry><term><parameter>rv</parameter> :</term>
72
<listitem><simpara> The PKCS<link linkend="11--CAPS"><type>11</type></link> return value to get a message for.
73
</simpara></listitem></varlistentry>
74
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> The user readable message.
75
</simpara></listitem></varlistentry>
76
</variablelist></refsect2>
77
<refsect2 id="CKR-GP11-MODULE-PROBLEM--CAPS" role="macro">
78
<title>CKR_GP11_MODULE_PROBLEM</title>
79
<indexterm zone="CKR-GP11-MODULE-PROBLEM--CAPS"><primary sortas="CKR_GP11_MODULE_PROBLEM">CKR_GP11_MODULE_PROBLEM</primary></indexterm><programlisting>#define CKR_GP11_MODULE_PROBLEM (CKR_VENDOR_DEFINED | (GP11_VENDOR_CODE + 1))
82
A result code that signifies there was a problem loading a PKCS11
83
module, usually a shared library.
86
More details can be found in the error string.</para>