diff --git a/cert.go b/cert.go index cf2180e..694a9d3 100644 --- a/cert.go +++ b/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, diff --git a/certifier.go b/certifier.go index 94ecc23..06ca837 100644 --- a/certifier.go +++ b/certifier.go @@ -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 }