proof

package
v0.17.5 Latest Latest
Warning

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

Go to latest
Published: May 28, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const Namespace = "proof-of-possession@com.github.serverless-ssh-ca.andrewheberle"

The namespace used for signing the proof

Variables

This section is empty.

Functions

This section is empty.

Types

type Proof

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

func Generate

func Generate(signer ssh.Signer) (*Proof, error)

Generate creates a proof by signing the current timestamp using SSHSIG and the public key fingerprint with the provided signer.

The proof is returned as a string in the format: <timestamp>.<fingerprint>.<base64 armored_signature>

func Parse

func Parse(proof string) (Proof, error)

Parse takes a proof string and validates it is in the expected format, returning a Proof struct if valid.

func (Proof) MarshalJSON

func (p Proof) MarshalJSON() ([]byte, error)

MarshalJSON returns the proof data as a JSON string

func (Proof) String

func (p Proof) String() string

String returns the proof data as a string

func (Proof) Verify

func (p Proof) Verify(pub ssh.PublicKey, allowedrange time.Duration) error

Verify checks the proof is valid by verifying the signature and that the timestamp is within the allowed range.

Jump to

Keyboard shortcuts

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