Documentation ¶
Overview ¶
Package identity contains helper functions for signing data and verifying signatures
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func VerifyStringSig ¶
func VerifyStringSig(data []byte, sig *titus.CertificateStringSignature) bool
VerifyStringSig verify
Types ¶
type Signer ¶
type Signer struct { Algorithm titus.SignatureAlgorithm Certificate tls.Certificate Hash crypto.Hash SignerOpts crypto.SignerOpts Signer crypto.Signer }
Signer signs bytes using an x509 cert / key pair: in practice, this is the client cert
func NewDefaultSigner ¶
NewDefaultSigner creates a signer with the default certificate path to the client cert
func NewSigner ¶
func NewSigner(cert tls.Certificate) (*Signer, error)
NewSigner creates a new signer with the passed in TLS certificate
func (*Signer) Sign ¶
func (s *Signer) Sign(data []byte) (*titus.CertificateSignature, error)
Sign signs the bytes, returning a CertificateSignature suitable for binary encoding
func (*Signer) SignString ¶
func (s *Signer) SignString(data []byte) (*titus.CertificateStringSignature, error)
SignString signs the bytes, returning a CertificateStringSignature suitable for JSON encoding
Click to show internal directories.
Click to hide internal directories.