Options
All
  • Public
  • Public/Protected
  • All
Menu

Class NdnsecKeyChain

Access ndn-cxx KeyChain.

Hierarchy

  • KeyChain
    • NdnsecKeyChain

Index

Constructors

constructor

Properties

Readonly needJwk

needJwk: true = true

Methods

copyTo

  • copyTo(dest: KeyChain): Promise<KeyChain>

deleteCert

  • deleteCert(name: Name): Promise<void>

deleteKey

  • deleteKey(name: Name): Promise<void>

getCert

  • getCert(name: Name): Promise<Certificate>

getKey

  • getKey<K>(name: Name, typ: K): Promise<KeyPair<any>[K]>
  • Retrieve key by key name.

    Type parameters

    • K: keyof KeyPair<any>

    Parameters

    • name: Name
    • typ: K

      "signer", "verifier", etc

    Returns Promise<KeyPair<any>[K]>

getKeyPair

  • getKeyPair(name: Name): Promise<KeyPair<any>>

getSigner

  • getSigner(name: Name, __namedParameters?: GetSignerOptions): Promise<Signer>
  • Create a signer from keys and certificates in the KeyChain.

    li

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

    li

    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.

    li

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

    li

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

    Parameters

    • name: Name

      subject name, key name, or certificate name.

    • __namedParameters: GetSignerOptions = {}

    Returns Promise<Signer>

insertCert

  • insertCert(cert: Certificate): Promise<void>

insertKey

  • insertKey(name: Name, stored: StoredKey): Promise<void>

listCerts

  • listCerts(prefix?: Name): Promise<Name[]>

listKeys

  • listKeys(prefix?: Name): Promise<Name[]>

Generated using TypeDoc