Documentation
¶
Index ¶
- type ECDHKey
- type KeyService
- func (p *KeyService) GetDecrypter(keygrip []byte) (crypto.Decrypter, error)
- func (p *KeyService) GetSigner(keygrip []byte) (crypto.Signer, error)
- func (p *KeyService) HaveKey(keygrips [][]byte) (bool, []byte, error)
- func (p *KeyService) Keygrips() ([][]byte, error)
- func (*KeyService) Name() string
- func (p *KeyService) SecurityKeys() ([]SecurityKey, error)
- type SecurityKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ECDHKey ¶ added in v0.9.0
type ECDHKey struct {
// contains filtered or unexported fields
}
ECDHKey implements ECDH using an underlying ECDSA key.
type KeyService ¶
type KeyService struct {
// contains filtered or unexported fields
}
KeyService represents a collection of tokens and slots accessed by the Personal Identity Verifaction card interface.
func (*KeyService) GetDecrypter ¶
func (p *KeyService) GetDecrypter(keygrip []byte) (crypto.Decrypter, error)
GetDecrypter returns a crypto.Decrypter associated with the given keygrip.
func (*KeyService) GetSigner ¶
func (p *KeyService) GetSigner(keygrip []byte) (crypto.Signer, error)
GetSigner returns a crypto.Signer associated with the given keygrip.
func (*KeyService) HaveKey ¶
func (p *KeyService) HaveKey(keygrips [][]byte) (bool, []byte, error)
HaveKey takes a list of keygrips, and returns a boolean indicating if any of the given keygrips were found, the found keygrip, and an error, if any.
func (*KeyService) Keygrips ¶ added in v0.9.0
func (p *KeyService) Keygrips() ([][]byte, error)
Keygrips returns a single slice of concatenated keygrip byteslices - one for each cryptographic key available on the keyservice.
func (*KeyService) SecurityKeys ¶
func (p *KeyService) SecurityKeys() ([]SecurityKey, error)
SecurityKeys returns a slice containing all available security keys.
type SecurityKey ¶
type SecurityKey interface { AttestationCertificate() (*x509.Certificate, error) Card() string Close() error Comment(*securitykey.SlotSpec) string PrivateKey(*securitykey.CryptoKey) (crypto.PrivateKey, error) SigningKeys() []securitykey.SigningKey CryptoKeys() []securitykey.CryptoKey StringsGPG(string, string) ([]string, error) StringsSSH() []string }
SecurityKey is a simple interface for security keys allowing abstraction over the securitykey implementation, and allowing generation of mocks for testing.