Documentation
¶
Overview ¶
Package httpsig provides RFC 9421 HTTP Message Signature signing and verification using SSH keys. It bridges the SSH key types used by epithet with the yaronf/httpsign library.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Signer ¶
type Signer struct {
// contains filtered or unexported fields
}
Signer signs HTTP requests using RFC 9421 with an SSH private key. It maintains separate internal signers for GET (no body) and POST (with content-digest) requests.
func NewSigner ¶
func NewSigner(privateKey sshcert.RawPrivateKey) (*Signer, error)
NewSigner creates a Signer from an SSH private key.
func (*Signer) SignRequest ¶
SignRequest signs an HTTP request using RFC 9421. For requests with a body, it computes Content-Digest (SHA-256) first, then signs the request including the digest. Sets Signature, Signature-Input, and (for POST) Content-Digest headers.
type Verifier ¶
type Verifier struct {
// contains filtered or unexported fields
}
Verifier verifies RFC 9421 signatures on HTTP requests using an SSH public key.
func NewVerifier ¶
func NewVerifier(publicKey sshcert.RawPublicKey) (*Verifier, error)
NewVerifier creates a Verifier from an SSH public key.