From: Martin Sucha Date: Sun, 20 May 2018 19:42:25 +0000 (+0200) Subject: crypto/x509: document fields used in CreateCertificate X-Git-Tag: go1.11beta1~358 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=a10d390676937ade864e8b20878a51d6e927ea2c;p=gostls13.git crypto/x509: document fields used in CreateCertificate The added fields are used in buildExtensions so should be documented too. Fixes #21363 Change-Id: Ifcc11da5b690327946c2488bcf4c79c60175a339 Reviewed-on: https://go-review.googlesource.com/113916 Reviewed-by: Brad Fitzpatrick --- diff --git a/src/crypto/x509/x509.go b/src/crypto/x509/x509.go index bb1f94497f..34eb8b0105 100644 --- a/src/crypto/x509/x509.go +++ b/src/crypto/x509/x509.go @@ -1952,7 +1952,8 @@ func buildExtensions(template *Certificate, subjectIsEmpty bool, authorityKeyId } // Adding another extension here? Remember to update the maximum number - // of elements in the make() at the top of the function. + // of elements in the make() at the top of the function and the list of + // template fields used in CreateCertificate documentation. return append(ret[:n], template.ExtraExtensions...), nil } @@ -2043,21 +2044,34 @@ var emptyASN1Subject = []byte{0x30, 0} // // - AuthorityKeyId // - BasicConstraintsValid +// - CRLDistributionPoints // - DNSNames +// - EmailAddresses // - ExcludedDNSDomains +// - ExcludedEmailAddresses +// - ExcludedIPRanges +// - ExcludedURIDomains // - ExtKeyUsage +// - ExtraExtensions // - IsCA +// - IssuingCertificateURL // - KeyUsage // - MaxPathLen // - MaxPathLenZero // - NotAfter // - NotBefore +// - OCSPServer // - PermittedDNSDomains // - PermittedDNSDomainsCritical +// - PermittedEmailAddresses +// - PermittedIPRanges +// - PermittedURIDomains +// - PolicyIdentifiers // - SerialNumber // - SignatureAlgorithm // - Subject // - SubjectKeyId +// - URIs // - UnknownExtKeyUsage // // The certificate is signed by parent. If parent is equal to template then the