I have Golang structure:
type Dog struct {
Name string
UUID *big.Int
}
Then I asn1.Marshal it:
dog := Dog{Name: "Rex", UUID: new(big.Int).SetBytes([]byte{0, 0, 7})}
dogAsn, _ := asn1.Marshal(dog)
When I look at the ASN.1 structure of "dogAsn" (using dumpasn1 Linux utility)I see:
SEQUENCE {
PrintableString 'Rex'
INTEGER
00 00 00 07
}
I wish NOT to have "PrintableString" there, but instead "GeneralString":
(Desired output):
SEQUENCE {
GeneralString 'Rex'
INTEGER
00 00 00 07
}
Adding asn1:"tag:27" to the "Name" field:
type Dog struct {
Name string `asn1:"tag:27"`
...
}
Doesn't solve my issue. Any good ideas? Thanks in advance!