func (r RDNSequence) String() string {
	s := ""
	for i := 0; i < len(r); i++ {
		rdn := r[len(r)-1-i]
		if i > 0 {
			s += ","
		}
		for j, tv := range rdn {
			if j > 0 {
				s += "+"
			}
			oidString := tv.Type.String()
			typeName, ok := attributeTypeNames[oidString]
			if !ok {
				derBytes, err := asn1.Marshal(tv.Value)
				if err == nil {
					s += oidString + "=#" + hex.EncodeToString(derBytes)
					continue  
				}
				typeName = oidString
			}
			valueString := fmt.Sprint(tv.Value)
			escaped := make([]rune, 0, len(valueString))
			for k, c := range valueString {
				escape := false
				switch c {
				case ',', '+', '"', '\\', '<', '>', ';':
					escape = true
				case ' ':
					escape = k == 0 || k == len(valueString)-1
				case '#':
					escape = k == 0
				}
				if escape {
					escaped = append(escaped, '\\', c)
				} else {
					escaped = append(escaped, c)
				}
			}
			s += typeName + "=" + string(escaped)
		}
	}
	return s
}
String returns a string representation of the sequence r,
roughly following the RFC 2253 Distinguished Names syntax.
package pkix
import (
	"encoding/hex"
	"fmt"
	"math/big"
	"time"
	"github.com/google/certificate-transparency-go/asn1"
)
type AlgorithmIdentifier struct {
	Algorithm  asn1.ObjectIdentifier
	Parameters asn1.RawValue `asn1:"optional"`
}
type RDNSequence []RelativeDistinguishedNameSET
var attributeTypeNames = map[string]string{
	"2.5.4.6":  "C",
	"2.5.4.10": "O",
	"2.5.4.11": "OU",
	"2.5.4.3":  "CN",
	"2.5.4.5":  "SERIALNUMBER",
	"2.5.4.7":  "L",
	"2.5.4.8":  "ST",
	"2.5.4.9":  "STREET",
	"2.5.4.17": "POSTALCODE",
}