proof

package
v0.23.0 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2026 License: Apache-2.0 Imports: 9 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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