mirror of
https://github.com/golang/go
synced 2024-11-17 18:24:45 -07:00
crypto/x509: clarify MarshalPKIXPublicKey and ParsePKIXPublicKey docs
Fixes #35313 Change-Id: I7be3c40f338de6b1808358ea01e729db8b533ce5 Reviewed-on: https://go-review.googlesource.com/c/go/+/228778 Run-TryBot: Katie Hockman <katie@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Filippo Valsorda <filippo@golang.org>
This commit is contained in:
parent
80e5c3b8b5
commit
ef5c59d47b
@ -47,6 +47,8 @@ type pkixPublicKey struct {
|
||||
}
|
||||
|
||||
// ParsePKIXPublicKey parses a public key in PKIX, ASN.1 DER form.
|
||||
// The encoded public key is a SubjectPublicKeyInfo structure
|
||||
// (see RFC 5280, Section 4.1).
|
||||
//
|
||||
// It returns a *rsa.PublicKey, *dsa.PublicKey, *ecdsa.PublicKey, or
|
||||
// ed25519.PublicKey. More types might be supported in the future.
|
||||
@ -107,6 +109,8 @@ func marshalPublicKey(pub interface{}) (publicKeyBytes []byte, publicKeyAlgorith
|
||||
}
|
||||
|
||||
// MarshalPKIXPublicKey converts a public key to PKIX, ASN.1 DER form.
|
||||
// The encoded public key is a SubjectPublicKeyInfo structure
|
||||
// (see RFC 5280, Section 4.1).
|
||||
//
|
||||
// The following key types are currently supported: *rsa.PublicKey, *ecdsa.PublicKey
|
||||
// and ed25519.PublicKey. Unsupported key types result in an error.
|
||||
|
Loading…
Reference in New Issue
Block a user