]> Cypherpunks.ru repositories - gostls13.git/commitdiff
crypto/x509: clarify MarshalPKIXPublicKey and ParsePKIXPublicKey docs
authorKatie Hockman <katie@golang.org>
Fri, 17 Apr 2020 16:21:24 +0000 (12:21 -0400)
committerKatie Hockman <katie@golang.org>
Fri, 17 Apr 2020 19:18:12 +0000 (19:18 +0000)
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>
src/crypto/x509/x509.go

index 6776608d7585d5dfd3c017688fd503adf1417d10..6d03a129f8ed9d6d2cbaf5ff08e351089d0dc69c 100644 (file)
@@ -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.