]> Cypherpunks repositories - gostls13.git/commit
crypto/x509: simplify candidate chain filtering
authorRoland Shoemaker <roland@golang.org>
Wed, 1 Oct 2025 15:57:00 +0000 (08:57 -0700)
committerRoland Shoemaker <roland@golang.org>
Fri, 24 Oct 2025 15:40:50 +0000 (08:40 -0700)
commit0d3dab9b1d3b22ecac956c79a1b42a7d3f587c06
treecddd777aea17c454ba01c32b226cfa0934ccb09c
parent29046398bb9081ea8f8ff3befa770e86d60b1e05
crypto/x509: simplify candidate chain filtering

Use slices.DeleteFunc to remove chains with invalid policies and
incompatible key usage, instead of iterating over the chains and
reconstructing the slice.

Change-Id: I8ad2bc1ac2469d0d18b2c090e3d4f702b1b577cb
Reviewed-on: https://go-review.googlesource.com/c/go/+/708415
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Daniel McCarney <daniel@binaryparadox.net>
Reviewed-by: David Chase <drchase@google.com>
src/crypto/x509/verify.go
src/crypto/x509/verify_test.go