Gck.UriData

Fields

Name

Type

Access

Description

any_unrecognized

bool

r/w

whether any parts of the PKCS#11 URI were unsupported or unrecognized.

attributes

Gck.Attributes

r/w

information about the PKCS#11 objects matching the URI.

dummy

[object]

r

module_info

Gck.ModuleInfo

r/w

information about the PKCS#11 modules matching the URI.

token_info

Gck.TokenInfo

r/w

information about the PKCS#11 tokens matching the URI.

Methods

class

new ()

class

parse (string, flags)

build (flags)

copy ()

free ()

Details

class Gck.UriData

Information about the contents of a PKCS#11 URI. Various fields may be None depending on the context that the URI was parsed for.

Since PKCS#11 URIs represent a set which results from the intersections of all of the URI parts, if any_recognized is set to True then usually the URI should be treated as not matching anything.

classmethod new()[source]
Returns:

a newly allocated Gck.UriData, free with Gck.UriData.free()

Return type:

Gck.UriData

Allocate a new Gck.UriData structure. None of the fields will be set.

classmethod parse(string, flags)[source]
Parameters:
  • string (str) – the URI to parse.

  • flags (Gck.UriFlags) – the context in which the URI will be used.

Raises:

GLib.Error

Returns:

a newly allocated Gck.UriData; which should be freed with Gck.UriData.free()

Return type:

Gck.UriData

Parse a PKCS#11 URI for use in a given context.

The result will contain the fields that are relevant for the given context. See Gck.UriData for more info. Other fields will be set to None.

build(flags)[source]
Parameters:

flags (Gck.UriFlags) – The context that the URI is for

Returns:

a newly allocated string containing a PKCS#11 URI.

Return type:

str

Build a PKCS#11 URI. The various parts relevant to the flags specified will be used to build the URI.

copy()[source]
Returns:

newly allocated copy of the uri data

Return type:

Gck.UriData

Copy a Gck.UriData

free()[source]

Free a Gck.UriData.