Skip to content

crypto/asn1: ASN.1 Marshal with application tag #18873

Closed
@kazkansouh

Description

@kazkansouh

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

go version go1.6.2 linux/amd64

What operating system and processor architecture are you using (go env)?

GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH=""
GORACE=""
GOROOT="/usr/lib/go-1.6"
GOTOOLDIR="/usr/lib/go-1.6/pkg/tool/linux_amd64"
GO15VENDOREXPERIMENT="1"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0"
CXX="g++"
CGO_ENABLED="1"

What did you do?

Not an error. I want marshal/unmarshal ASN.1 where the first byte is defined as an application tag, e.g. 0x60. However this is not possible because the encoding/asn1/Marshal function does not allow for the parameters to be configured.

I suggest adding a function "MarshalWithParameters" that allows for some of the parameters to be configured, such as setting the tag to asn1:"application" or adopting a solution similar to the xml encoding XMLName type that augments a given structure with meta data for the encoding.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeatureRequestIssues asking for a new feature that does not need a proposal.FrozenDueToAge

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions