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.
Click to show internal directories.
Click to hide internal directories.