Commit 5cad8611 authored by Adam Langley's avatar Adam Langley

crypto/x509: fix documentation typos

Thanks to Jeff R. Allen for pointing them out.

R=bradfitz, gri
CC=golang-dev
https://golang.org/cl/5412052
parent 28cead8b
...@@ -8,7 +8,7 @@ import ( ...@@ -8,7 +8,7 @@ import (
"encoding/pem" "encoding/pem"
) )
// Roots is a set of certificates. // CertPool is a set of certificates.
type CertPool struct { type CertPool struct {
bySubjectKeyId map[string][]int bySubjectKeyId map[string][]int
byName map[string][]int byName map[string][]int
...@@ -70,11 +70,11 @@ func (s *CertPool) AddCert(cert *Certificate) { ...@@ -70,11 +70,11 @@ func (s *CertPool) AddCert(cert *Certificate) {
s.byName[name] = append(s.byName[name], n) s.byName[name] = append(s.byName[name], n)
} }
// AppendCertsFromPEM attempts to parse a series of PEM encoded root // AppendCertsFromPEM attempts to parse a series of PEM encoded certificates.
// certificates. It appends any certificates found to s and returns true if any // It appends any certificates found to s and returns true if any certificates
// certificates were successfully parsed. // were successfully parsed.
// //
// On many Linux systems, /etc/ssl/cert.pem will contains the system wide set // On many Linux systems, /etc/ssl/cert.pem will contain the system wide set
// of root CAs in a format suitable for this function. // of root CAs in a format suitable for this function.
func (s *CertPool) AppendCertsFromPEM(pemCerts []byte) (ok bool) { func (s *CertPool) AppendCertsFromPEM(pemCerts []byte) (ok bool) {
for len(pemCerts) > 0 { for len(pemCerts) > 0 {
......
...@@ -899,11 +899,10 @@ var ( ...@@ -899,11 +899,10 @@ var (
oidRSA = []int{1, 2, 840, 113549, 1, 1, 1} oidRSA = []int{1, 2, 840, 113549, 1, 1, 1}
) )
// CreateSelfSignedCertificate creates a new certificate based on // CreateCertificate creates a new certificate based on a template. The
// a template. The following members of template are used: SerialNumber, // following members of template are used: SerialNumber, Subject, NotBefore,
// Subject, NotBefore, NotAfter, KeyUsage, BasicConstraintsValid, IsCA, // NotAfter, KeyUsage, BasicConstraintsValid, IsCA, MaxPathLen, SubjectKeyId,
// MaxPathLen, SubjectKeyId, DNSNames, PermittedDNSDomainsCritical, // DNSNames, PermittedDNSDomainsCritical, PermittedDNSDomains.
// PermittedDNSDomains.
// //
// The certificate is signed by parent. If parent is equal to template then the // The certificate is signed by parent. If parent is equal to template then the
// certificate is self-signed. The parameter pub is the public key of the // certificate is self-signed. The parameter pub is the public key of the
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment