Skip to content

Commit b6100f5

Browse files
committed
umbilical: be more explicit about the relationship
1 parent 402a521 commit b6100f5

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

umbilical/x509.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,19 +89,19 @@ func GetChainFromTLSServer(addr string) (chain []*x509.Certificate, err error) {
8989

9090
// Checks whether the given assertion (to be) issued in the given batch
9191
// is consistent with the given X.509 certificate chain and
92-
// trusted roots.
92+
// trusted roots. The assertion is allowed to cover less than the certificate:
93+
// eg, only example.com where the certificate covers some.example.com too.
9394
//
94-
// We are more strict than is perhaps required. For instance, we do
95-
// not allow an assertion for some.example.com to be backed
95+
// On the other hand, we are more strict than is perhaps required. For
96+
// instance, we do not allow an assertion for some.example.com to be backed
9697
// by a wildcard certificate for *.example.com.
9798
// Also we require basically the same chain to be valid for the full
9899
// duration of the assertion.
99100
//
100101
// If rc is set, checks whether the certificate is revoked. Does not check
101102
// revocation of intermediates.
102103
//
103-
// If consistent, returns one or more verified chains. This is useful
104-
// for revocation checks.
104+
// If consistent, returns one or more verified chains.
105105
func CheckAssertionValidForX509(a mtc.Assertion, batch mtc.Batch,
106106
chain []*x509.Certificate, roots *x509.CertPool, rc *revocation.Checker) (
107107
[][]*x509.Certificate, error) {
@@ -111,7 +111,7 @@ func CheckAssertionValidForX509(a mtc.Assertion, batch mtc.Batch,
111111

112112
cert := chain[0]
113113

114-
// Check if claims match certificate.
114+
// Check if the claims are covered by the certificate.
115115
for _, ip := range slices.Concat(a.Claims.IPv4, a.Claims.IPv6) {
116116
ok := false
117117
for _, ip2 := range cert.IPAddresses {

0 commit comments

Comments
 (0)