Documentation
¶
Index ¶
Constants ¶
const ( SigNamespace = "file" KeyType = "ssh" )
Variables ¶
This section is empty.
Functions ¶
func NewKeyFromBytes ¶
func NewKeyFromBytes(t *testing.T, keyB []byte) *signerverifier.SSLibKey
NewKeyFromBytes returns an ssh SSLibKey from the passed bytes. It's meant to be used for tests as that's when we directly deal with key bytes.
func NewKeyFromFile ¶
func NewKeyFromFile(path string) (*signerverifier.SSLibKey, error)
NewKeyFromFile imports an ssh SSlibKey from the passed path. The path can point to a public or private, encrypted or plaintext, rsa, ecdsa or ed25519 key file in a format supported by "ssh-keygen". This aligns with the git "user.signingKey" option. https://git-scm.com/docs/git-config#Documentation/git-config.txt-usersigningKey
Types ¶
type Signer ¶
Signer is a dsse.Signer implementation for SSH keys.
func NewSignerFromFile ¶
NewSignerFromFile creates an SSH signer from the passed path.
func (*Signer) Sign ¶
Sign implements the dsse.Signer.Sign interface for SSH keys. It signs using "s.Path" to a public or private, encrypted or plaintext, rsa, ecdsa or ed25519 key file in a format supported by "ssh-keygen". This aligns with the git "user.signingKey" option. https://git-scm.com/docs/git-config#Documentation/git-config.txt-usersigningKey
type Verifier ¶
type Verifier struct {
// contains filtered or unexported fields
}
Verifier is a dsse.Verifier implementation for SSH keys.
func NewVerifierFromKey ¶
func NewVerifierFromKey(key *signerverifier.SSLibKey) (*Verifier, error)
NewVerifierFromKey creates a new Verifier from SSlibKey of type ssh.
func (*Verifier) KeyID ¶
KeyID implements the dsse.Verifier.KeyID interface for SSH keys. FIXME: consider removing error in interface; a dsse.Verifier needs a keyid
func (*Verifier) MetadataKey ¶
func (v *Verifier) MetadataKey() *signerverifier.SSLibKey