Pass the certifer instance through the cert chain
This commit is contained in:
parent
4e2f5f197f
commit
c2efcc443a
3
cert.go
3
cert.go
|
@ -54,6 +54,7 @@ func (x *certifier) NewCA() (*Cert, error) {
|
|||
}
|
||||
|
||||
return &Cert{
|
||||
x: x,
|
||||
Template: ca,
|
||||
Bytes: caBytes,
|
||||
Key: NewKeyParameters(pk),
|
||||
|
@ -93,6 +94,7 @@ func (c *Cert) NewCert(cn string) (*Cert, error) {
|
|||
ca = c
|
||||
}
|
||||
return &Cert{
|
||||
x: c.x,
|
||||
Template: cert,
|
||||
Bytes: certBytes,
|
||||
Key: NewKeyParameters(pk),
|
||||
|
@ -143,6 +145,7 @@ func (c *Cert) WithoutParentKeys() *Cert {
|
|||
ca.WithoutKeys()
|
||||
}
|
||||
return &Cert{
|
||||
x: c.x,
|
||||
Template: c.Template,
|
||||
Bytes: c.Bytes,
|
||||
Key: c.Key,
|
||||
|
|
|
@ -52,6 +52,7 @@ func (x *certifier) Import(data []byte) (*Cert, error) {
|
|||
if err := tGob.Decode(cert); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
cert.x = x
|
||||
return cert, nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user