Add some comments added to master.

This commit is contained in:
Mariano Cano 2019-03-08 18:09:35 -08:00
parent af9688c419
commit 955405d6aa

View file

@ -98,7 +98,8 @@ func (v commonNameValidator) Valid(req *x509.CertificateRequest) error {
// dnsNamesValidator validates the DNS names SAN of a certificate request. // dnsNamesValidator validates the DNS names SAN of a certificate request.
type dnsNamesValidator []string type dnsNamesValidator []string
// Valid checks that certificate request DNSNames matches the one configured. // Valid checks that certificate request DNS Names match those configured in
// the bootstrap (token) flow.
func (v dnsNamesValidator) Valid(req *x509.CertificateRequest) error { func (v dnsNamesValidator) Valid(req *x509.CertificateRequest) error {
want := make(map[string]bool) want := make(map[string]bool)
for _, s := range v { for _, s := range v {
@ -117,7 +118,8 @@ func (v dnsNamesValidator) Valid(req *x509.CertificateRequest) error {
// ipAddressesValidator validates the IP addresses SAN of a certificate request. // ipAddressesValidator validates the IP addresses SAN of a certificate request.
type ipAddressesValidator []net.IP type ipAddressesValidator []net.IP
// Valid checks that certificate request IPAddresses matches the one configured. // Valid checks that certificate request IP Addresses match those configured in
// the bootstrap (token) flow.
func (v ipAddressesValidator) Valid(req *x509.CertificateRequest) error { func (v ipAddressesValidator) Valid(req *x509.CertificateRequest) error {
want := make(map[string]bool) want := make(map[string]bool)
for _, ip := range v { for _, ip := range v {