aboutsummaryrefslogtreecommitdiff
path: root/src/encoding
diff options
context:
space:
mode:
authorRoland Shoemaker <roland@golang.org>2025-10-20 11:04:38 -0700
committerGopher Robot <gobot@golang.org>2025-10-24 09:13:02 -0700
commite6cff690517e66f610bf8787a442a47d92fc14c7 (patch)
tree92356f6e3e22447079c0536818f9714e7b08474e /src/encoding
parentf5f69a3de9a3e0b8d4e211f155853a29cd400e92 (diff)
downloadgo-e6cff690517e66f610bf8787a442a47d92fc14c7.tar.xz
crypto/x509: move constraint checking after chain building
The standard approach to constraint checking involves checking the constraints during chain building. This is typically done as most chain building algorithms want to find a single chain. We don't do this, and instead build every valid chain we can find. Because of this, we don't _need_ to do constraint checking during the chain building stage, and instead can defer it until we have built all of the potentially valid chains (we already do this for EKU nesting and policy checking). This allows us to limit the constraints we check to only chains issued by trusted roots, which reduces the attack surface for constraint checking, which is an annoyingly algorithmically complex process (for now). To maintain previous behavior, if we see an error during constraint checking, and we end up with no valid chains, we return the first constraint checking error, instead of a more verbose error indicating if there were different problems during filtering. At some point we probably should come up with a more unified error type for chain building that can contain information about multiple failure modes. Change-Id: I5780b3adce8538eb4c3b56ddec52f0723d39009e Reviewed-on: https://go-review.googlesource.com/c/go/+/713240 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Auto-Submit: Roland Shoemaker <roland@golang.org> Reviewed-by: Daniel McCarney <daniel@binaryparadox.net>
Diffstat (limited to 'src/encoding')
0 files changed, 0 insertions, 0 deletions