Gjsify LogoGjsify Logo

Index

Variables

PIN_FALLBACK: string
URI_SCHEME: string
URI_SCHEME_LEN: number

Functions

  • space_strdup(string: number, max_length: number): string
  • In PKCS#11 structures many strings are encoded in a strange way. The string is placed in a fixed length buffer and then padded with spaces.

    This function copies the space padded string into a normal null-terminated string. The result is owned by the caller.

    CK_INFO info; char *description; ... description = p11_kit_space_strdup (info->libraryDescription, sizeof (info->libraryDescription));

    Parameters

    • string: number

      Pointer to string block

    • max_length: number

      Maximum length of string block

    Returns string

  • space_strlen(string: number, max_length: number): number
  • In PKCS#11 structures many strings are encoded in a strange way. The string is placed in a fixed length buffer and then padded with spaces.

    This function determines the actual length of the string. Since the string is not null-terminated you need to pass in the size of buffer as max_length. The string will never be longer than this buffer.

    CK_INFO info; size_t length; ... length = p11_kit_space_strlen (info->libraryDescription, sizeof (info->libraryDescription));

    Parameters

    • string: number

      Pointer to string block

    • max_length: number

      Maximum length of string block

    Returns number

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