Skip to content

Commit

Permalink
asn1: adds ability to marshal to general string
Browse files Browse the repository at this point in the history
The current implementation cannot marshal a string into asn1 general
string encoded bytes. This capability has been added.

Fixes golang#18832
  • Loading branch information
jcmturner committed Sep 9, 2018
1 parent 5f98248 commit 2fa0fb1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/encoding/asn1/marshal.go
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@ func makeField(v reflect.Value, params fieldParameters) (e encoder, err error) {
// ia5: causes strings to be marshaled as ASN.1, IA5String values
// printable: causes strings to be marshaled as ASN.1, PrintableString values
// utf8: causes strings to be marshaled as ASN.1, UTF8String values
// generalstring: causes strings to be marshaled as ASN.1, GeneralString values
// generalstring: causes strings to be marshaled as ASN.1, GeneralString values
// utc: causes time.Time to be marshaled as ASN.1, UTCTime values
// generalized: causes time.Time to be marshaled as ASN.1, GeneralizedTime values
func Marshal(val interface{}) ([]byte, error) {
Expand Down

0 comments on commit 2fa0fb1

Please sign in to comment.