Documentation ¶
Index ¶
- func LoadCert(path, password string) (*rsa.PrivateKey, *x509.Certificate, error)
- func LoadCertChain(certPath string, certPassword string) (*rsa.PrivateKey, *x509.Certificate, []*x509.Certificate, error)
- func Sign(privateKey *rsa.PrivateKey, payload []byte) ([]byte, error)
- func SignPayload(privateKey *rsa.PrivateKey, payload []byte) ([]byte, error)
- func VerifySignature(publicKey *rsa.PublicKey, payload []byte, signature string) error
- type CertLoader
- type PayloadSigner
- type SignatureVerifier
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadCert ¶
func LoadCert(path, password string) (*rsa.PrivateKey, *x509.Certificate, error)
func LoadCertChain ¶
func LoadCertChain(certPath string, certPassword string) ( *rsa.PrivateKey, *x509.Certificate, []*x509.Certificate, error)
func SignPayload ¶
func SignPayload(privateKey *rsa.PrivateKey, payload []byte) ([]byte, error)
Types ¶
type CertLoader ¶
type CertLoader func(certPath string, certPassword string) (*rsa.PrivateKey, *x509.Certificate, error)
CertLoader loads a certificate from a file and returns the private key and the certificate.
type PayloadSigner ¶
type PayloadSigner func(privateKey *rsa.PrivateKey, payload []byte) ([]byte, error)
PayloadSigner signs a payload using the private key of the signing certificate all requests to the VFD API must be signed.
Click to show internal directories.
Click to hide internal directories.