Documentation
¶
Overview ¶
Package sign holds a mailbox's keys, and is the one place they sign (TestOnlySignSigns). The identity signs whatever the mailbox signs, at any time: its prekey statements, passes and messages, the certificates it gives working keys, and its revocations. A working key under a certificate the identity made signs statements, passes and messages (PROTOCOL.md §5).
Every signature asks the mailbox, at the moment it is made, whether it holds its own revocation, and is refused if it does (PROTOCOL.md §12.5): no path, a new one included, signs around that check.
Index ¶
- type Finished
- type Identity
- func (k *Identity) Certify(id *protocol.Identity, work ssh.PublicKey, n uint64, now time.Time, ...) (*protocol.Certificate, error)
- func (k *Identity) Message(line []byte, to protocol.Address) ([]byte, error)
- func (k *Identity) Pass(a protocol.Address, server string, now time.Time) (string, time.Time, error)
- func (k *Identity) PublicKey() ssh.PublicKey
- func (k *Identity) Revocation(a protocol.Address) ([]byte, error)
- func (k *Identity) RevokedCertificates(r *protocol.RevokedCertificates) ([]byte, error)
- func (k *Identity) Statement(p *protocol.Prekey) ([]byte, error)
- type Work
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Finished ¶
type Finished func() error
Finished returns why the mailbox may sign nothing more, or nil.
type Identity ¶
type Identity struct {
// contains filtered or unexported fields
}
Identity is a mailbox's identity key.
func NewIdentity ¶
NewIdentity holds key, the mailbox's identity, for a mailbox that says whether it is finished.
func (*Identity) Certify ¶
func (k *Identity) Certify(id *protocol.Identity, work ssh.PublicKey, n uint64, now time.Time, lifetime time.Duration) (*protocol.Certificate, error)
Certify signs a certificate of the working key work, of serial n, made at now and running for lifetime (protocol.NewCertificate).
func (*Identity) Message ¶ added in v0.3.0
Message signs an envelope's line for its recipient to, in to's message namespace.
func (*Identity) Pass ¶ added in v0.3.0
func (k *Identity) Pass(a protocol.Address, server string, now time.Time) (string, time.Time, error)
Pass signs a pass of the mailbox a, for the server named server, dated now (protocol.NewPass).
func (*Identity) Revocation ¶
Revocation signs the revocation of the address a (protocol.SignRevocation).
func (*Identity) RevokedCertificates ¶
func (k *Identity) RevokedCertificates(r *protocol.RevokedCertificates) ([]byte, error)
RevokedCertificates signs the revocation of certificates r (protocol.SignRevokedCertificates).
type Work ¶
type Work struct {
// contains filtered or unexported fields
}
Work is a working key under its certificate: it signs the mailbox's prekey statements, passes and messages.
func NewWork ¶
NewWork holds key, a working key under its certificate, for a mailbox that says whether it is finished.
func (*Work) Message ¶ added in v0.3.0
Message signs an envelope's line for its recipient to, in to's message namespace.