]> Cypherpunks repositories - gostls13.git/commitdiff
crypto/x509: improve internal comment
authorDmitri Shuralyov <shurcooL@gmail.com>
Thu, 29 Jun 2017 04:38:38 +0000 (00:38 -0400)
committerBrad Fitzpatrick <bradfitz@golang.org>
Thu, 29 Jun 2017 05:50:37 +0000 (05:50 +0000)
Apply code review suggestion from CL 46715.

The block is doing more than just checking len(r.certs) == len(tc.cns).
It also verifies that certificate common names match.

Change-Id: I28d6926a5da48bd8f6c80aa5e5a1ed6d4990f845
Reviewed-on: https://go-review.googlesource.com/47132
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/crypto/x509/root_unix_test.go

index 3a997b235d33931f86e3c61ffff6230ca055a1d9..03f935d4e82fda63351cf43bfa3dd1378f13d14d 100644 (file)
@@ -110,7 +110,7 @@ func TestEnvVars(t *testing.T) {
                                t.Fatal("nil roots")
                        }
 
-                       // Verify len(r.certs) == len(tc.cns), otherwise report where the mismatch is.
+                       // Verify that the returned certs match, otherwise report where the mismatch is.
                        for i, cn := range tc.cns {
                                if i >= len(r.certs) {
                                        t.Errorf("missing cert %v @ %v", cn, i)