Gjsify LogoGjsify Logo

Index

Variables

INVALID: number

Used as a terminator at the end of variable argument lists.

MAJOR_VERSION: number

The major version number of the Gck library.

MICRO_VERSION: number

The micro version number of the Gck library.

MINOR_VERSION: number

The minor version number of the Gck library.

URI_FOR_MODULE_WITH_VERSION: number

The URI will match specific version of modules. To be used as a GckUriFlags argument.

URI_FOR_OBJECT_ON_TOKEN: number

The URI will match objects on a specific token. To be used as a GckUriFlags argument.

URI_FOR_OBJECT_ON_TOKEN_AND_MODULE: number

The token inserted into a device with a specific module.

VENDOR_CODE: number

Custom PKCS#11 errors that originate from the gck library, are based at this error code.

Functions

  • builder_unref(builder: object): void
  • Unreferences a builder. If this was the last reference then the builder is freed.

    It is an error to use this function on builders that were allocated on the stack.

    Parameters

    • builder: object

      the builder

    Returns void

  • list_get_boxed_type(): GType
  • message_from_rv(rv: number): string
  • Get a message for a PKCS#11 return value or error code. Do not pass CKR_OK or other non-errors to this function.

    Parameters

    • rv: number

      The PKCS#11 return value to get a message for.

    Returns string

  • Setup an enumerator for listing matching objects on the modules.

    This call will not block but will return an enumerator immediately.

    If the attrs [structAttributes] is floating, it is consumed.

    Parameters

    • modules: Gck.Module[]

      The modules

    • attrs: Attributes

      attributes that the objects must have, or empty for all objects

    • session_options: SessionOptions

      Options from GckSessionOptions

    Returns Gck.Enumerator

  • Enumerate objects that match a URI.

    This call will not block. Use the [classEnumerator] functions in order to get at the actual objects that match.

    Parameters

    • modules: Gck.Module[]

      The modules

    • uri: string

      The URI that the enumerator will match

    • session_options: SessionOptions

      Options from GckSessionOptions

    Returns Gck.Enumerator

  • Get a list of slots for across all of the modules.

    Parameters

    • modules: Gck.Module[]

      The modules

    • token_present: boolean

      Whether to only list slots with token present

    Returns Gck.Slot[]

  • Find an object that matches a URI.

    This call can block. Use [funcmodules_enumerate_uri] for a non-blocking version.

    Parameters

    • modules: Gck.Module[]

      The modules

    • uri: string

      The URI the objects must match

    • session_options: SessionOptions

      Options from GckSessionOptions

    Returns Gck.Object | null

  • Find objects that match a URI.

    This call can block. Use [funcmodules_enumerate_uri] for a non-blocking version.

    Parameters

    • modules: Gck.Module[]

      The modules

    • uri: string

      The URI the objects must match

    • session_options: SessionOptions

      Options from GckSessionOptions

    Returns Gck.Object[]

  • Initialize a list of GckObject from raw PKCS#11 handles. The handles argument must contain contiguous CK_OBJECT_HANDLE handles in an array.

    Parameters

    • session: Gck.Session

      The session for these objects

    • object_handles: number[]

      The raw object handles.

    Returns Gck.Object[]

  • Setup an enumerator for listing matching objects on the slots.

    If the match #GckAttributes is floating, it is consumed.

    This call will not block but will return an enumerator immediately.

    Parameters

    • slots: Gck.Slot[]

      a list of #GckSlot to enumerate objects on.

    • match: Attributes

      attributes that the objects must match, or empty for all objects

    • options: SessionOptions

      options for opening a session

    Returns Gck.Enumerator

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

    Parameters

    • uri_data: UriData

      the info to build the URI from.

    • flags: Gck.UriFlags

      The context that the URI is for

    Returns string

  • uri_error_get_quark(): Quark
  • 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 #GckUriData for more info. Other fields will be set to %NULL.

    Parameters

    • string: string

      the URI to parse.

    • flags: Gck.UriFlags

      the context in which the URI will be used.

    Returns UriData

  • value_to_boolean(value: Uint8Array): [boolean, boolean]
  • Convert CK_BBOOL type memory to a boolean.

    Parameters

    • value: Uint8Array

      memory to convert

    Returns [boolean, boolean]

  • value_to_ulong(value: Uint8Array): [boolean, number]
  • Convert CK_ULONG type memory to a boolean.

    Parameters

    • value: Uint8Array

      memory to convert

    Returns [boolean, number]

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method