Gjsify LogoGjsify Logo

A structure representing a PKCS#11 URI. There are no public fields visible in this structure. Use the various accessor functions.

record

Hierarchy

  • Uri

Index

Constructors

Properties

name: string

Methods

  • any_unrecognized(): number
  • 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.

    Returns number

  • clear_attributes(): void
  • format(uri_type: UriType, string: string): number
  • 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().

    Parameters

    • uri_type: UriType

      The type of URI that should be produced.

    • string: string

      Location to store a newly allocated string.

    Returns number

  • free(): void
  • get_pin_source(): string
  • 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.

    Returns string

  • get_pinfile(): string
  • set_pin_source(pin_source: string): void
  • 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.

    Parameters

    • pin_source: string

      The new pin-source

    Returns void

  • set_pinfile(pinfile: string): void
  • set_unrecognized(unrecognized: number): void
  • 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.

    Parameters

    • unrecognized: number

      The new unregognized flag value

    Returns void

  • message(code: number): string
  • 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.

    Parameters

    • code: number

      The error code

    Returns string

  • 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.

    Parameters

    • string: string

      The string to parse

    • uri_type: UriType

      The type of URI that is expected

    • uri: P11Kit.Uri

      The blank URI to parse the values into

    Returns 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