Documentation ¶
Index ¶
- func ComputeSKI(template *x509GM.Certificate) ([]byte, error)
- func FillTemplate(template *x509GM.Certificate, defaultProfile, profile *config.SigningProfile, ...) error
- func GenerateGMCsr(priv crypto.Signer, req *csr.CertificateRequest) (csr []byte, err error)
- func OverrideHosts(template *x509GM.Certificate, hosts []string)
- func PopulateSubjectFromCSR(s *signer.Subject, req pkix.Name) pkix.Name
- func Profile(s signer.Signer, profile string) (*config.SigningProfile, error)
- type GMSigner
- func (s *GMSigner) Certificate(_, _ string) (*x509GM.Certificate, error)
- func (s *GMSigner) GetDBAccessor() certdb.Accessor
- func (s *GMSigner) Info(req info.Req) (resp *info.Resp, err error)
- func (s *GMSigner) Policy() *config.Signing
- func (s *GMSigner) SetDBAccessor(dba certdb.Accessor)
- func (s *GMSigner) SetPolicy(policy *config.Signing)
- func (s *GMSigner) SetReqModifier(_ func(*http.Request, []byte))
- func (s *GMSigner) SigAlgo() x509.SignatureAlgorithm
- func (s *GMSigner) Sign(req signer.SignRequest) (cert []byte, err error)
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 ¶
cloudflare 证书请求 转成 国密证书请求
func OverrideHosts ¶
func OverrideHosts(template *x509GM.Certificate, hosts []string)
add by thoughtwork's matrix
func PopulateSubjectFromCSR ¶
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
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 (*GMSigner) SetDBAccessor ¶
func (*GMSigner) SigAlgo ¶
func (s *GMSigner) SigAlgo() x509.SignatureAlgorithm
Click to show internal directories.
Click to hide internal directories.