Class NdnsecKeyChain

Access ndn-cxx KeyChain.

Hierarchy (view full)

Constructors

Properties

mutex: Mutex
needJwk = true

Return whether .insertKey() method expects JsonWebKey instead of CryptoKey.

Accessors

  • get supported(): boolean
  • Whether current environment supports ndn-cxx KeyChain.

    Returns boolean

    It checks whether ndnsec program is installed.

Methods

  • Delete certificate.

    Parameters

    Returns Promise<void>

  • Delete key pair and associated certificates.

    Parameters

    Returns Promise<void>

  • Create a signer from keys and certificates in the KeyChain.

    Parameters

    Returns Promise<Signer>

    If name is a certificate name, sign with the corresponding private key, and use the specified certificate name as KeyLocator.

    If name is a key name, sign with the specified private key. If a non-self-signed certificate exists for this key, use the certificate name as KeyLocator. Otherwise, use the key name as KeyLocator.

    If name is neither a certificate name nor a key name, it is interpreted as a subject name. A non-self-signed certificate of this subject name is preferred. If no such certificate exists, use any key of this subject name.

    If prefixMatch is true, name can also be interpreted as a prefix of the subject name.

  • Insert certificate.

    Parameters

    Returns Promise<void>

    Corresponding key must exist.

  • Insert key pair.

    Parameters

    Returns Promise<void>

  • List certificates, filtered by name prefix.

    Parameters

    • Optionalprefix: Name

    Returns Promise<Name[]>

  • List keys, filtered by name prefix.

    Parameters

    • Optionalprefix: Name

    Returns Promise<Name[]>