Get the unrecognized flag for this URI.
The unrecognized flag is automatically set to 1 when during parsing any part of the URI is unrecognized. If the unrecognized flag is set to 1, then matching against this URI will always fail.
Format a PKCS#11 URI into a string.
Fields which are zeroed out will not be included in the resulting string. Attributes which are not present will also not be included.
The uri_type of URI specified limits the different parts of the resulting URI. To format a URI containing all possible information use %P11_KIT_URI_FOR_ANY
The resulting string should be freed with free().
The type of URI that should be produced.
Location to store a newly allocated string.
Free a PKCS#11 URI.
Get the 'pin-source' part of the URI. This is used by some applications to lookup a PIN for logging into a PKCS#11 token.
Set the 'pin-source' part of the URI. This is used by some applications to lookup a PIN for logging into a PKCS#11 token.
The new pin-source
Set the unrecognized flag on this URI.
The unrecognized flag is automatically set to 1 when during parsing any part of the URI is unrecognized. If the unrecognized flag is set to 1, then matching against this URI will always fail.
The new unregognized flag value
Lookup a message for the uri error code. These codes are the P11_KIT_URI_XXX error codes that can be returned from p11_kit_uri_parse() or p11_kit_uri_format(). As a special case %NULL, will be returned for %P11_KIT_URI_OK.
The error code
Parse a PKCS#11 URI string.
PKCS#11 URIs can represent tokens, objects or modules. The uri_type argument allows the caller to specify what type of URI is expected and the sorts of things the URI should match. %P11_KIT_URI_FOR_ANY can be used to parse a URI for any context. It's then up to the caller to make sense of the way that it is used.
If the PKCS#11 URI contains unrecognized URI parts or parts not applicable to the specified context, then the unrecognized flag will be set. This will prevent the URI from matching using the various match functions.
The string to parse
The type of URI that is expected
The blank URI to parse the values into
A structure representing a PKCS#11 URI. There are no public fields visible in this structure. Use the various accessor functions.