forked from TrueCloudLab/certificates
Fix comment typos and extra white spaces
This commit is contained in:
parent
2eba5326db
commit
965d59c0a8
3 changed files with 6 additions and 6 deletions
|
@ -377,8 +377,8 @@ func (a *Authority) init() error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
// If not defined with an option, add intermediates to the the list
|
||||
// of certificates used for name constraints validation at issuance
|
||||
// If not defined with an option, add intermediates to the list of
|
||||
// certificates used for name constraints validation at issuance
|
||||
// time.
|
||||
if len(a.intermediateX509Certs) == 0 {
|
||||
a.intermediateX509Certs = append(a.intermediateX509Certs, options.CertificateChain...)
|
||||
|
|
|
@ -128,8 +128,8 @@ func (e *Engine) Validate(dnsNames []string, ipAddresses []net.IP, emailAddresse
|
|||
return nil
|
||||
}
|
||||
|
||||
// ValidateCertificate validates the DNS names, IP addresses, Email address and
|
||||
// URIs present in the given certificate.
|
||||
// ValidateCertificate validates the DNS names, IP addresses, Email addresses
|
||||
// and URIs present in the given certificate.
|
||||
func (e *Engine) ValidateCertificate(cert *x509.Certificate) error {
|
||||
return e.Validate(cert.DNSNames, cert.IPAddresses, cert.EmailAddresses, cert.URIs)
|
||||
}
|
||||
|
|
|
@ -140,7 +140,7 @@ func TestEngine_Validate(t *testing.T) {
|
|||
emailAddresses: []string{"root@example.com"},
|
||||
uris: []*url.URL{{Scheme: "https", Host: "example.com", Path: "/uuid/c6d1a755-0c12-431e-9136-b64cb3173ec7"}},
|
||||
}, false},
|
||||
{"ok permitted dns ", fields{
|
||||
{"ok permitted dns", fields{
|
||||
hasNameConstraints: true,
|
||||
permittedDNSDomains: []string{"example.com"},
|
||||
}, args{dnsNames: []string{"example.com", "www.example.com"}}, false},
|
||||
|
@ -163,7 +163,7 @@ func TestEngine_Validate(t *testing.T) {
|
|||
{IP: net.ParseIP("192.168.2.1").To4(), Mask: net.IPMask{255, 255, 255, 255}},
|
||||
},
|
||||
}, args{ipAddresses: []net.IP{{192, 168, 2, 2}, {192, 168, 3, 1}}}, false},
|
||||
{"ok permitted emails ", fields{
|
||||
{"ok permitted emails", fields{
|
||||
hasNameConstraints: true,
|
||||
permittedEmailAddresses: []string{"root@example.com", "acme.org", ".acme.com"},
|
||||
}, args{emailAddresses: []string{"root@example.com", "name@acme.org", "name@coyote.acme.com", `"(quoted)"@www.acme.com`}}, false},
|
||||
|
|
Loading…
Reference in a new issue