Quellcode durchsuchen

Clarify comments by code review

Mariano Cano vor 4 Jahren
Ursprung
Commit
23045e1812
2 geänderte Dateien mit 6 neuen und 5 gelöschten Zeilen
  1. 2 1
      authority/authority.go
  2. 4 4
      authority/options.go

+ 2 - 1
authority/authority.go

@@ -378,7 +378,8 @@ func (a *Authority) init() error {
 				return err
 			}
 			// If not defined with an option, add intermediates to the the list
-			// of used for constraints purposes.
+			// of certificates used for name constraints validation at issuance
+			// time.
 			if len(a.intermediateX509Certs) == 0 {
 				a.intermediateX509Certs = append(a.intermediateX509Certs, options.CertificateChain...)
 			}

+ 4 - 4
authority/options.go

@@ -240,16 +240,16 @@ func WithX509FederatedCerts(certs ...*x509.Certificate) Option {
 	}
 }
 
-// WithX509RootCerts is an option that allows to define the list of intermediate
-// certificates that the CA will be using. This option will replace any
-// intermediate certificate defined before.
+// WithX509IntermediateCerts is an option that allows to define the list of
+// intermediate certificates that the CA will be using. This option will replace
+// any intermediate certificate defined before.
 //
 // Note that these certificates will not be bundled with the certificates signed
 // by the CA, the CAS service will take care of that, although they should
 // match, this is not guaranteed.  These certificates will be mainly used for
 // constraint purposes.
 //
-// This option should only used on specific configurations, for example when
+// This option should only be used on specific configurations, for example when
 // WithX509SignerFunc is used, as we don't know the list of intermediates on
 // advance.
 func WithX509IntermediateCerts(intermediateCerts ...*x509.Certificate) Option {