keychain

package
v1.5.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 27, 2025 License: MIT Imports: 14 Imported by: 2

Documentation

Index

Constants

View Source
const EXT_CERT = ".cert"
View Source
const EXT_KEY = ".key"
View Source
const EXT_PEM = ".pem"

Variables

This section is empty.

Functions

func InsertFile

func InsertFile(kc ndn.KeyChain, content []byte) error

InsertFile inserts all signers and certs from the given content.

func NewKeyChain

func NewKeyChain(uri string, pubStore ndn.Store) (ndn.KeyChain, error)

func NewKeyChainDir

func NewKeyChainDir(path string, pubStore ndn.Store) (ndn.KeyChain, error)

NewKeyChainDir creates a new in-memory keychain.

func NewKeyChainMem

func NewKeyChainMem(pubStore ndn.Store) ndn.KeyChain

NewKeyChainMem creates a new in-memory keychain.

Types

type KeyChainDir

type KeyChainDir struct {
	// contains filtered or unexported fields
}

KeyChainDir is a directory-based keychain.

func (*KeyChainDir) Identities

func (kc *KeyChainDir) Identities() []ndn.KeyChainIdentity

func (*KeyChainDir) IdentityByName

func (kc *KeyChainDir) IdentityByName(name enc.Name) ndn.KeyChainIdentity

func (*KeyChainDir) InsertCert

func (kc *KeyChainDir) InsertCert(wire []byte) error

func (*KeyChainDir) InsertKey

func (kc *KeyChainDir) InsertKey(signer ndn.Signer) error

func (*KeyChainDir) Store

func (kc *KeyChainDir) Store() ndn.Store

func (*KeyChainDir) String

func (kc *KeyChainDir) String() string

type KeyChainMem

type KeyChainMem struct {
	// contains filtered or unexported fields
}

KeyChainMem is an in-memory keychain.

func (*KeyChainMem) Identities

func (kc *KeyChainMem) Identities() []ndn.KeyChainIdentity

func (*KeyChainMem) IdentityByName

func (kc *KeyChainMem) IdentityByName(name enc.Name) ndn.KeyChainIdentity

func (*KeyChainMem) InsertCert

func (kc *KeyChainMem) InsertCert(wire []byte) error

func (*KeyChainMem) InsertKey

func (kc *KeyChainMem) InsertKey(signer ndn.Signer) error

func (*KeyChainMem) Store

func (kc *KeyChainMem) Store() ndn.Store

func (*KeyChainMem) String

func (kc *KeyChainMem) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL