是否有用于解封ASN.1格式的TLS证书的接口

是否有用于解封ASN.1格式的TLS证书的接口

问题描述:

I'm parsing TLS records, taken from a PCAP file.

I have the bytes of a TLS certificate in ASN.1 format (in a []byte).

I want to unmarshall this byte slice into a useful structure (avoiding having to manually parse ASN.1).

I can't seem to find an interface for a TLS certificate that follows the RFC in either encoding/asn1 nor crypto/tls.

Has this been created somewhere I can't find or do I need to write my own?

我正在解析从PCAP文件获取的TLS记录。 p>

我有ASN.1格式的TLS证书的字节(为 [] byte code>)。 p>

我想将此字节切片解组为有用的结构 (避免手动分析ASN.1)。 p>

我似乎找不到 RFC 编码/ asn1 crypto / tls

是否在我找不到的地方创建了这个文件?还是需要自己编写? p> div>

The struct is in the x509 package