This avoids a problem when creating certificates with parents that
were produce by other code: the Go structures don't contain all the
information about the various ASN.1 string types etc and so that
information would otherwise be lost.
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/
5453067
return
}
- asn1Issuer, err := asn1.Marshal(parent.Subject.ToRDNSequence())
- if err != nil {
- return
+ var asn1Issuer []byte
+ if len(parent.RawSubject) > 0 {
+ asn1Issuer = parent.RawSubject
+ } else {
+ if asn1Issuer, err = asn1.Marshal(parent.Subject.ToRDNSequence()); err != nil {
+ return
+ }
}
+
asn1Subject, err := asn1.Marshal(template.Subject.ToRDNSequence())
if err != nil {
return