Documentation ¶
Overview ¶
Package keychain implements signing and verification on NDN packets.
Index ¶
- Variables
- func IsCertName(name ndn.Name) bool
- func IsCertificate(data ndn.Data) bool
- func IsKeyName(name ndn.Name) bool
- func ToCertName(input ndn.Name) ndn.Name
- func ToKeyName(input ndn.Name) ndn.Name
- func ToSubjectName(input ndn.Name) ndn.Name
- type PrivateKey
- type PrivateKeyKeyLocatorChanger
- type PublicKey
Constants ¶
This section is empty.
Variables ¶
var ( ComponentKEY = ndn.ParseNameComponent("KEY") ComponentSelfIssuer = ndn.ParseNameComponent("self") ComponentDefaultIssuer = ndn.ParseNameComponent("ndn-dpdk.go") )
Name components for certificate naming.
var ( ErrKeyName = errors.New("bad key name") ErrCertName = errors.New("bad certificate name") )
Error conditions for certificate naming.
Functions ¶
func IsCertName ¶
IsCertName determines if the input is a certificate name.
func IsCertificate ¶
IsCertificate determines if the Data packet is a certificate.
func ToCertName ¶
ToCertName extracts or builds certificate name from subject name, key name, or certificate name. If the input is a subject name, the keyID component is randomly generated. If the input is a subject name or key name, the issuerID is set to 'ndn-dpdk.go', and the version component is randomly generated.
Types ¶
type PrivateKey ¶
PrivateKey represents a named private key.
type PrivateKeyKeyLocatorChanger ¶
type PrivateKeyKeyLocatorChanger interface { PrivateKey // WithKeyLocator creates a new Signer that uses a different KeyLocator. // This may be used to put certificate name in KeyLocator. WithKeyLocator(klName ndn.Name) ndn.Signer }
PrivateKeyKeyLocatorChanger is a PrivateKey that can change KeyLocator.