remotesigner

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2026 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Overview

Package remotesigner provides a crypto.Signer that delegates signing to a remote hsm-proxy instance over HTTP.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Endpoint  string // HSM proxy URL (e.g. "https://127.0.0.1:8445")
	KeyAlias  string // key alias on the HSM
	TLSCert   string // client TLS cert for mTLS
	TLSKey    string // client TLS key for mTLS
	CACert    string // CA cert to verify remote signer TLS certificate (Tier 3)
	AuthToken string // Bearer token for API auth
}

Config configures a RemoteSigner.

type RemoteSigner

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

RemoteSigner implements crypto.Signer by delegating to a hsm-proxy endpoint.

func New

func New(cfg Config) (*RemoteSigner, error)

New creates a RemoteSigner and fetches the public key from the HSM proxy.

func (*RemoteSigner) Public

func (s *RemoteSigner) Public() crypto.PublicKey

Public returns the public key.

func (*RemoteSigner) Sign

func (s *RemoteSigner) Sign(_ io.Reader, digest []byte, _ crypto.SignerOpts) ([]byte, error)

Sign signs the digest by delegating to the HSM proxy.

Jump to

Keyboard shortcuts

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