gmsigner

package
v0.0.0-...-ffb137a Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2021 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComputeSKI

func ComputeSKI(template *x509GM.Certificate) ([]byte, error)

func FillTemplate

func FillTemplate(template *x509GM.Certificate, defaultProfile, profile *config.SigningProfile, notBefore time.Time, notAfter time.Time) error

func GenerateGMCsr

func GenerateGMCsr(priv crypto.Signer, req *csr.CertificateRequest) (csr []byte, err error)

cloudflare 证书请求 转成 国密证书请求

func OverrideHosts

func OverrideHosts(template *x509GM.Certificate, hosts []string)

add by thoughtwork's matrix

func PopulateSubjectFromCSR

func PopulateSubjectFromCSR(s *signer.Subject, req pkix.Name) pkix.Name

PopulateSubjectFromCSR has functionality similar to Name, except it fills the fields of the resulting pkix.Name with req's if the subject's corresponding fields are empty

func Profile

func Profile(s signer.Signer, profile string) (*config.SigningProfile, error)

Profile gets the specific profile from the signer

Types

type GMSigner

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

func NewSigner

func NewSigner(priv crypto.Signer, cert *x509.Certificate, sigAlgo x509GM.SignatureAlgorithm, policy *config.Signing) (*GMSigner, error)

func (*GMSigner) Certificate

func (s *GMSigner) Certificate(_, _ string) (*x509GM.Certificate, error)

Certificate returns the signer's certificate.

func (*GMSigner) GetDBAccessor

func (s *GMSigner) GetDBAccessor() certdb.Accessor

func (*GMSigner) Info

func (s *GMSigner) Info(req info.Req) (resp *info.Resp, err error)

func (*GMSigner) Policy

func (s *GMSigner) Policy() *config.Signing

func (*GMSigner) SetDBAccessor

func (s *GMSigner) SetDBAccessor(dba certdb.Accessor)

func (*GMSigner) SetPolicy

func (s *GMSigner) SetPolicy(policy *config.Signing)

func (*GMSigner) SetReqModifier

func (s *GMSigner) SetReqModifier(_ func(*http.Request, []byte))

func (*GMSigner) SigAlgo

func (s *GMSigner) SigAlgo() x509.SignatureAlgorithm

func (*GMSigner) Sign

func (s *GMSigner) Sign(req signer.SignRequest) (cert []byte, err error)

Jump to

Keyboard shortcuts

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