Closed kpp closed 3 years ago
All that we do is marshal the public key: https://github.com/libp2p/go-libp2p-tls/blob/7530faa07acbfc0aa918c072c2cb35d3c8d5d859/crypto.go#L167-L174 I'm not sure if we need to say anything more than https://pkg.go.dev/crypto/x509#MarshalPKIXPublicKey says, as this seems to be the standard way of marshaling the key. I find spelling it out explicitly, as suggested in this PR, confusing, as it suggests that we're doing something non-standard here.
@marten-seemann Would it be better if I replace that statement with: "The public key is encoded as a SubjectPublicKeyInfo
structure as described in RFC 5280, Section 4.1:"?
Would it be better if I replace that statement with: "The public key is encoded as a SubjectPublicKeyInfo structure as described in RFC 5280, Section 4.1:"?
Yes, I think referencing the RFC makes a lot of sense here.
Done. Sorry for the delay.
Friendly ping @marten-seemann.
This is a clarification how to marshal SubjectPublicKeyInfo according to the go implementation (https://github.com/libp2p/go-libp2p-tls/blob/7530faa07acbfc0aa918c072c2cb35d3c8d5d859/crypto.go#L143 and https://pkg.go.dev/crypto/x509#MarshalPKIXPublicKey).