signature

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2022 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(signer xmlsig.Signer, data interface{}) (*xml_dsig.SignatureType, error)

func CreateRedirect

func CreateRedirect(signingContext *dsig.SigningContext, query string) ([]byte, error)

func GetSigner added in v0.0.3

func GetSigner(
	cert []byte,
	key *rsa.PrivateKey,
	signatureAlgorithm string,
) (xmlsig.Signer, error)

func GetSigningContext

func GetSigningContext(tlsCert tls.Certificate, signatureAlgorithm string) (*dsig.SigningContext, error)

func GetSigningContextAndSigner

func GetSigningContextAndSigner(
	cert []byte,
	key *rsa.PrivateKey,
	signatureAlgorithm string,
) (*dsig.SigningContext, xmlsig.Signer, error)

func ParseCertificates

func ParseCertificates(certStrs []string) ([]*x509.Certificate, error)

func ParseTlsKeyPair

func ParseTlsKeyPair(cert []byte, key *rsa.PrivateKey) (tls.Certificate, error)

func ValidatePost

func ValidatePost(certs []*x509.Certificate, el *etree.Element) error

func ValidateRedirect

func ValidateRedirect(sigAlg string, elementToSign []byte, signature []byte, pubKey interface{}) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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